Commit graph

1292 commits

Author SHA1 Message Date
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
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
Folke Lemaitre
30a0721d56
fix(terminal): hide on q instead of close 2024-11-21 11:05:01 +01:00
Folke Lemaitre
7f63d4fefb
feat(terminal): added Snacks.terminal.get(). Closes #122 2024-11-20 20:58:00 +01:00
Folke Lemaitre
c770ebeaf7
feat(dashboard): added Snacks.dashboard.update(). Closes #121 2024-11-20 20:30:29 +01:00
Folke Lemaitre
cf72c06ee6
feat(notifier): show indicator when notif has more lines. Closes #112 2024-11-20 20:15:41 +01:00
Folke Lemaitre
723d8eac84
fix(git): get_root should work for non file buffers 2024-11-20 20:02:19 +01:00
Folke Lemaitre
7a061de75f
fix(notifier): hide existing nofif if higher prio notif arrives and no free space for lower notif 2024-11-20 18:07:57 +01:00
Folke Lemaitre
853240bb20
fix(dashboard): open fullscreen on relaunch 2024-11-20 17:10:56 +01:00
Oli
26bec4b51d
fix(sessions): change persisted.nvim load session command (#118)
## Description

Firstly, thank you for integrating persisted.nvim in the dashboard out
of the box.

This PR changes the command to load a persisted.nvim session. This
accounts for users potentially not having `SessionLoad` available to
them if they lazy load their dashboard and don't have `cmd = {
"SessionLoad" }` setup.

## Related Issue(s)

N/A

## Screenshots

N/A
2024-11-20 09:39:41 +01:00
Folke Lemaitre
978424ce28
fix(quickfile): don't load when bigfile detected. Fixes #116 2024-11-20 09:39:09 +01:00
Iordanis Petkakis
c29c0d4850
feat(gitbrowse): open also visual selection range (#89)
## Description
`gitbrowse` takes into account line range when in Visual mode.
<!-- Describe the big picture of your changes to communicate to the
maintainers
  why we should accept this pull request. -->

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

## Screenshots

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

Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
2024-11-19 15:26:39 +01:00
Folke Lemaitre
143c244346
refactor: move all dashboard tracing to debug 2024-11-19 14:55:04 +01:00
Folke Lemaitre
9c0d2e2e93
feat(win): detect alien buffers opening in managed windows and open them somewhere else. Fixes #110 2024-11-19 10:16:51 +01:00
Folke Lemaitre
3311d75f89
fix(dashboard): only check for piped stdin when in TUI. Ignore GUIs 2024-11-19 09:45:24 +01:00
Folke Lemaitre
c15953ee88
feat(dashboard): when an item is wider than pane width and only one pane, then center it. See #108 2024-11-19 09:35:24 +01:00
Folke Lemaitre
1acea8b940
fix(dashboard): check session managers in order 2024-11-19 08:41:09 +01:00
Folke Lemaitre
75dc74c5dc
feat(dashboard): hide tabline and statusline when loading during startup 2024-11-19 08:26:02 +01:00
Folke Lemaitre
0b9e09cbd9
fix(dashboard): remove weird preset.keys function override. Just copy defaults if you want to change them 2024-11-19 07:30:41 +01:00
Folke Lemaitre
be8feef4ab
fix(dashboard): minimum one pane even when it doesn't fit the screen. Fixes #104 2024-11-19 00:20:34 +01:00
Folke Lemaitre
68fcc25802
fix(dashboard): always hide cursor 2024-11-18 23:54:10 +01:00
Folke Lemaitre
4188446f86
fix(dashboard): fix race condition when sending data while closing 2024-11-18 23:41:02 +01:00
Folke Lemaitre
99f1f49104
fix(notifier): also handle timeout = false / timeout = true. See #102 2024-11-18 23:30:09 +01:00
Folke Lemaitre
c0129da4f8
fix(dashboard): debug output 2024-11-18 23:26:18 +01:00
Eduardo Bray
43b4abb9f1
fix(dashboard): disable vim.wo.colorcolumn (#101)
## Description

If `colorcolumn` is set, e.g.:

```lua
vim.opt.colorcolumn = { 80, 100 } -- Guide columns positions
```

The dashboard window shows the columns:


![imagen](https://github.com/user-attachments/assets/72ee34e2-3b26-4940-8cdd-13dafdd11662)

This PR add the missing window option
2024-11-18 23:16:28 +01:00
Folke Lemaitre
0cf22a8d87
feat(notifier): timeout=0 keeps the notif visible till manually hidden. Closes #102 2024-11-18 23:13:56 +01:00
Folke Lemaitre
082beb508c
feat(dashboard): automatically detect streaming commands and don't cache those. tty-clock, cmatrix galore. Fixes #100 2024-11-18 23:07:38 +01:00
Folke Lemaitre
2ae410889c
fix(dashboard): notify on errors. Fixes #99 2024-11-18 21:46:11 +01:00
Folke Lemaitre
b7775ec879
feat(dashboard): allow opts.preset.keys to be a function with default keymaps as arg 2024-11-18 20:59:05 +01:00
Folke Lemaitre
4ff08f1c4d
fix(dashboard): check uis for headless and stdin_tty. Fixes #97. Fixes #98 2024-11-18 20:35:53 +01:00
Folke Lemaitre
735f4d8c9d
fix(debug): MYVIMRC is not always set 2024-11-18 20:03:46 +01:00
Folke Lemaitre
deb00d0ddc
feat: added dashboard health checks 2024-11-18 19:16:54 +01:00
Folke Lemaitre
c8e209e6be
feat(dashboard): added support for mini.sessions 2024-11-18 16:57:54 +01:00
Folke Lemaitre
d540fa607c
feat(dashboard): added new dashboard snack (#77)
## Description

A new dashboard plugin that comes with sane defaults, and can be fully
customized to your liking.

## Screenshots


![image](https://github.com/user-attachments/assets/944373ea-f443-4c16-bfe0-2dc78101f8f5)


![image](https://github.com/user-attachments/assets/492b075e-168d-4d58-af39-1268c047f374)


![image](https://github.com/user-attachments/assets/53a388c2-ca5a-4efb-94f2-752222f43584)


![image](https://github.com/user-attachments/assets/3c6ee94b-6785-4035-8ed2-2f67f39b5f06)


![image](https://github.com/user-attachments/assets/5b7a7117-e504-4b36-88db-91ccc89d8997)
2024-11-18 16:25:17 +01:00
Folke Lemaitre
73b1e20d38
feat(notifier): global keep when in cmdline 2024-11-18 08:57:32 +01:00
Folke Lemaitre
b593598859
feat(debug): Snacks.debug.trace and Snacks.debug.stats for hierarchical traces (like lazy profile) 2024-11-18 08:56:43 +01:00
Folke Lemaitre
313954efdf
feat(terminal): when terminal terminates too quickly, don't close the window and show an error message. See #80 2024-11-16 07:28:45 +01:00
Folke Lemaitre
ec9cfb36b1
feat(notifier): allow specifying a minimal level to show notifications. See #82 2024-11-16 07:21:27 +01:00
Chris Grieser
d3dc8e7c27
fix(win): delay when closing windows (#81)
## Description
`vim.keymap.set` was missing the `nowait = true`
2024-11-16 06:59:03 +01:00
Iordanis Petkakis
bc80bdcc62
fix(notifier): no gap in border without title/icon (#85)
## Description
Don't put padding with no title and no icon, so that there is no gap in
the border.
<!-- Describe the big picture of your changes to communicate to the
maintainers
  why we should accept this pull request. -->

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

## Screenshots

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

---------

Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
2024-11-16 06:58:28 +01:00
Folke Lemaitre
797708b038 feat(config)!: plugins are no longer enabled by default. Pass any options, or set enabled = true. 2024-11-14 23:56:37 +01:00
Folke Lemaitre
1c4c74828f feat(health): added health checks to plugins 2024-11-14 23:56:37 +01:00
Folke Lemaitre
14c7875408
docs(terminal): add --color=always to example for Snacks.terminal.colorize() 2024-11-14 14:03:20 +01:00
Folke Lemaitre
0de2599b0a
docs(terminal): show as sh 2024-11-14 09:15:43 +01:00
Folke Lemaitre
519b6841c4
feat(terminal): added Snacks.terminal.colorize() to replace ansi codes by colors 2024-11-14 09:12:59 +01:00
Folke Lemaitre
14f076e039
fix(lazygit): not needed to use deprecated fallback for set_hl 2024-11-14 09:12:27 +01:00
Folke Lemaitre
215b8b3705
docs: docgen 2024-11-13 10:44:36 +01:00