Commit graph

1303 commits

Author SHA1 Message Date
Folke Lemaitre
dc65ffd4f5
fix(dashboard): pcall chansend for dashoard terminal widgets 2025-09-27 09:39:06 +02:00
nickx00
7a5eb1036a
fix(explorer): mounted directories being detected as non-directories in Tree:expand (#2053)
## Description

In certain filesystems — such as bind mounts, NFS, FUSE, or other
mounted paths — uv.fs_scandir_next() may return a nil type for valid
directories. This causes the snacks.nvim explorer to treat mounted
folders as files, making them unexpandable in the UI.

This patch adds a fallback to resolve the correct type when
fs_scandir_next() returns nil. It uses uv.fs_stat() first, and falls
back to vim.fn.isdirectory() if needed.

This ensures that mounted directories are properly marked as navigable.

Code change summary:

- Inside Tree:expand, we now check t == nil
- If so, we call uv.fs_stat() to get the true type
- If fs_stat fails, we fallback to vim.fn.isdirectory
- Final dir = true logic remains intact

Impact:
- Fixes a long-standing bug in mounted directories under /mnt, FUSE,
etc.
- Only runs extra checks when needed (no performance hit for regular
files)
- No changes elsewhere — clean, isolated patch

## Related Issue(s)
  - Fixes #2036

## Screenshots

before:
<img width="1907" height="946" alt="image"
src="https://github.com/user-attachments/assets/15e1b8a5-c999-49e8-8ab5-1d23c60e4969"
/>

after:
<img width="343" height="902" alt="Screenshot_20250715_222920"
src="https://github.com/user-attachments/assets/c7ca2fa0-e0cc-4e3d-a4bb-5345538408f7"
/>

---------

Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
2025-09-25 12:45:01 +02:00
Folke Lemaitre
12b2f0d2bd
fix(picker.preview): dont do win-local hack for floating windows 2025-09-24 18:26:02 +02:00
Folke Lemaitre
c968d4def4
fix(picker.preview): better hack to deal with buffer local option weirdness 2025-09-24 18:21:05 +02:00
Folke Lemaitre
fb016d20c2
perf(dashboard): add basic OSC11 and CSI6n support to terminal sections (gh 10 seconds faster) 2025-09-17 20:39:44 +02:00
Noor
2ab82a4e88
docs(mini): update URLs for nvim-mini related plugins (#2189)
## Description

All plugins related to the mini.nvim project has been relocated to a
GitHub organization, as announced here:

https://github.com/nvim-mini/mini.nvim/discussions/1970

This commit updates all related URL:s in the documentation to refer to
the repositories for each plugin at the new organization.

## Related Issue(s)

N/A

## Screenshots

N/A
2025-09-17 15:36:48 +02:00
Folke Lemaitre
e409f31cc9
fix(indent): check that win is valid in step. Closes #1943 2025-09-17 08:23:26 +02:00
Alexander Siryk
32e5bf1730
fix(util): fix invalid window error (#1996)
## Description

Add check if win id is valid to prevent errors when opening buffers
using Harpoon, or Diffview.

## Related Issue(s)

- Fixes #1968

## Screenshots

<img width="1391" alt="image"
src="https://github.com/user-attachments/assets/daa8cbd1-7104-4c5d-8cae-d50a900b6c76"
/>

<img width="1690" alt="image"
src="https://github.com/user-attachments/assets/6dd9cae6-fc3f-4a5e-b5ae-6fc1e4afeeca"
/>
2025-09-17 08:23:19 +02:00
Folke Lemaitre
a0d6eba1a2
fix(picker): lsp_config now includes any configfured LSP and excludes deprecated servers 2025-09-16 11:57:17 +02:00
Folke Lemaitre
292d46f773
feat(picker): updated Snacks.picker.lsp_config to work with vim.lsp.config 2025-09-16 09:18:10 +02:00
Folke Lemaitre
07fefd2a99
fix(lsp): fix deprecated warnings related to lsp client 2025-09-15 07:42:46 +02:00
Folke Lemaitre
bc0630e43b
feat(image.inline): honor concealcursor and hide conceal when selecting lines. Closes #1478
Some checks failed
CI / ci (push) Failing after 0s
2025-03-01 23:37:02 +01:00
Folke Lemaitre
cddf714dd6
fix(indent): zero indent for blank lines. Closes #1477 2025-03-01 23:18:47 +01:00
Folke Lemaitre
bc2ed15c41
fix(image): only show anchor icon for inline images shown on the lines below. Closes #1479 2025-03-01 22:58:56 +01:00
Folke Lemaitre
f970cbb258
fix(explorer): confirm prompt now defaults to No 2025-03-01 17:36:57 +01:00
Folke Lemaitre
e55ae37beb
perf(image): async treesitter parsing for images 2025-03-01 17:33:53 +01:00
Folke Lemaitre
5315e267ff
feat(scope): allow disabling scopes with vim.g.snacks_scope = false or vim.b.snacks_scope = false. Closes #1463 2025-03-01 09:56:24 +01:00
folke
cc04806393 chore(build): auto-generate docs 2025-03-01 08:49:34 +00:00
Folke Lemaitre
3d695ab7d0
feat(picker.git): added all option to also list remote branched for git_branches. Closes #1465 2025-03-01 09:48:31 +01:00
Folke Lemaitre
78f0ad6ce7
fix(input): add cr keybind for normal mode. Closes #1468. Closes #1466 2025-03-01 09:34:17 +01:00
Folke Lemaitre
d9bb639fed
fix(image.inline): remove debug 2025-03-01 08:08:50 +01:00
Folke Lemaitre
6ea4fa72dc
feat(image): proper inline rendering of math expressions. Closes #1318. Closes #1454 2025-03-01 08:01:11 +01:00
Folke Lemaitre
6917597f6d
fix(util.spawn): correctly mark as faild on abort 2025-03-01 07:54:16 +01:00
Folke Lemaitre
9f0aa20489
feat(util): small ts parse wrapper that parses async when available 2025-03-01 07:53:55 +01:00
Folke Lemaitre
8b0e79ab4c
fix(dashboard): escape filenames for edit. Closes #1453 2025-02-27 08:36:29 +01:00
Folke Lemaitre
1239fb84bc
fix(statuscolumn): better way of determining open folds. Closes #1445 2025-02-26 14:09:01 +01:00
Folke Lemaitre
fa29c6c926
revert: dont always set border when setting title. Closes #1436 2025-02-26 07:55:13 +01:00
Folke Lemaitre
f0d34336db
fix(picker.preview): always use builtin for git log preview 2025-02-25 21:18:06 +01:00
Folke Lemaitre
76311aba31
fix(win): make sure the border is set when setting the title 2025-02-25 20:25:53 +01:00
Folke Lemaitre
e2cb9df7d0
feat(util): util method to check if ts lang is available on any Neovim version. See #1422 2025-02-25 15:25:48 +01:00
Folke Lemaitre
b0f983ef9a
fix(picker): allow overriding winhl of layout box wins. Closes #1424 2025-02-25 14:40:28 +01:00
Folke Lemaitre
91c3da0b4b
fix(picker.buffers): add a flag when buffer is visible in a window. See #1417 2025-02-25 14:29:37 +01:00
Folke Lemaitre
cf47fa7cee
fix(picker.recent): expand to full path before normalizing. Closes #1406 2025-02-25 13:58:47 +01:00
Folke Lemaitre
c864a7d378
feat(picker.input): added some ctrl+r keymaps similar to cmdline. Closes #1420 2025-02-25 13:53:12 +01:00
Folke Lemaitre
4ce197bff9
fix(scope): use rawequal to check if scope impl is treesitter. Closes #1413 2025-02-25 10:48:04 +01:00
Folke Lemaitre
33df54dae7
fix(picker): remove unused keymaps for mouse scrolling 2025-02-25 09:13:45 +01:00
Folke Lemaitre
1b63b1811c
fix(image.terminal): write queued terminal output on main 2025-02-24 11:27:39 +01:00
Folke Lemaitre
4c52b7f25d
fix(scroll): compat with Neovim 0.9.4 2025-02-24 10:34:25 +01:00
Folke Lemaitre
842605f072
fix(compat): properly detect async treesitter parsing 2025-02-24 10:28:22 +01:00
Andrei Heidelbacher
041bf1da9e
fix(zen): always count cmdheight towards Zen bottom offset (#1402)
## Description

Zen window height should always account for `cmdheight` (not only if
`statusline` is enabled) and be computed dynamically when `cmdheight >
0` to avoid the `cmdline` obstructing the Zen window.

## Related Issue(s)

- Fixes https://github.com/folke/snacks.nvim/issues/1401
- Fixes https://github.com/folke/snacks.nvim/issues/1375

## Screenshots

Before:
![zen-mode-cmdline](https://github.com/user-attachments/assets/c03be4af-2368-4b04-8065-49ced875aa2d)

After:
![zen-mode-fixed-cmdline](https://github.com/user-attachments/assets/14dc72bb-7431-4d05-b0fd-b6a2367bdc6d)
2025-02-24 07:19:28 +01:00
Folke Lemaitre
e0f882e6d6
perf(scope): use async treesitter parsing when available 2025-02-23 09:21:02 +01:00
Folke Lemaitre
dd15e3a05a
fix(statuscolumn): right-align the current line number when relativenumber=true. Closes #1376 2025-02-23 08:37:11 +01:00
Folke Lemaitre
2b34c4dc05
fix(image.terminal): reset queue when timer runs 2025-02-23 08:13:00 +01:00
Folke Lemaitre
b100c93717
fix(win): use correct keys for displaying help. Closes #1364 2025-02-22 08:04:06 +01:00
Folke Lemaitre
ceabfc1b89
fix(compat): fixup 2025-02-22 07:53:29 +01:00
Folke Lemaitre
2295cfcca5
fix(compat): vim.fs.normalize. Closes #1321 2025-02-22 07:48:54 +01:00
iniw
54298eb624
fix(picker): disable regex for grep_word (#1363)
## Related Issue(s)
- Fixes #1361
2025-02-21 19:25:46 +01:00
Folke Lemaitre
a00c323d4b
fix(win): don't update title is relative win is invalid. Closes #1348 2025-02-21 08:06:52 +01:00
Folke Lemaitre
5fa93cb684
fix(image.placement): max width/height in cells is 297. Closes #1345
Some checks failed
CI / ci (push) Failing after 0s
2025-02-20 18:12:49 +01:00
Folke Lemaitre
47e1440d54
fix(dim): check that win is valid when animating dim. Closes #1342 2025-02-20 17:17:17 +01:00