Commit graph

1315 commits

Author SHA1 Message Date
Folke Lemaitre
3866fbcd40
feat(blink): add <c-y> to keymaps 2024-12-14 07:42:25 +01:00
Folke Lemaitre
5105f3c029
style(blink): make luals happy 2024-12-13 22:54:52 +01:00
Folke Lemaitre
b07378dde4
fix(blink): only override color symbol kind for blink 2024-12-13 22:54:38 +01:00
Folke Lemaitre
63eab6d9a5
fix(blink): compat with 0.7.6 2024-12-13 22:46:09 +01:00
Iordanis Petkakis
08a7f7e3f9
fix(blink): draw.treesitter expects table (#5044)
## Description
If you would like to enable more sources feel free. I just went with the
recommended setting in blink's default configuration. Although on their
repo the have it to empty table, but I assumed since you had it to
`true` you would at least want the `lsp` source.
<!-- Describe the big picture of your changes to communicate to the
maintainers
  why we should accept this pull request. -->

## Related Issue(s)

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

## Screenshots

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

## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
2024-12-13 22:37:25 +01:00
Folke Lemaitre
1517ec9bb4
fix(blink): add backward compat for config 2024-12-13 21:08:48 +01:00
Jorge Villalobos
4488cb24f7
feat(blink): use block vs. icon for colors (#5037)
## Description

Replace use of icon for `Color` kind with block characters for
`blink.cmp` autocomplete items to make swatches more usable. This also
makes the `blink.cmp` built-in Tailwind integration better match
`nvim-cmp`.

**Note:** I didn't want to replace the default
`LazyVim.config.icons.kinds.Color` in case it's used by other plugins
(e.g. context), but didn't actually find any real uses, so perhaps that
could be done instead? Figured best to leave those untouched as they can
be more generically used as actual icons, and are not always guaranteed
to have custom highlights applied.

## Related Issue(s)

None.

## Screenshots

### Old

![Screenshot 2024-12-13 at 12 18
47](https://github.com/user-attachments/assets/1e73dac9-728d-47ba-8df1-4445b0143177)

### New

![Screenshot 2024-12-13 at 12 18
13](https://github.com/user-attachments/assets/1ff042f1-eda4-4a1b-afcd-658075666eeb)

## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
2024-12-13 20:18:25 +01:00
Folke Lemaitre
60b77045d5
fix(cmp): disable nvim-cmp/blink.cmp when needed 2024-12-13 19:56:03 +01:00
Folke Lemaitre
20eff4fc3f
fix(blink): disable cmdline integration for now since it doesn't work well with the enter keymap 2024-12-13 09:31:42 +01:00
iniw
94f6df048f
feat(rust): exclude bad directories from rust-analyzer (#5021)
## Description

rust-analyzer is unfortunately not smart enough to use a folder's
.gitignore (or similar) when looking for rust files to analyze, meaning
that when it finds a large enough folder (e.g: .git, .direnv) it
completely dies going through it searching for rust files.

This commit adds a filter of common folders that are big enough to
potentially choke rust-analyzer. The list could be amended in the
future.

## Checklist

- [X] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
2024-12-13 07:28:09 +01:00
Jorge Villalobos
29c4dea4e7
fix(blink): unset provider.kind (#5024)
## Description

Unsets `sources.providers[provider].kind` custom properties to pass
blink.cmp config validation.

## Related Issue(s)

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

## Screenshots

![Screenshot 2024-12-12 at 23 21
47](https://github.com/user-attachments/assets/21866a51-d0d5-4ee5-9cc3-3ce7f2eb6415)

## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
2024-12-13 07:25:42 +01:00
Folke Lemaitre
d95e530c02
fix(blink): remove unneeded code 2024-12-13 00:33:52 +01:00
Folke Lemaitre
29460318f3
fix(blink): unset sources.compat. Fixes #5016. Closes #5017 2024-12-13 00:25:53 +01:00
iniw
5b1b6b29d7
fix(java): only setup debug adapter config if mason is installed (for real this time) (#5014)
## Description

This one *actually* fixes the issue, sorry about my previous PR.
2024-12-12 19:37:08 +01:00
iniw
aad0edbf74
fix(java): only setup debug adapter config if mason is installed (#5013)
## Description
This prevents the following error when opening java files when mason is
disabled (e.g: NixOS)

```
Failed to run `config` for nvim-jdtls

...im/lazy/LazyVim/lua/lazyvim/plugins/extras/lang/java.lua:149: module 'mason-registry' not found:
	no field package.preload['mason-registry']
cache_loader: module mason-registry not found
cache_loader_lib: module mason-registry not found
	no file '/nix/store/j3563y13yim4m7qdwk0m8h22648wbifj-luajit-2.1.1713773202-env/share/lua/5.1/mason-registry.lua'
	no file '/nix/store/j3563y13yim4m7qdwk0m8h22648wbifj-luajit-2.1.1713773202-env/share/lua/5.1/mason-registry/init.lua'
	no file '/nix/store/j3563y13yim4m7qdwk0m8h22648wbifj-luajit-2.1.1713773202-env/lib/lua/5.1/mason-registry.so'

# stacktrace:
  - /LazyVim/lua/lazyvim/plugins/extras/lang/java.lua:149 _in_ **config**
  - /nix/store/xgn4baapvvk35ssi47bsmmyawl83917g-neovim-unwrapped-0.10.2/share/nvim/runtime/filetype.lua:36
  - /nix/store/xgn4baapvvk35ssi47bsmmyawl83917g-neovim-unwrapped-0.10.2/share/nvim/runtime/filetype.lua:35
```

## Checklist

- [X] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
2024-12-12 18:58:39 +01:00
Ughur Alakbarov
21b02f056d
fix(java): only use mason-registry if mason installed (#4991)
## Description
The current config breaks when mason is not installed (e.g. for Nix
users). This PR makes the mason-related functionality (which, as of now,
consists only of finding `lombok`) dependent on mason being installed.
As noted in the commit, this does make it impossible to use lombok
without mason, but I'm unaware of any other method of finding it (which
is why mason-registry was used in the first place, I assume)

Please note that I'm not very experienced with Lua and the code might be
not the most idiomatic one.

## Related Issue(s)

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

## Screenshots

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

## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.

Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
2024-12-12 18:15:53 +01:00
Folke Lemaitre
adf8db69ed
fix(nvim-cmp): set high prio for loading the nvim-cmp extra to prevent issues with opts 2024-12-12 16:54:34 +01:00
iniw
c4b0d6d0d1
fix(clangd): avoid nil-indexing the completion sorting comparators (#5011)
## Description

This prevents the following popup appearing when opening nvim:

```
Failed to run `config` for nvim-cmp

.../lazy/LazyVim/lua/lazyvim/plugins/extras/lang/clangd.lua:108: attempt to index field 'sorting' (a nil value)

# stacktrace:
  - /LazyVim/lua/lazyvim/plugins/extras/lang/clangd.lua:108 _in_ **values**
  - ~/.config/nvim/lua/config/lazy.lua:17
  - ~/.config/nvim/init.lua:2
  
```

## Checklist

- [X] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
2024-12-12 16:51:34 +01:00
Folke Lemaitre
98c77f1de4
fix(mini.indentscope): disable snacks and indent-blankline scope 2024-12-12 16:44:28 +01:00
Folke Lemaitre
94be6fb787
fix(clangd): nvim-cmp optional 2024-12-12 16:43:25 +01:00
Folke Lemaitre
a9a273d041
fix: fqn for nvim-cmp 2024-12-12 14:45:47 +01:00
Folke Lemaitre
34d2bdcac6 fix(copliot): restructure copilot-cmp spec 2024-12-12 13:47:29 +01:00
Folke Lemaitre
bdc865b291 style: typo 2024-12-12 13:47:29 +01:00
Folke Lemaitre
a8332c6d50 feat(snacks): added profiler keymaps 2024-12-12 13:47:29 +01:00
Folke Lemaitre
54bece17b3 feat(snacks): added snacks.input 2024-12-12 13:47:29 +01:00
Folke Lemaitre
ec92fa8558 fix(git): make nvim-cmp optional for the git extra 2024-12-12 13:47:29 +01:00
Folke Lemaitre
ba632c500d refactor(snacks): move snacks specs to ui/util so that they show up in the generated docs 2024-12-12 13:47:29 +01:00
Folke Lemaitre
88e77b0e24 fix(nvim-cmp): specs 2024-12-12 13:47:29 +01:00
Folke Lemaitre
7bc8490d46 feat(lualine): add snacks profiler status 2024-12-12 13:47:29 +01:00
Folke Lemaitre
6d774ba8f2 fix(ui): use Snacks.util.color instead of LazyVim.ui.fg 2024-12-12 13:47:29 +01:00
Folke Lemaitre
152f9d113f feat(cmp)!: moved nvim-cmp to extras and prefer blink.cmp on Neovim >= 0.10 as default completion engine 2024-12-12 13:47:29 +01:00
Folke Lemaitre
2cbfb9b6b7 feat(cmp)!: moved nvim-cmp to extras and prefer blink.cmp on Neovim >= 0.10 as default completion engine 2024-12-12 13:47:29 +01:00
Folke Lemaitre
d904a1ef47 feat(snacks)!: use snacks.scope indent objects in favor of custom mini.ai indent objects 2024-12-12 13:47:29 +01:00
Folke Lemaitre
1a1a48497c feat(snacks): enable snacks.scroll 2024-12-12 13:47:29 +01:00
Folke Lemaitre
94fdc421a1 feat(snacks)!: use snacks.indent and moved indent-blankline to extras 2024-12-12 13:47:29 +01:00
Folke Lemaitre
9b07544e89 fix(mini.animate): disable snacks.scroll when mini.animate is enabled 2024-12-12 13:47:29 +01:00
Folke Lemaitre
44c712aa31 feat(which-key): make helix the default which-key preset 2024-12-12 13:47:29 +01:00
Stefan Boca
cee60a6d30
fix(blink): set kind to int, not string, if overriding (#4999)
## Description

when sorting completion results, blink compares kinds, which can result
in an error if the kind is a string

## Related Issue(s)

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

## Screenshots

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

## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
2024-12-12 06:29:08 +01:00
Valentin Degenne
8c79ab601a
feat(luasnip): add default user snippet location (#4987)
## Description

Loads snippets in user directories if it exists.

## Checklist

- [X] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
2024-12-11 11:13:57 +01:00
Folke Lemaitre
439340bd8a
fix(blink): config breaking changes. Fixes #4990 2024-12-11 10:57:09 +01:00
deniz gökçin
9ad1c49b67
feat(vscode): add vscode-specific keymaps and sync undo/redo with vscode (#4983)
## Summary
This pull request introduces several new keymaps specifically for VSCode
when using LazyVim. These changes aim to enhance the integration between
VSCode and LazyVim by adding keymaps for, tab navigation, and syncing
nvim undo/redo actions with vscode undo/redo.

## Changes
- Synced undo/redo lists with VSCode using `VSCodeNotify`: (check
https://github.com/vscode-neovim/vscode-neovim/issues/1139 for more
details)
  - `u` for undo
  - `<C-r>` for redo
- Enabled navigation of VSCode tabs similar to LazyVim buffers:
  - `<S-h>` to go to the previous editor
  - `<S-l>` to go to the next editor

## Additional Notes
These changes are intended to improve the user experience for those who
use LazyVim within VSCode by providing more intuitive and consistent
keybindings. Please test these keymaps to ensure they work as expected
in your VSCode setup.

Co-authored-by: Deniz Gökçin <deniz.gokcin@treatwell.com>
2024-12-10 12:13:01 +01:00
Folke Lemaitre
7ef2dfd3ba
fix(dot): kitty ft with bash treesitter highlights 2024-12-07 20:52:48 +01:00
Folke Lemaitre
3f4b1ff003
fix(mini.diff): toggle 2024-12-07 20:52:13 +01:00
Folke Lemaitre
2ebba15e12
feat(git): added toggles for gitsigns.nvim and mini.diff 2024-12-07 11:57:21 +01:00
Felix Rath
5ddad99bac
fix(rust): only use mason.nvim if it is present (#4963)
## Description

Fix the lang/rust extra for users that don't use mason. Uses the fix
suggested in
https://github.com/LazyVim/LazyVim/issues/4957#issuecomment-2521787846,
which works perfectly!

## Related Issue(s)

Fixes https://github.com/LazyVim/LazyVim/issues/4957

## Screenshots

n/a

## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.

Co-authored-by: Felix Rath <frath@cloudflare.com>
2024-12-06 16:35:27 +01:00
Matteo Bigoi
ea794ffd94
feat(rust): add bacon-ls and improve debugging (#3212)
## Changes

**NOTE: the PR will be in draft until
https://github.com/mason-org/mason-registry/pull/5774 is not merged**

Some improvements in the Rust extra

- Set `codelldb` adapter for rustacean.nvim
- Add support for [bacon-ls](https://github.com/crisidev/bacon-ls)
([blog post](https://lmno.lol/crisidev/bacon-language-server))

`bacon-ls` can be used as an alternative to `rust-analyzer` for
diagnostics, improving `rust-analyzer` performances. This is configured
by `vim.g.lazyvim_rust_diagnostics`, which can be set to `rust-analyzer`
or `bacon-lsp`.

<img width="1063" alt="screenshot"
src="f50a38ff-0ec0-4d10-8cdc-796d027b16f0">

---------

Co-authored-by: Iordanis Petkakis <12776461+dpetka2001@users.noreply.github.com>
2024-12-05 09:20:34 +01:00
Stefan Boca
83017ff28a
fix(extras.treesitter-context): change event back to LazyFile (#4940)
## Description

Load treesitter-context on `LazyFile` instead of `VeryLazy`. IMHO it
didn't make sense to load the plugin earlier just so that the toggle is
available, especially when the toggle won't actually have any effect
anything until a file is opened.

~Previously, treesitter-context was loaded on `VeryLazy` and its toggle
map in `opt`, which also `require`d it. Now, mapping happens in config,
after treesitter-context is setup (also how toggle is handled in other
extras, eg for render-markdown).~

## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
2024-12-05 09:11:40 +01:00
Álvaro Kothe
12e37529e7
fix(tex): specify filetype for <localleader>l (#4905)
## Description

Specify the filetype for the keymap `<localleader>l` to ensure that this
keybinding group only appears when editing TeX files.

## Related Issue(s)

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

## Screenshots

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

## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
2024-12-05 09:11:11 +01:00
Stefan Boca
bfe29fb013
fix(ui): actually disable mini-indentscope on snacks_dashboard (#4947)
## Description

Disables mini.indentscope for the buffer on which the
`SnacksDashboardOpened` autocmd is called.

## Related Issue(s)

closes #4944

## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
2024-12-05 09:10:44 +01:00
jyuan0
090ca75d3b
fix(blink): update config for latest changes (#4953)
## Description

Update the blink.cmp config for the latest changes.

Mainly fixing the experimental `auto_brackets` support (moved under the
`completion` key). The other changes are either the same as the
defaults, or commented out - they were simply updated to reflect the new
config format.

## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
2024-12-05 08:46:15 +01:00