Commit graph

383 commits

Author SHA1 Message Date
Folke Lemaitre
a8248aeb75
feat: experiments with lpeg 2024-11-30 16:47:47 +01:00
Folke Lemaitre
d0794dcf8e
fix(init): use rawget when loading modules to prevent possible recursive loading with invalid module fields 2024-11-29 07:37:49 +01:00
Folke Lemaitre
dbb1764ae0
ci(docs): added support for module subdirectories 2024-11-29 07:37:49 +01:00
Folke Lemaitre
51996dfeac
feat(win): go back to the previous window, when closing a snacks window 2024-11-29 07:37:49 +01:00
folke
da53742d23 chore(build): auto-generate docs 2024-11-27 22:57:50 +00:00
Folke Lemaitre
45fd0efe41
fix(config): check correct var for single config result. Fixes #167 2024-11-27 23:56:56 +01:00
folke
b2c13e5c89 chore(build): auto-generate docs 2024-11-27 20:44:09 +00:00
Folke Lemaitre
d730a13b55
feat(config): allow overriding resolved options for a plugin. See #164 2024-11-27 21:43:15 +01:00
Folke Lemaitre
6e3cb7e53c
feat(config): make it easier to use examples in your config 2024-11-27 21:27:56 +01:00
folke
cc484d5279 chore(build): auto-generate docs 2024-11-27 17:23:13 +00:00
Iordanis Petkakis
59c8eb36ae
feat(gitbrowse): open commit when word is valid hash (#161)
## Description
`gitbrowse` opens commit when word under cursor is valid commit hash.
Please check the Lua pattern for the commit hash in the validation
function I used as I'm not confident as to if it covers all the cases. I
only tested with `diffview` file history and `gitsigns` blame buffer as
I don't use other tools.
<!-- Describe the big picture of your changes to communicate to the
maintainers
  why we should accept this pull request. -->

## Related Issue(s)
Closes #138.
<!--
  If this PR fixes any issues, please link to the issue here.
  - Fixes #<issue_number>
-->

## Screenshots

<!-- Add screenshots of the changes if applicable. -->
2024-11-27 18:22:14 +01:00
folke
dbed9231f0 chore(build): auto-generate docs 2024-11-27 16:42:15 +00:00
Folke Lemaitre
b1998aed95
docs(dashboard): docgen 2024-11-27 17:41:21 +01:00
Folke Lemaitre
378b0285c5
docs(dashboard): fix git example 2024-11-27 17:40:53 +01:00
Folke Lemaitre
59f8f0db99
feat(dashboard): always render cache even when expired. Then refresh when needed. 2024-11-27 17:40:32 +01:00
Folke Lemaitre
985be4a759
perf(statuscolumn): some small optims 2024-11-26 14:00:07 +01:00
Folke Lemaitre
f83a7b0ffb
fix(dashboard): terminal commands get 5 seconds to complete to trigger caching 2024-11-26 13:59:49 +01:00
Folke Lemaitre
80b6a4f782
docs(gitbrowse): bitbucket 2024-11-26 12:06:29 +01:00
Folke Lemaitre
b3a60c087a
docs(statuscolumn): duplicate help tags 2024-11-26 12:06:13 +01:00
Folke Lemaitre
26864851aa
docs(dashboard): added github example showing notifications, open PRs, issues and git diff 2024-11-26 12:04:37 +01:00
folke
25490d040e chore(build): auto-generate docs 2024-11-26 08:18:29 +00:00
Krishna Balasubramanian
53441c9703
feat(gitbrowse): add Bitbucket URL patterns (#163)
## Description

<!-- Describe the big picture of your changes to communicate to the
maintainers
  why we should accept this pull request. -->

This enables users to open commits hosted on bitbucket repositories.

## Related Issue(s)

<!--
  If this PR fixes any issues, please link to the issue here.
  - Fixes #<issue_number>
-->

https://github.com/folke/snacks.nvim/issues/162

https://github.com/folke/snacks.nvim/issues/138

## Screenshots

<!-- Add screenshots of the changes if applicable. -->

Co-authored-by: Krishna Balasubramanian <krishna@foxbots.com>
2024-11-26 09:17:30 +01:00
Folke Lemaitre
7564a30cad
fix(statuscolumn): bad copy/paste!! Fixes #152 2024-11-23 14:29:07 +01:00
folke
f99aa0c464 chore(build): auto-generate docs 2024-11-23 12:11:35 +00:00
Folke Lemaitre
cf840087c5
fix(statuscolumn): never error (in case of E565 for example). Fixes #150 2024-11-23 13:10:33 +01:00
Folke Lemaitre
0bbc9e7ae6
fix(notifier): gracefully handle E565 errors 2024-11-23 13:10:33 +01:00
Folke Lemaitre
0b020449ad
fix(win): handle E565 errors on close 2024-11-23 13:10:33 +01:00
folke
5edb3b5542 chore(build): auto-generate docs 2024-11-23 07:15:22 +00:00
Folke Lemaitre
2c7b4b7971
feat(health): check that snacks.nvim plugin spec is correctly setup 2024-11-23 08:12:46 +01:00
Folke Lemaitre
417e07c0d2
feat(dashboard): allow passing win=0, buf=0 to use for the dashboard instead of creating a new window 2024-11-23 00:10:16 +01:00
Folke Lemaitre
02d90ff843
docs(notifier): docgen 2024-11-23 00:04:35 +01:00
Folke Lemaitre
bebd7e70cd
feat(notifier): added history opts.reverse 2024-11-23 00:03:02 +01:00
Folke Lemaitre
0c7f7c5970
fix(notifier): always show notifs directly when blocking 2024-11-22 23:52:50 +01:00
folke
aac03be377 chore(build): auto-generate docs 2024-11-22 21:33:36 +00:00
Ughur Alakbarov
c014c6dcfb
docs(dashboard): typo (#148)
supersedes #141
2024-11-22 22:32:36 +01:00
Folke Lemaitre
4e04b70ea3
fix(dashboard): fixed mini.sessions.read. Fixes #144 2024-11-22 18:58:07 +01:00
Folke Lemaitre
9462273bf7
fix(git): make git.get_root work for work-trees and cache git root checks. Closes #136. Fixes #115 2024-11-22 13:26:34 +01:00
github-actions[bot]
c8d76a765e
chore(main): release 2.5.0 (#120)
🤖 I have created a release *beep* *boop*
---


## [2.5.0](https://github.com/folke/snacks.nvim/compare/v2.4.0...v2.5.0)
(2024-11-22)


### Features

* **dashboard:** added Snacks.dashboard.update(). Closes
[#121](https://github.com/folke/snacks.nvim/issues/121)
([c770ebe](c770ebeaf7))
* **debug:** profile title
([0177079](017707955f))
* **notifier:** show indicator when notif has more lines. Closes
[#112](https://github.com/folke/snacks.nvim/issues/112)
([cf72c06](cf72c06ee6))
* **terminal:** added Snacks.terminal.get(). Closes
[#122](https://github.com/folke/snacks.nvim/issues/122)
([7f63d4f](7f63d4fefb))
* **util:** get hl color
([b0da066](b0da066536))
* **util:** set_hl managed
([9642695](96426953a0))


### Bug Fixes

* **dashboard:** `vim.pesc` for auto keys. Fixes
[#134](https://github.com/folke/snacks.nvim/issues/134)
([aebffe5](aebffe535b))
* **dashboard:** align should always set width even if no alignment is
needed. Fixes [#137](https://github.com/folke/snacks.nvim/issues/137)
([54d521c](54d521cd0f))
* **dashboard:** better git check for advanced example. See
[#126](https://github.com/folke/snacks.nvim/issues/126)
([b4a293a](b4a293aac7))
* **dashboard:** open fullscreen on relaunch
([853240b](853240bb20))
* **dashboard:** randomseed needs argument on stable
([c359164](c359164872))
* **debug:** include `main` in caller
([33d31af](33d31af150))
* **git:** get_root should work for non file buffers
([723d8ea](723d8eac84))
* **notifier:** hide existing nofif if higher prio notif arrives and no
free space for lower notif
([7a061de](7a061de75f))
* **quickfile:** don't load when bigfile detected. Fixes
[#116](https://github.com/folke/snacks.nvim/issues/116)
([978424c](978424ce28))
* **sessions:** change persisted.nvim load session command
([#118](https://github.com/folke/snacks.nvim/issues/118))
([26bec4b](26bec4b51d))
* **terminal:** hide on `q` instead of close
([30a0721](30a0721d56))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-11-22 09:41:17 +01:00
folke
922602dc1a chore(build): auto-generate docs 2024-11-22 06:21:04 +00:00
Folke Lemaitre
54d521cd0f
fix(dashboard): align should always set width even if no alignment is needed. Fixes #137 2024-11-22 07:20:02 +01:00
Folke Lemaitre
830f96420d
docs: docgen 2024-11-21 22:11:18 +01:00
Folke Lemaitre
96426953a0
feat(util): set_hl managed 2024-11-21 22:10:25 +01:00
Folke Lemaitre
b0da066536
feat(util): get hl color 2024-11-21 22:10:10 +01:00
Folke Lemaitre
017707955f
feat(debug): profile title 2024-11-21 22:08:46 +01:00
Folke Lemaitre
33d31af150
fix(debug): include main in caller 2024-11-21 22:08:29 +01:00
Folke Lemaitre
c359164872
fix(dashboard): randomseed needs argument on stable 2024-11-21 20:04:16 +01:00
folke
c208542828 chore(build): auto-generate docs 2024-11-21 18:12:35 +00:00
Zhou Fang
cfa7dea08a
fix(gitbrowse): fix the regex in url_patterns (#133)
## Description

The `remote` is used as a regex pattern, so the dot in the
`"github.com"` means any character. This PR correct the regexes in
default `url_patterns`.


aa38175c00/lua/snacks/gitbrowse.lua (L40-L49)


aa38175c00/lua/snacks/gitbrowse.lua (L68-L72)


Test code:

```lua
print(require("snacks").gitbrowse.get_url("https://githubacom.com/folke/snacks.nvim"))
```

## Related Issue(s)

<!--
  If this PR fixes any issues, please link to the issue here.
  - Fixes #<issue_number>
-->

## Screenshots

**Before**

![image](https://github.com/user-attachments/assets/899e8312-2e9d-44ed-92c1-e3b28cedc06c)

**After**

![image](https://github.com/user-attachments/assets/fc5610a9-8977-4369-aff2-861730083308)
2024-11-21 19:11:39 +01:00
Folke Lemaitre
aebffe535b
fix(dashboard): vim.pesc for auto keys. Fixes #134 2024-11-21 19:10:37 +01:00
Joao Louceiro
aa38175c00
docs(dashboard): update dashboard.md (#132)
Two small typos
2024-11-21 12:21:02 +01:00