Compare commits

..

65 Commits

Author SHA1 Message Date
d30e9e31eb chore(main): release 14.1.0 (#5043)
🤖 I have created a release *beep* *boop*
---


##
[14.1.0](https://github.com/LazyVim/LazyVim/compare/v14.0.2...v14.1.0)
(2024-12-13)


### Features

* **blink:** use block vs. icon for colors
([#5037](https://github.com/LazyVim/LazyVim/issues/5037))
([4488cb2](4488cb24f7))


### Bug Fixes

* **blink:** add backward compat for config
([1517ec9](1517ec9bb4))

---
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-12-13 21:10:19 +01:00
1517ec9bb4 fix(blink): add backward compat for config 2024-12-13 21:08:48 +01:00
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
d2ba0473f0 chore(main): release 14.0.2 (#5042)
🤖 I have created a release *beep* *boop*
---


##
[14.0.2](https://github.com/LazyVim/LazyVim/compare/v14.0.1...v14.0.2)
(2024-12-13)


### Bug Fixes

* **cmp:** disable nvim-cmp/blink.cmp when needed
([60b7704](60b77045d5))
* **cmp:** wrong extras check for nvim-cmp
([009e358](009e3587be))

---
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-12-13 19:58:07 +01:00
60b77045d5 fix(cmp): disable nvim-cmp/blink.cmp when needed 2024-12-13 19:56:03 +01:00
009e3587be fix(cmp): wrong extras check for nvim-cmp 2024-12-13 19:53:18 +01:00
9a0d14dcf5 chore(main): release 14.0.1 (#5033)
🤖 I have created a release *beep* *boop*
---


##
[14.0.1](https://github.com/LazyVim/LazyVim/compare/v14.0.0...v14.0.1)
(2024-12-13)


### Bug Fixes

* **NEWS:** typo
([0fd7140](0fd7140a6d))

---
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-12-13 17:27:22 +01:00
0fd7140a6d fix(NEWS): typo 2024-12-13 17:21:37 +01:00
5a503c556a docs: fix NEWS link to blink.cmp 2024-12-13 16:57:55 +01:00
f3a919d23d chore(main): release 14.0.0 (#5008)
🤖 I have created a release *beep* *boop*
---


##
[14.0.0](https://github.com/LazyVim/LazyVim/compare/v13.9.1...v14.0.0)
(2024-12-13)


### ⚠ BREAKING CHANGES

* **cmp:** moved `nvim-cmp` to extras and prefer `blink.cmp` on Neovim
>= `0.10` as default completion engine
* **cmp:** moved `nvim-cmp` to extras and prefer `blink.cmp` on Neovim
>= `0.10` as default completion engine
* **snacks:** use `snacks.scope` indent objects in favor of custom
`mini.ai` indent objects
* **snacks:** use `snacks.indent` and moved `indent-blankline` to extras
* **pick:** make fzf the default picker for LazyVim

### Features

* **cmp:** moved `nvim-cmp` to extras and prefer `blink.cmp` on Neovim
&gt;= `0.10` as default completion engine
([152f9d1](152f9d113f))
* **cmp:** moved `nvim-cmp` to extras and prefer `blink.cmp` on Neovim
&gt;= `0.10` as default completion engine
([2cbfb9b](2cbfb9b6b7))
* **keymaps:** added leader-uD to toggle dim mode
([9b97388](9b973882b8))
* **keymaps:** added leader-z to toggle zen mode
([e6d6a09](e6d6a096b3))
* **keymaps:** added leader-Z to toggle zoom
([f2e1cac](f2e1cac965))
* **lualine:** add snacks profiler status
([7bc8490](7bc8490d46))
* **pick:** make fzf the default picker for LazyVim
([ae2340f](ae2340f60a))
* **rust:** exclude bad directories from rust-analyzer
([#5021](https://github.com/LazyVim/LazyVim/issues/5021))
([94f6df0](94f6df048f))
* **snacks:** added `snacks.input`
([54bece1](54bece17b3))
* **snacks:** added leader-ua to toggle global animations
([303980d](303980d267))
* **snacks:** added leader-ug to toggle indent guides
([b3ac642](b3ac642317))
* **snacks:** added leader-uS to toggle scroll
([cded8d4](cded8d4d28))
* **snacks:** added profiler keymaps
([a8332c6](a8332c6d50))
* **snacks:** enable `snacks.scroll`
([1a1a484](1a1a48497c))
* **snacks:** use `snacks.indent` and moved `indent-blankline` to extras
([94fdc42](94fdc421a1))
* **snacks:** use `snacks.scope` indent objects in favor of custom
`mini.ai` indent objects
([d904a1e](d904a1ef47))
* **snacks:** use `Snacks.zen.zoom()` instead of custom **maximize**
([e389a5a](e389a5ada9))
* **which-key:** make `helix` the default which-key preset
([44c712a](44c712aa31))
* **zen:** zoom with leader-wm and leader-uZ. zen with leader-uz
([2acedaa](2acedaa3a8))


### Bug Fixes

* **blink:** disable cmdline integration for now since it doesn't work
well with the enter keymap
([20eff4f](20eff4fc3f))
* **blink:** remove unneeded code
([d95e530](d95e530c02))
* **blink:** unset provider.kind
([#5024](https://github.com/LazyVim/LazyVim/issues/5024))
([29c4dea](29c4dea4e7))
* **blink:** unset sources.compat. Fixes
[#5016](https://github.com/LazyVim/LazyVim/issues/5016). Closes
[#5017](https://github.com/LazyVim/LazyVim/issues/5017)
([2946031](29460318f3))
* **clangd:** avoid nil-indexing the completion sorting comparators
([#5011](https://github.com/LazyVim/LazyVim/issues/5011))
([c4b0d6d](c4b0d6d0d1))
* **clangd:** nvim-cmp optional
([94be6fb](94be6fb787))
* **copliot:** restructure copilot-cmp spec
([34d2bdc](34d2bdcac6))
* fqn for nvim-cmp
([a9a273d](a9a273d041))
* **git:** make nvim-cmp optional for the git extra
([ec92fa8](ec92fa8558))
* **java:** only setup debug adapter config if mason is installed
([#5013](https://github.com/LazyVim/LazyVim/issues/5013))
([aad0edb](aad0edbf74))
* **java:** only setup debug adapter config if mason is installed (for
real this time)
([#5014](https://github.com/LazyVim/LazyVim/issues/5014))
([5b1b6b2](5b1b6b29d7))
* **java:** only use mason-registry if mason installed
([#4991](https://github.com/LazyVim/LazyVim/issues/4991))
([21b02f0](21b02f056d))
* **mini.animate:** disable `snacks.scroll` when `mini.animate` is
enabled
([9b07544](9b07544e89))
* **mini.indentscope:** disable snacks and indent-blankline scope
([98c77f1](98c77f1de4))
* **nvim-cmp:** set high prio for loading the nvim-cmp extra to prevent
issues with opts
([adf8db6](adf8db69ed))
* **nvim-cmp:** specs
([88e77b0](88e77b0e24))
* **ui:** use `Snacks.util.color` instead of `LazyVim.ui.fg`
([6d774ba](6d774ba8f2))

---
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-12-13 16:39:33 +01:00
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
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
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
b0808cb31f chore(build): auto-generate docs 2024-12-13 06:24:40 +00:00
a396a2462f docs(README): add fzf dependencies to docker (#5020)
## Description

<!-- Describe the big picture of your changes to communicate to the
maintainers
  why we should accept this pull request. -->
With the picker and completion changes, fzf and curl need to be
installed as part of the try it with docker instructions.

## 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 07:23:41 +01:00
d95e530c02 fix(blink): remove unneeded code 2024-12-13 00:33:52 +01:00
29460318f3 fix(blink): unset sources.compat. Fixes #5016. Closes #5017 2024-12-13 00:25:53 +01:00
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
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
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
8b8e322b68 docs: fixed keymaps in NEWS 2024-12-12 17:38:42 +01:00
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
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
98c77f1de4 fix(mini.indentscope): disable snacks and indent-blankline scope 2024-12-12 16:44:28 +01:00
94be6fb787 fix(clangd): nvim-cmp optional 2024-12-12 16:43:25 +01:00
a9a273d041 fix: fqn for nvim-cmp 2024-12-12 14:45:47 +01:00
3a67abdf6d docs: updated NEWS.md 2024-12-12 13:47:29 +01:00
34d2bdcac6 fix(copliot): restructure copilot-cmp spec 2024-12-12 13:47:29 +01:00
bdc865b291 style: typo 2024-12-12 13:47:29 +01:00
a8332c6d50 feat(snacks): added profiler keymaps 2024-12-12 13:47:29 +01:00
2acedaa3a8 feat(zen): zoom with leader-wm and leader-uZ. zen with leader-uz 2024-12-12 13:47:29 +01:00
54bece17b3 feat(snacks): added snacks.input 2024-12-12 13:47:29 +01:00
cded8d4d28 feat(snacks): added leader-uS to toggle scroll 2024-12-12 13:47:29 +01:00
b3ac642317 feat(snacks): added leader-ug to toggle indent guides 2024-12-12 13:47:29 +01:00
ec92fa8558 fix(git): make nvim-cmp optional for the git extra 2024-12-12 13:47:29 +01:00
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
303980d267 feat(snacks): added leader-ua to toggle global animations 2024-12-12 13:47:29 +01:00
88e77b0e24 fix(nvim-cmp): specs 2024-12-12 13:47:29 +01:00
e6d6a096b3 feat(keymaps): added leader-z to toggle zen mode 2024-12-12 13:47:29 +01:00
f2e1cac965 feat(keymaps): added leader-Z to toggle zoom 2024-12-12 13:47:29 +01:00
9b973882b8 feat(keymaps): added leader-uD to toggle dim mode 2024-12-12 13:47:29 +01:00
7bc8490d46 feat(lualine): add snacks profiler status 2024-12-12 13:47:29 +01:00
6d774ba8f2 fix(ui): use Snacks.util.color instead of LazyVim.ui.fg 2024-12-12 13:47:29 +01:00
e389a5ada9 feat(snacks): use Snacks.zen.zoom() instead of custom **maximize** 2024-12-12 13:47:29 +01:00
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
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
d904a1ef47 feat(snacks)!: use snacks.scope indent objects in favor of custom mini.ai indent objects 2024-12-12 13:47:29 +01:00
1a1a48497c feat(snacks): enable snacks.scroll 2024-12-12 13:47:29 +01:00
94fdc421a1 feat(snacks)!: use snacks.indent and moved indent-blankline to extras 2024-12-12 13:47:29 +01:00
9b07544e89 fix(mini.animate): disable snacks.scroll when mini.animate is enabled 2024-12-12 13:47:29 +01:00
44c712aa31 feat(which-key): make helix the default which-key preset 2024-12-12 13:47:29 +01:00
ae2340f60a feat(pick)!: make fzf the default picker for LazyVim 2024-12-12 13:47:29 +01:00
31af207542 chore(main): release 13.9.1 (#5003)
🤖 I have created a release *beep* *boop*
---


##
[13.9.1](https://github.com/LazyVim/LazyVim/compare/v13.9.0...v13.9.1)
(2024-12-12)


### Bug Fixes

* **blink:** set kind to int, not string, if overriding
([#4999](https://github.com/LazyVim/LazyVim/issues/4999))
([cee60a6](cee60a6d30))

---
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-12-12 13:47:07 +01:00
69e8867a0f chore(build): auto-generate docs 2024-12-12 05:30:09 +00:00
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
475e3f32b8 chore(main): release 13.9.0 (#4979)
🤖 I have created a release *beep* *boop*
---


##
[13.9.0](https://github.com/LazyVim/LazyVim/compare/v13.8.0...v13.9.0)
(2024-12-11)


### Features

* **luasnip:** add default user snippet location
([#4987](https://github.com/LazyVim/LazyVim/issues/4987))
([8c79ab6](8c79ab601a))
* **vscode:** add vscode-specific keymaps and sync undo/redo with vscode
([#4983](https://github.com/LazyVim/LazyVim/issues/4983))
([9ad1c49](9ad1c49b67))


### Bug Fixes

* **autocmds:** remove snacks_win from close_with_q, since they have
their own keymaps
([99c361f](99c361f708))
* **blink:** config breaking changes. Fixes
[#4990](https://github.com/LazyVim/LazyVim/issues/4990)
([439340b](439340bd8a))

---
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-12-12 00:29:18 +01:00
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
87915a1f23 chore(build): auto-generate docs 2024-12-11 09:58:12 +00:00
439340bd8a fix(blink): config breaking changes. Fixes #4990 2024-12-11 10:57:09 +01:00
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
e2c189e066 chore(build): auto-generate docs 2024-12-10 11:10:44 +00:00
1519cd6da7 chore: remove dead code. Closes #4985 2024-12-10 12:09:40 +01:00
4b86cf9900 chore(build): auto-generate docs 2024-12-09 23:32:30 +00:00
99c361f708 fix(autocmds): remove snacks_win from close_with_q, since they have their own keymaps 2024-12-10 00:31:36 +01:00
71ea193cf6 chore(build): auto-generate docs 2024-12-08 20:54:21 +00:00
44 changed files with 703 additions and 502 deletions

View File

@ -1,3 +1,3 @@
{
".": "13.8.0"
".": "14.1.0"
}

View File

@ -1,5 +1,107 @@
# Changelog
## [14.1.0](https://github.com/LazyVim/LazyVim/compare/v14.0.2...v14.1.0) (2024-12-13)
### Features
* **blink:** use block vs. icon for colors ([#5037](https://github.com/LazyVim/LazyVim/issues/5037)) ([4488cb2](https://github.com/LazyVim/LazyVim/commit/4488cb24f72e04dd5adb2e7c0388a51c2b36f4f0))
### Bug Fixes
* **blink:** add backward compat for config ([1517ec9](https://github.com/LazyVim/LazyVim/commit/1517ec9bb46b454d253186aff5e5abd41e96d723))
## [14.0.2](https://github.com/LazyVim/LazyVim/compare/v14.0.1...v14.0.2) (2024-12-13)
### Bug Fixes
* **cmp:** disable nvim-cmp/blink.cmp when needed ([60b7704](https://github.com/LazyVim/LazyVim/commit/60b77045d57d5473e50042b9b879c9c1054e6a10))
* **cmp:** wrong extras check for nvim-cmp ([009e358](https://github.com/LazyVim/LazyVim/commit/009e3587be1badc04c9a8b8b459e8555b405509c))
## [14.0.1](https://github.com/LazyVim/LazyVim/compare/v14.0.0...v14.0.1) (2024-12-13)
### Bug Fixes
* **NEWS:** typo ([0fd7140](https://github.com/LazyVim/LazyVim/commit/0fd7140a6de936edb27a4ba4f4825153ae801c21))
## [14.0.0](https://github.com/LazyVim/LazyVim/compare/v13.9.1...v14.0.0) (2024-12-13)
### ⚠ BREAKING CHANGES
* **cmp:** moved `nvim-cmp` to extras and prefer `blink.cmp` on Neovim >= `0.10` as default completion engine
* **cmp:** moved `nvim-cmp` to extras and prefer `blink.cmp` on Neovim >= `0.10` as default completion engine
* **snacks:** use `snacks.scope` indent objects in favor of custom `mini.ai` indent objects
* **snacks:** use `snacks.indent` and moved `indent-blankline` to extras
* **pick:** make fzf the default picker for LazyVim
### Features
* **cmp:** moved `nvim-cmp` to extras and prefer `blink.cmp` on Neovim &gt;= `0.10` as default completion engine ([152f9d1](https://github.com/LazyVim/LazyVim/commit/152f9d113fa2b4fc2af72d2846c4dd68c31b7596))
* **cmp:** moved `nvim-cmp` to extras and prefer `blink.cmp` on Neovim &gt;= `0.10` as default completion engine ([2cbfb9b](https://github.com/LazyVim/LazyVim/commit/2cbfb9b6b7b9b4bb1c9ce94ad02ab0a851310fc0))
* **keymaps:** added leader-uD to toggle dim mode ([9b97388](https://github.com/LazyVim/LazyVim/commit/9b973882b8bcbab32f850da7c553cdc6388af4ad))
* **keymaps:** added leader-z to toggle zen mode ([e6d6a09](https://github.com/LazyVim/LazyVim/commit/e6d6a096b34ad887b9f954a3f43bcc3fd7833f73))
* **keymaps:** added leader-Z to toggle zoom ([f2e1cac](https://github.com/LazyVim/LazyVim/commit/f2e1cac965e41d7761073856b11bea223cac1e4d))
* **lualine:** add snacks profiler status ([7bc8490](https://github.com/LazyVim/LazyVim/commit/7bc8490d46e002d624f45037fc507e8dd10d4b70))
* **pick:** make fzf the default picker for LazyVim ([ae2340f](https://github.com/LazyVim/LazyVim/commit/ae2340f60a012df125c87fe46e6d98d0be04bd10))
* **rust:** exclude bad directories from rust-analyzer ([#5021](https://github.com/LazyVim/LazyVim/issues/5021)) ([94f6df0](https://github.com/LazyVim/LazyVim/commit/94f6df048fbecfdf2f65ab96156b713555df40dc))
* **snacks:** added `snacks.input` ([54bece1](https://github.com/LazyVim/LazyVim/commit/54bece17b390453ea0beac41e419394d5e0d69ff))
* **snacks:** added leader-ua to toggle global animations ([303980d](https://github.com/LazyVim/LazyVim/commit/303980d267577972bb12e34ef152a0e8b9a953e2))
* **snacks:** added leader-ug to toggle indent guides ([b3ac642](https://github.com/LazyVim/LazyVim/commit/b3ac642317cd60e9b35869068dd74fe779a22146))
* **snacks:** added leader-uS to toggle scroll ([cded8d4](https://github.com/LazyVim/LazyVim/commit/cded8d4d2808250db5ea864fb8e479fd8b5a4a2c))
* **snacks:** added profiler keymaps ([a8332c6](https://github.com/LazyVim/LazyVim/commit/a8332c6d50106cf35e45953cdaa463cbb6c5b085))
* **snacks:** enable `snacks.scroll` ([1a1a484](https://github.com/LazyVim/LazyVim/commit/1a1a48497c53e232b0f525baab87d5f23a2205b2))
* **snacks:** use `snacks.indent` and moved `indent-blankline` to extras ([94fdc42](https://github.com/LazyVim/LazyVim/commit/94fdc421a11b960e116888658dd9b2b85c3b58fc))
* **snacks:** use `snacks.scope` indent objects in favor of custom `mini.ai` indent objects ([d904a1e](https://github.com/LazyVim/LazyVim/commit/d904a1ef47638e4defede775a7f0966fb8e0a2b4))
* **snacks:** use `Snacks.zen.zoom()` instead of custom **maximize** ([e389a5a](https://github.com/LazyVim/LazyVim/commit/e389a5ada955c253771ff5c9f8301e2f17c206d2))
* **which-key:** make `helix` the default which-key preset ([44c712a](https://github.com/LazyVim/LazyVim/commit/44c712aa31e7e05971259841e1f87c9f3d9c6cd5))
* **zen:** zoom with leader-wm and leader-uZ. zen with leader-uz ([2acedaa](https://github.com/LazyVim/LazyVim/commit/2acedaa3a8312e53d84a299bd82d616e1c26328a))
### Bug Fixes
* **blink:** disable cmdline integration for now since it doesn't work well with the enter keymap ([20eff4f](https://github.com/LazyVim/LazyVim/commit/20eff4fc3f55fbeb1e415f0cc5a2d1f3019e5da6))
* **blink:** remove unneeded code ([d95e530](https://github.com/LazyVim/LazyVim/commit/d95e530c02cbb2bcf36da5bb3e235780bdf6d239))
* **blink:** unset provider.kind ([#5024](https://github.com/LazyVim/LazyVim/issues/5024)) ([29c4dea](https://github.com/LazyVim/LazyVim/commit/29c4dea4e75b82ad4b06c21e360eefa3951a3fba))
* **blink:** unset sources.compat. Fixes [#5016](https://github.com/LazyVim/LazyVim/issues/5016). Closes [#5017](https://github.com/LazyVim/LazyVim/issues/5017) ([2946031](https://github.com/LazyVim/LazyVim/commit/29460318f302b6dceaf16bd06c45cb3ed58d5fd8))
* **clangd:** avoid nil-indexing the completion sorting comparators ([#5011](https://github.com/LazyVim/LazyVim/issues/5011)) ([c4b0d6d](https://github.com/LazyVim/LazyVim/commit/c4b0d6d0d1ee11c07c0ab4ed3f87f97b76a6f592))
* **clangd:** nvim-cmp optional ([94be6fb](https://github.com/LazyVim/LazyVim/commit/94be6fb78786e9a53e914db9d5cfab09b13225ba))
* **copliot:** restructure copilot-cmp spec ([34d2bdc](https://github.com/LazyVim/LazyVim/commit/34d2bdcac6fabe5d02e157bffa3475391ca1f7ec))
* fqn for nvim-cmp ([a9a273d](https://github.com/LazyVim/LazyVim/commit/a9a273d041e2dd0e5654b5b492fd29138259fe68))
* **git:** make nvim-cmp optional for the git extra ([ec92fa8](https://github.com/LazyVim/LazyVim/commit/ec92fa85586b4082f04b30ad94cb98b24463665e))
* **java:** only setup debug adapter config if mason is installed ([#5013](https://github.com/LazyVim/LazyVim/issues/5013)) ([aad0edb](https://github.com/LazyVim/LazyVim/commit/aad0edbf749bcbe16e9ef8d2a65a19dd3fe2bd87))
* **java:** only setup debug adapter config if mason is installed (for real this time) ([#5014](https://github.com/LazyVim/LazyVim/issues/5014)) ([5b1b6b2](https://github.com/LazyVim/LazyVim/commit/5b1b6b29d717adeffb0528cffef9f1a3972d3701))
* **java:** only use mason-registry if mason installed ([#4991](https://github.com/LazyVim/LazyVim/issues/4991)) ([21b02f0](https://github.com/LazyVim/LazyVim/commit/21b02f056d924d0a3cb3513b163e3dbdfa9c15ec))
* **mini.animate:** disable `snacks.scroll` when `mini.animate` is enabled ([9b07544](https://github.com/LazyVim/LazyVim/commit/9b07544e89ecead354ef0f17ebc3127f3fa5bbd8))
* **mini.indentscope:** disable snacks and indent-blankline scope ([98c77f1](https://github.com/LazyVim/LazyVim/commit/98c77f1de479b12bc29dc8339fbfe694959d99ed))
* **nvim-cmp:** set high prio for loading the nvim-cmp extra to prevent issues with opts ([adf8db6](https://github.com/LazyVim/LazyVim/commit/adf8db69ed91f8c15fe3cf37df9dc0801dbaeb39))
* **nvim-cmp:** specs ([88e77b0](https://github.com/LazyVim/LazyVim/commit/88e77b0e2439a27d06e95e89839227f1e9446c74))
* **ui:** use `Snacks.util.color` instead of `LazyVim.ui.fg` ([6d774ba](https://github.com/LazyVim/LazyVim/commit/6d774ba8f21f87aaa8bf9dbeb0a84b747541b349))
## [13.9.1](https://github.com/LazyVim/LazyVim/compare/v13.9.0...v13.9.1) (2024-12-12)
### Bug Fixes
* **blink:** set kind to int, not string, if overriding ([#4999](https://github.com/LazyVim/LazyVim/issues/4999)) ([cee60a6](https://github.com/LazyVim/LazyVim/commit/cee60a6d3040181ac9c5b709d79e80e180b34d48))
## [13.9.0](https://github.com/LazyVim/LazyVim/compare/v13.8.0...v13.9.0) (2024-12-11)
### Features
* **luasnip:** add default user snippet location ([#4987](https://github.com/LazyVim/LazyVim/issues/4987)) ([8c79ab6](https://github.com/LazyVim/LazyVim/commit/8c79ab601af19b5370d560aa619567371ac70d86))
* **vscode:** add vscode-specific keymaps and sync undo/redo with vscode ([#4983](https://github.com/LazyVim/LazyVim/issues/4983)) ([9ad1c49](https://github.com/LazyVim/LazyVim/commit/9ad1c49b67a5c4330e366cde41ab11b156de03f2))
### Bug Fixes
* **autocmds:** remove snacks_win from close_with_q, since they have their own keymaps ([99c361f](https://github.com/LazyVim/LazyVim/commit/99c361f708924ddc63599115580bda537cc7f119))
* **blink:** config breaking changes. Fixes [#4990](https://github.com/LazyVim/LazyVim/issues/4990) ([439340b](https://github.com/LazyVim/LazyVim/commit/439340bd8a970aa23d513aea96c93e84b3af42dc))
## [13.8.0](https://github.com/LazyVim/LazyVim/compare/v13.7.0...v13.8.0) (2024-12-07)

61
NEWS.md
View File

@ -1,5 +1,60 @@
# What's new?
## 14.x
Big new release with a lot of changes and improvements!
Two new plugins have been added, and a lot of plugins have been replaced.
With these changes, default **LazyVim** is now just `34` plugins.
### Added Plugins
- [fzf-lua](https://github.com/ibhagwan/fzf-lua) as a replacement for [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim)
- to use **telescope.nvim** instead, enable the `editor.telescope` extra
- [blink.cmp](https://github.com/saghen/blink.cmp) as a replacement for [nvim-cmp](https://github.com/hrsh7th/nvim-cmp)
- to use **nvim-cmp** instead, enable the `coding.nvim-cmp` extra
### Removed Plugins
- [dressing.nvim](https://github.com/stevearc/dressing.nvim) (replaced with [fzf-lua](https://github.com/ibhagwan/fzf-lua) and [snacks.input](https://github.com/folke/snacks.nvim))
- [telescope-fzf-native.nvim](https://github.com/nvim-telescope/telescope-fzf-native.nvim) (replaced with [fzf-lua](https://github.com/ibhagwan/fzf-lua))
- [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) (replaced with [fzf-lua](https://github.com/ibhagwan/fzf-lua))
- [indent-blankline.nvim](https://github.com/lukas-reineke/indent-blankline.nvim) (replaced with [snacks.indent](https://github.com/Folke/snacks.nvim))
- to use **indent-blankline.nvim** instead, enable the `indent-blankline` extra
- [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) (replaced with [blink](https://github.com/Saghen/blink.cmp))
- [nvim-snippets](https://github.com/hrsh7th/vim-vsnip) (replaced with [blink](https://github.com/Saghen/blink.cmp))
- [cmp-buffer](https://github.com/hrsh7th/cmp-buffer) (replaced with [blink](https://github.com/Saghen/blink.cmp))
- [cmp-nvim-lsp](https://github.com/hrsh7th/cmp-nvim-lsp) (replaced with [blink](https://github.com/Saghen/blink.cmp))
- [cmp-path](https://github.com/hrsh7th/cmp-path) (replaced with [blink](https://github.com/Saghen/blink.cmp))
### Changes
- added [`snacks.input`](https://github.com/folke/snacks.nvim/blob/main/docs/input.md)
- added [`snacks.scroll`](https://github.com/folke/snacks.nvim/blob/main/docs/scroll.md)
- added [`snacks.indent`](https://github.com/folke/snacks.nvim/blob/main/docs/indent.md)
- added [`snacks.scope`](https://github.com/folke/snacks.nvim/blob/main/docs/scope.md)
- added [`snacks.dim`](https://github.com/folke/snacks.nvim/blob/main/docs/dim.md)
- added [`snacks.zen`](https://github.com/folke/snacks.nvim/blob/main/docs/zen.md)
- changed default [`which-key`](https://github.com/folke/which-key.nvim) preset to `helix`
- drop `LazyVim.ui.fg` in favor of [`Snacks.util.color`](https://github.com/folke/snacks.nvim/blob/main/docs/util.md)
To disable **all animations**, add the following to your `options.lua`:
```lua
vim.g.snacks_animate = false
```
### Keymaps
- `<leader>uz` to toggle [zen mode](https://github.com/folke/snacks.nvim/blob/main/docs/zen.md)
- `<leader>uZ` & `<leader>wm` to toggle [zoom mode](https://github.com/folke/snacks.nvim/blob/main/docs/zen.md)
- `<leader>uD` to toggle [dimming](https://github.com/folke/snacks.nvim/blob/main/docs/dim.md)
- `<leader>ua` to toggle [animations](https://github.com/folke/snacks.nvim/blob/main/docs/animate.md)
- `<leader>uS` to toggle [scroll](https://github.com/folke/snacks.nvim/blob/main/docs/scroll.md)
- `<leader>ug` to toggle [indent guides](https://github.com/folke/snacks.nvim/blob/main/docs/indent.md)
- [`snacks.profiler`](https://github.com/folke/snacks.nvim/blob/main/docs/profiler.md) keymaps under `<leader>dp`
---
## 13.x
- **LazyVim** now uses `Snacks.dashboard` as the default dashboard.
@ -21,6 +76,8 @@
- `Snacks.terminal` is similar to `lazyterm`, but has more features
and creates bottom splits by default (similar to the `edgy` integrating)
---
## 12.x
- **Markdown Extra**: [headlines.nvim](https://github.com/lukas-reineke/headlines.nvim) has been removed in favor of [markdown.nvim](https://github.com/MeanderingProgrammer/markdown.nvim)
@ -48,6 +105,8 @@
- moved `neoconf.nvim` to extras. Project specific LSP settings
can be done with a `.lazy.lua` file instead.
---
## 11.x
- **Keymaps:**
@ -107,6 +166,8 @@ Additionally, some core plugins have been moved to extras.
- `mini.indentscope` scopes are now also highlighted with `indent-blankline`
- `nvim-treesitter-context`
---
## 10.x
- added new extra for [mini.diff](https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-diff.md)

View File

@ -67,7 +67,7 @@ LazyVim 是一个基于 [💤 lazy.nvim](https://github.com/folke/lazy.nvim) 的
```sh
docker run -w /root -it --rm alpine:edge sh -uelic '
apk add git lazygit neovim ripgrep alpine-sdk --update
apk add git lazygit fzf curl neovim ripgrep alpine-sdk --update
git clone https://github.com/LazyVim/starter ~/.config/nvim
cd ~/.config/nvim
nvim

View File

@ -68,7 +68,7 @@ Sie können eine Startvorlage für **LazyVim** [hier](https://github.com/LazyVim
```sh
docker run -w /root -it --rm alpine:edge sh -uelic '
apk add git lazygit neovim ripgrep alpine-sdk --update
apk add git lazygit fzf curl neovim ripgrep alpine-sdk --update
git clone https://github.com/LazyVim/starter ~/.config/nvim
cd ~/.config/nvim
nvim

View File

@ -67,7 +67,7 @@ LazyVimは、ゼロから始めるか、あらかじめ作成されたディス
```sh
docker run -w /root -it --rm alpine:edge sh -uelic '
apk add git lazygit neovim ripgrep alpine-sdk --update
apk add git lazygit fzf curl neovim ripgrep alpine-sdk --update
git clone https://github.com/LazyVim/starter ~/.config/nvim
cd ~/.config/nvim
nvim

View File

@ -65,7 +65,7 @@ LazyVim은 [💤 lazy.nvim](https://github.com/folke/lazy.nvim)를 기반으로
```sh
docker run -w /root -it --rm alpine:edge sh -uelic '
apk add git lazygit neovim ripgrep alpine-sdk --update
apk add git lazygit fzf curl neovim ripgrep alpine-sdk --update
git clone https://github.com/LazyVim/starter ~/.config/nvim
cd ~/.config/nvim
nvim

View File

@ -70,7 +70,7 @@ Podes encontrar uma template **LazyVim** starter para começar, [aqui](https://g
```sh
docker run -w /root -it --rm alpine:edge sh -uelic '
apk add git lazygit neovim ripgrep alpine-sdk --update
apk add git lazygit fzf curl neovim ripgrep alpine-sdk --update
git clone https://github.com/LazyVim/starter ~/.config/nvim
cd ~/.config/nvim
nvim

View File

@ -69,7 +69,7 @@ You can find a starter template for **LazyVim** [here](https://github.com/LazyVi
```sh
docker run -w /root -it --rm alpine:edge sh -uelic '
apk add git lazygit neovim ripgrep alpine-sdk --update
apk add git lazygit fzf curl neovim ripgrep alpine-sdk --update
git clone https://github.com/LazyVim/starter ~/.config/nvim
cd ~/.config/nvim
nvim

View File

@ -1,4 +1,4 @@
*LazyVim.txt* For Neovim Last change: 2024 December 07
*LazyVim.txt* For Neovim Last change: 2024 December 13
==============================================================================
Table of Contents *LazyVim-table-of-contents*
@ -68,7 +68,7 @@ Try it with Docker ~
>sh
docker run -w /root -it --rm alpine:edge sh -uelic '
apk add git lazygit neovim ripgrep alpine-sdk --update
apk add git lazygit fzf curl neovim ripgrep alpine-sdk --update
git clone https://github.com/LazyVim/starter ~/.config/nvim
cd ~/.config/nvim
nvim

View File

@ -66,7 +66,6 @@ vim.api.nvim_create_autocmd("FileType", {
"neotest-summary",
"notify",
"qf",
"snacks_win",
"spectre_panel",
"startuptime",
"tsplayground",

View File

@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util")
---@class LazyVimConfig: LazyVimOptions
local M = {}
M.version = "13.8.0" -- x-release-please-version
M.version = "14.1.0" -- x-release-please-version
LazyVim.config = M
---@class LazyVimOptions

View File

@ -131,6 +131,12 @@ Snacks.toggle.option("conceallevel", {off = 0, on = vim.o.conceallevel > 0 and v
Snacks.toggle.option("showtabline", {off = 0, on = vim.o.showtabline > 0 and vim.o.showtabline or 2, name = "Tabline"}):map("<leader>uA")
Snacks.toggle.treesitter():map("<leader>uT")
Snacks.toggle.option("background", { off = "light", on = "dark" , name = "Dark Background"}):map("<leader>ub")
Snacks.toggle.dim():map("<leader>uD")
Snacks.toggle.animate():map("<leader>ua")
Snacks.toggle.indent():map("<leader>ug")
Snacks.toggle.scroll():map("<leader>uS")
Snacks.toggle.profiler():map("<leader>dpp")
Snacks.toggle.profiler_highlights():map("<leader>dph")
if vim.lsp.inlay_hint then
Snacks.toggle.inlay_hints():map("<leader>uh")
end
@ -175,7 +181,8 @@ map("n", "<leader>w", "<c-w>", { desc = "Windows", remap = true })
map("n", "<leader>-", "<C-W>s", { desc = "Split Window Below", remap = true })
map("n", "<leader>|", "<C-W>v", { desc = "Split Window Right", remap = true })
map("n", "<leader>wd", "<C-W>c", { desc = "Delete Window", remap = true })
LazyVim.ui.maximize():map("<leader>wm")
Snacks.toggle.zoom():map("<leader>wm"):map("<leader>uZ")
Snacks.toggle.zen():map("<leader>uz")
-- tabs
map("n", "<leader><tab>l", "<cmd>tablast<cr>", { desc = "Last Tab" })

View File

@ -5,12 +5,22 @@ vim.g.maplocalleader = "\\"
-- LazyVim auto format
vim.g.autoformat = true
-- Snacks animations
-- Set to `false` to globally disable all snacks animations
vim.g.snacks_animate = true
-- LazyVim picker to use.
-- Can be one of: telescope, fzf
-- Leave it to "auto" to automatically use the picker
-- enabled with `:LazyExtras`
vim.g.lazyvim_picker = "auto"
-- LazyVim completion engine to use.
-- Can be one of: nvim-cmp, blink.cmp
-- Leave it to "auto" to automatically use the completion engine
-- enabled with `:LazyExtras`
vim.g.lazyvim_cmp = "auto"
-- if the completion engine supports the AI source,
-- use that instead of inline suggestions
vim.g.ai_cmp = true

View File

@ -1,113 +1,14 @@
return {
-- auto completion
{
"hrsh7th/nvim-cmp",
version = false, -- last release is way too old
event = "InsertEnter",
dependencies = {
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-path",
},
-- Not all LSP servers add brackets when completing a function.
-- To better deal with this, LazyVim adds a custom option to cmp,
-- that you can configure. For example:
--
-- ```lua
-- opts = {
-- auto_brackets = { "python" }
-- }
-- ```
opts = function()
vim.api.nvim_set_hl(0, "CmpGhostText", { link = "Comment", default = true })
local cmp = require("cmp")
local defaults = require("cmp.config.default")()
local auto_select = true
return {
auto_brackets = {}, -- configure any filetype to auto add brackets
completion = {
completeopt = "menu,menuone,noinsert" .. (auto_select and "" or ",noselect"),
},
preselect = auto_select and cmp.PreselectMode.Item or cmp.PreselectMode.None,
mapping = cmp.mapping.preset.insert({
["<C-b>"] = cmp.mapping.scroll_docs(-4),
["<C-f>"] = cmp.mapping.scroll_docs(4),
["<C-n>"] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }),
["<C-p>"] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }),
["<C-Space>"] = cmp.mapping.complete(),
["<CR>"] = LazyVim.cmp.confirm({ select = auto_select }),
["<C-y>"] = LazyVim.cmp.confirm({ select = true }),
["<S-CR>"] = LazyVim.cmp.confirm({ behavior = cmp.ConfirmBehavior.Replace }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
["<C-CR>"] = function(fallback)
cmp.abort()
fallback()
end,
["<tab>"] = function(fallback)
return LazyVim.cmp.map({ "snippet_forward", "ai_accept" }, fallback)()
end,
}),
sources = cmp.config.sources({
{ name = "nvim_lsp" },
{ name = "path" },
}, {
{ name = "buffer" },
}),
formatting = {
format = function(entry, item)
local icons = LazyVim.config.icons.kinds
if icons[item.kind] then
item.kind = icons[item.kind] .. item.kind
end
local widths = {
abbr = vim.g.cmp_widths and vim.g.cmp_widths.abbr or 40,
menu = vim.g.cmp_widths and vim.g.cmp_widths.menu or 30,
}
for key, width in pairs(widths) do
if item[key] and vim.fn.strdisplaywidth(item[key]) > width then
item[key] = vim.fn.strcharpart(item[key], 0, width - 1) .. ""
end
end
return item
end,
},
experimental = {
-- only show ghost text when we show ai completions
ghost_text = vim.g.ai_cmp and {
hl_group = "CmpGhostText",
} or false,
},
sorting = defaults.sorting,
}
import = "lazyvim.plugins.extras.coding.nvim-cmp",
enabled = function()
return LazyVim.cmp_engine() == "nvim-cmp"
end,
main = "lazyvim.util.cmp",
},
-- snippets
{
"nvim-cmp",
optional = true,
dependencies = {
{
"garymjr/nvim-snippets",
opts = {
friendly_snippets = true,
},
dependencies = { "rafamadriz/friendly-snippets" },
},
},
opts = function(_, opts)
opts.snippet = {
expand = function(item)
return LazyVim.cmp.expand(item.body)
end,
}
if LazyVim.has("nvim-snippets") then
table.insert(opts.sources, { name = "snippets" })
end
import = "lazyvim.plugins.extras.coding.blink",
enabled = function()
return LazyVim.cmp_engine() == "blink.cmp"
end,
},
@ -160,7 +61,6 @@ return {
{ "%u[%l%d]+%f[^%l%d]", "%f[%S][%l%d]+%f[^%l%d]", "%f[%P][%l%d]+%f[^%l%d]", "^[%l%d]+%f[^%l%d]" },
"^().*()$",
},
i = LazyVim.mini.ai_indent, -- indent
g = LazyVim.mini.ai_buffer, -- buffer
u = ai.gen_spec.function_call(), -- u for "Usage"
U = ai.gen_spec.function_call({ name_pattern = "[%w_]" }), -- without dot in function name
@ -190,12 +90,4 @@ return {
},
},
},
-- Add lazydev source to cmp
{
"hrsh7th/nvim-cmp",
optional = true,
opts = function(_, opts)
table.insert(opts.sources, { name = "lazydev", group_index = 0 })
end,
},
}

View File

@ -4,6 +4,9 @@ return {
{ "garymjr/nvim-snippets", enabled = false },
{ import = "lazyvim.plugins.extras.coding.luasnip" },
-- Use nvim-cmp instead of blink.cmp
{ import = "lazyvim.plugins.extras.coding.nvim-cmp" },
-- Use mini.comment instead of ts-comments
{ "folke/ts-comments.nvim", enabled = false },
{ import = "lazyvim.plugins.extras.coding.mini-comment" },

View File

@ -176,12 +176,15 @@ return {
event = "VeryLazy",
opts_extend = { "spec" },
opts = {
preset = "helix",
defaults = {},
spec = {
{
mode = { "n", "v" },
{ "<leader><tab>", group = "tabs" },
{ "<leader>c", group = "code" },
{ "<leader>d", group = "debug" },
{ "<leader>dp", group = "profiler" },
{ "<leader>f", group = "file/find" },
{ "<leader>g", group = "git" },
{ "<leader>gh", group = "hunks" },

View File

@ -34,7 +34,7 @@ return {
-- codeium cmp source
{
"nvim-cmp",
"hrsh7th/nvim-cmp",
optional = true,
dependencies = { "codeium.nvim" },
opts = function(_, opts)

View File

@ -58,59 +58,59 @@ return {
end,
},
-- copilot cmp source
{
"nvim-cmp",
optional = true,
dependencies = { -- this will only be evaluated if nvim-cmp is enabled
{
"zbirenbaum/copilot-cmp",
enabled = vim.g.ai_cmp, -- only enable if wanted
opts = {},
config = function(_, opts)
local copilot_cmp = require("copilot_cmp")
copilot_cmp.setup(opts)
-- attach cmp source whenever copilot attaches
-- fixes lazy-loading issues with the copilot cmp source
LazyVim.lsp.on_attach(function()
copilot_cmp._on_insert_enter({})
end, "copilot")
end,
specs = {
{
"nvim-cmp",
optional = true,
---@param opts cmp.ConfigSchema
opts = function(_, opts)
table.insert(opts.sources, 1, {
name = "copilot",
group_index = 1,
priority = 100,
})
end,
vim.g.ai_cmp
and {
-- copilot cmp source
{
"hrsh7th/nvim-cmp",
optional = true,
dependencies = { -- this will only be evaluated if nvim-cmp is enabled
{
"zbirenbaum/copilot-cmp",
opts = {},
config = function(_, opts)
local copilot_cmp = require("copilot_cmp")
copilot_cmp.setup(opts)
-- attach cmp source whenever copilot attaches
-- fixes lazy-loading issues with the copilot cmp source
LazyVim.lsp.on_attach(function()
copilot_cmp._on_insert_enter({})
end, "copilot")
end,
specs = {
{
"hrsh7th/nvim-cmp",
optional = true,
---@param opts cmp.ConfigSchema
opts = function(_, opts)
table.insert(opts.sources, 1, {
name = "copilot",
group_index = 1,
priority = 100,
})
end,
},
},
},
},
},
},
},
},
vim.g.ai_cmp and {
"saghen/blink.cmp",
optional = true,
dependencies = { "giuxtaposition/blink-cmp-copilot" },
opts = {
sources = {
completion = {
enabled_providers = { "copilot" },
},
providers = {
copilot = {
name = "copilot",
module = "blink-cmp-copilot",
kind = "Copilot",
{
"saghen/blink.cmp",
optional = true,
dependencies = { "giuxtaposition/blink-cmp-copilot" },
opts = {
sources = {
default = { "copilot" },
providers = {
copilot = {
name = "copilot",
module = "blink-cmp-copilot",
kind = "Copilot",
},
},
},
},
},
},
},
} or nil,
}
or nil,
}

View File

@ -14,7 +14,7 @@ return {
},
{
"nvim-cmp",
"hrsh7th/nvim-cmp",
optional = true,
dependencies = { "tzachar/cmp-tabnine" },
---@param opts cmp.ConfigSchema

View File

@ -8,6 +8,7 @@ end
return {
{
"hrsh7th/nvim-cmp",
optional = true,
enabled = false,
},
{
@ -17,6 +18,7 @@ return {
opts_extend = {
"sources.completion.enabled_providers",
"sources.compat",
"sources.default",
},
dependencies = {
"rafamadriz/friendly-snippets",
@ -70,10 +72,8 @@ return {
-- adding any nvim-cmp sources here will enable them
-- with blink.compat
compat = {},
completion = {
-- remember to enable your providers here
enabled_providers = { "lsp", "path", "snippets", "buffer" },
},
default = { "lsp", "path", "snippets", "buffer" },
cmdline = {},
},
keymap = {
@ -87,7 +87,7 @@ return {
---@param opts blink.cmp.Config | { sources: { compat: string[] } }
config = function(_, opts)
-- setup compat sources
local enabled = opts.sources.completion.enabled_providers
local enabled = opts.sources.default
for _, source in ipairs(opts.sources.compat or {}) do
opts.sources.providers[source] = vim.tbl_deep_extend(
"force",
@ -99,11 +99,25 @@ return {
end
end
-- TODO: remove when blink made a new release > 0.7.6
if not vim.g.lazyvim_blink_main then
opts.sources.completion = opts.sources.completion or {}
opts.sources.completion.enabled_providers = enabled
end
-- Unset custom prop to pass blink.cmp validation
opts.sources.compat = nil
-- check if we need to override symbol kinds
for _, provider in pairs(opts.sources.providers or {}) do
---@cast provider blink.cmp.SourceProviderConfig|{kind?:string}
if provider.kind then
require("blink.cmp.types").CompletionItemKind[provider.kind] = provider.kind
local CompletionItemKind = require("blink.cmp.types").CompletionItemKind
local kind_idx = #CompletionItemKind + 1
CompletionItemKind[kind_idx] = provider.kind
CompletionItemKind[provider.kind] = kind_idx
---@type fun(ctx: blink.cmp.Context, items: blink.cmp.CompletionItem[]): blink.cmp.CompletionItem[]
local transform_items = provider.transform_items
---@param ctx blink.cmp.Context
@ -111,10 +125,13 @@ return {
provider.transform_items = function(ctx, items)
items = transform_items and transform_items(ctx, items) or items
for _, item in ipairs(items) do
item.kind = provider.kind or item.kind
item.kind = kind_idx or item.kind
end
return items
end
-- Unset custom prop to pass blink.cmp validation
provider.kind = nil
end
end
@ -128,6 +145,9 @@ return {
opts = function(_, opts)
opts.appearance = opts.appearance or {}
opts.appearance.kind_icons = LazyVim.config.icons.kinds
-- Use block instead of icon for color items to make swatches more usable
opts.appearance.kind_icons.Color = "██"
end,
},
@ -136,15 +156,9 @@ return {
"saghen/blink.cmp",
opts = {
sources = {
completion = {
-- add lazydev to your completion providers
enabled_providers = { "lazydev" },
},
-- add lazydev to your completion providers
default = { "lazydev" },
providers = {
lsp = {
-- dont show LuaLS require statements when lazydev has items
fallback_for = { "lazydev" },
},
lazydev = {
name = "LazyDev",
module = "lazydev.integrations.blink",

View File

@ -14,6 +14,7 @@ return {
"rafamadriz/friendly-snippets",
config = function()
require("luasnip.loaders.from_vscode").lazy_load()
require("luasnip.loaders.from_vscode").lazy_load({ paths = { vim.fn.stdpath("config") .. "/snippets" } })
end,
},
},
@ -38,7 +39,7 @@ return {
-- nvim-cmp integration
{
"nvim-cmp",
"hrsh7th/nvim-cmp",
optional = true,
dependencies = { "saadparwaiz1/cmp_luasnip" },
opts = function(_, opts)

View File

@ -0,0 +1,118 @@
return {
{
"saghen/blink.cmp",
enabled = false,
optional = true,
},
-- Setup nvim-cmp
{
"hrsh7th/nvim-cmp",
version = false, -- last release is way too old
event = "InsertEnter",
dependencies = {
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-path",
},
-- Not all LSP servers add brackets when completing a function.
-- To better deal with this, LazyVim adds a custom option to cmp,
-- that you can configure. For example:
--
-- ```lua
-- opts = {
-- auto_brackets = { "python" }
-- }
-- ```
opts = function()
vim.api.nvim_set_hl(0, "CmpGhostText", { link = "Comment", default = true })
local cmp = require("cmp")
local defaults = require("cmp.config.default")()
local auto_select = true
return {
auto_brackets = {}, -- configure any filetype to auto add brackets
completion = {
completeopt = "menu,menuone,noinsert" .. (auto_select and "" or ",noselect"),
},
preselect = auto_select and cmp.PreselectMode.Item or cmp.PreselectMode.None,
mapping = cmp.mapping.preset.insert({
["<C-b>"] = cmp.mapping.scroll_docs(-4),
["<C-f>"] = cmp.mapping.scroll_docs(4),
["<C-n>"] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }),
["<C-p>"] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }),
["<C-Space>"] = cmp.mapping.complete(),
["<CR>"] = LazyVim.cmp.confirm({ select = auto_select }),
["<C-y>"] = LazyVim.cmp.confirm({ select = true }),
["<S-CR>"] = LazyVim.cmp.confirm({ behavior = cmp.ConfirmBehavior.Replace }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
["<C-CR>"] = function(fallback)
cmp.abort()
fallback()
end,
["<tab>"] = function(fallback)
return LazyVim.cmp.map({ "snippet_forward", "ai_accept" }, fallback)()
end,
}),
sources = cmp.config.sources({
{ name = "lazydev" },
{ name = "nvim_lsp" },
{ name = "path" },
}, {
{ name = "buffer" },
}),
formatting = {
format = function(entry, item)
local icons = LazyVim.config.icons.kinds
if icons[item.kind] then
item.kind = icons[item.kind] .. item.kind
end
local widths = {
abbr = vim.g.cmp_widths and vim.g.cmp_widths.abbr or 40,
menu = vim.g.cmp_widths and vim.g.cmp_widths.menu or 30,
}
for key, width in pairs(widths) do
if item[key] and vim.fn.strdisplaywidth(item[key]) > width then
item[key] = vim.fn.strcharpart(item[key], 0, width - 1) .. ""
end
end
return item
end,
},
experimental = {
-- only show ghost text when we show ai completions
ghost_text = vim.g.ai_cmp and {
hl_group = "CmpGhostText",
} or false,
},
sorting = defaults.sorting,
}
end,
main = "lazyvim.util.cmp",
},
-- snippets
{
"hrsh7th/nvim-cmp",
dependencies = {
{
"garymjr/nvim-snippets",
opts = {
friendly_snippets = true,
},
dependencies = { "rafamadriz/friendly-snippets" },
},
},
opts = function(_, opts)
opts.snippet = {
expand = function(item)
return LazyVim.cmp.expand(item.body)
end,
}
if LazyVim.has("nvim-snippets") then
table.insert(opts.sources, { name = "snippets" })
end
end,
},
}

View File

@ -33,7 +33,6 @@ return {
-- stylua: ignore
keys = {
{ "<leader>d", "", desc = "+debug", mode = {"n", "v"} },
{ "<leader>dB", function() require("dap").set_breakpoint(vim.fn.input('Breakpoint condition: ')) end, desc = "Breakpoint Condition" },
{ "<leader>db", function() require("dap").toggle_breakpoint() end, desc = "Toggle Breakpoint" },
{ "<leader>dc", function() require("dap").continue() end, desc = "Run/Continue" },
@ -46,7 +45,7 @@ return {
{ "<leader>dl", function() require("dap").run_last() end, desc = "Run Last" },
{ "<leader>do", function() require("dap").step_out() end, desc = "Step Out" },
{ "<leader>dO", function() require("dap").step_over() end, desc = "Step Over" },
{ "<leader>dp", function() require("dap").pause() end, desc = "Pause" },
{ "<leader>dP", function() require("dap").pause() end, desc = "Pause" },
{ "<leader>dr", function() require("dap").repl.toggle() end, desc = "Toggle REPL" },
{ "<leader>ds", function() require("dap").session() end, desc = "Session" },
{ "<leader>dt", function() require("dap").terminate() end, desc = "Terminate" },

View File

@ -103,8 +103,11 @@ return {
},
{
"nvim-cmp",
"hrsh7th/nvim-cmp",
optional = true,
opts = function(_, opts)
opts.sorting = opts.sorting or {}
opts.sorting.comparators = opts.sorting.comparators or {}
table.insert(opts.sorting.comparators, 1, require("clangd_extensions.cmp_scores"))
end,
},

View File

@ -9,7 +9,8 @@ return {
},
{
"nvim-cmp",
"hrsh7th/nvim-cmp",
optional = true,
dependencies = {
{ "petertriho/cmp-git", opts = {} },
},

View File

@ -85,8 +85,12 @@ return {
dependencies = { "folke/which-key.nvim" },
ft = java_filetypes,
opts = function()
local mason_registry = require("mason-registry")
local lombok_jar = mason_registry.get_package("jdtls"):get_install_path() .. "/lombok.jar"
local cmd = { vim.fn.exepath("jdtls") }
if LazyVim.has("mason.nvim") then
local mason_registry = require("mason-registry")
local lombok_jar = mason_registry.get_package("jdtls"):get_install_path() .. "/lombok.jar"
table.insert(cmd, string.format("--jvm-arg=-javaagent:%s", lombok_jar))
end
return {
-- How to find the root dir for a given filename. The default comes from
-- lspconfig which provides a function specifically for java projects.
@ -107,10 +111,7 @@ return {
-- How to run jdtls. This can be overridden to a full java command-line
-- if the Python wrapper script doesn't suffice.
cmd = {
vim.fn.exepath("jdtls"),
string.format("--jvm-arg=-javaagent:%s", lombok_jar),
},
cmd = cmd,
full_cmd = function(opts)
local fname = vim.api.nvim_buf_get_name(0)
local root_dir = opts.root_dir(fname)
@ -145,29 +146,30 @@ return {
config = function(_, opts)
-- Find the extra bundles that should be passed on the jdtls command-line
-- if nvim-dap is enabled with java debug/test.
local mason_registry = require("mason-registry")
local bundles = {} ---@type string[]
if opts.dap and LazyVim.has("nvim-dap") and mason_registry.is_installed("java-debug-adapter") then
local java_dbg_pkg = mason_registry.get_package("java-debug-adapter")
local java_dbg_path = java_dbg_pkg:get_install_path()
local jar_patterns = {
java_dbg_path .. "/extension/server/com.microsoft.java.debug.plugin-*.jar",
}
-- java-test also depends on java-debug-adapter.
if opts.test and mason_registry.is_installed("java-test") then
local java_test_pkg = mason_registry.get_package("java-test")
local java_test_path = java_test_pkg:get_install_path()
vim.list_extend(jar_patterns, {
java_test_path .. "/extension/server/*.jar",
})
end
for _, jar_pattern in ipairs(jar_patterns) do
for _, bundle in ipairs(vim.split(vim.fn.glob(jar_pattern), "\n")) do
table.insert(bundles, bundle)
if LazyVim.has("mason.nvim") then
local mason_registry = require("mason-registry")
if opts.dap and LazyVim.has("nvim-dap") and mason_registry.is_installed("java-debug-adapter") then
local java_dbg_pkg = mason_registry.get_package("java-debug-adapter")
local java_dbg_path = java_dbg_pkg:get_install_path()
local jar_patterns = {
java_dbg_path .. "/extension/server/com.microsoft.java.debug.plugin-*.jar",
}
-- java-test also depends on java-debug-adapter.
if opts.test and mason_registry.is_installed("java-test") then
local java_test_pkg = mason_registry.get_package("java-test")
local java_test_path = java_test_pkg:get_install_path()
vim.list_extend(jar_patterns, {
java_test_path .. "/extension/server/*.jar",
})
end
for _, jar_pattern in ipairs(jar_patterns) do
for _, bundle in ipairs(vim.split(vim.fn.glob(jar_pattern), "\n")) do
table.insert(bundles, bundle)
end
end
end
end
local function attach_jdtls()
local fname = vim.api.nvim_buf_get_name(0)
@ -239,40 +241,43 @@ return {
},
})
if opts.dap and LazyVim.has("nvim-dap") and mason_registry.is_installed("java-debug-adapter") then
-- custom init for Java debugger
require("jdtls").setup_dap(opts.dap)
require("jdtls.dap").setup_dap_main_class_configs(opts.dap_main)
if LazyVim.has("mason.nvim") then
local mason_registry = require("mason-registry")
if opts.dap and LazyVim.has("nvim-dap") and mason_registry.is_installed("java-debug-adapter") then
-- custom init for Java debugger
require("jdtls").setup_dap(opts.dap)
require("jdtls.dap").setup_dap_main_class_configs(opts.dap_main)
-- Java Test require Java debugger to work
if opts.test and mason_registry.is_installed("java-test") then
-- custom keymaps for Java test runner (not yet compatible with neotest)
wk.add({
{
mode = "n",
buffer = args.buf,
{ "<leader>t", group = "test" },
-- Java Test require Java debugger to work
if opts.test and mason_registry.is_installed("java-test") then
-- custom keymaps for Java test runner (not yet compatible with neotest)
wk.add({
{
"<leader>tt",
function()
require("jdtls.dap").test_class({
config_overrides = type(opts.test) ~= "boolean" and opts.test.config_overrides or nil,
})
end,
desc = "Run All Test",
mode = "n",
buffer = args.buf,
{ "<leader>t", group = "test" },
{
"<leader>tt",
function()
require("jdtls.dap").test_class({
config_overrides = type(opts.test) ~= "boolean" and opts.test.config_overrides or nil,
})
end,
desc = "Run All Test",
},
{
"<leader>tr",
function()
require("jdtls.dap").test_nearest_method({
config_overrides = type(opts.test) ~= "boolean" and opts.test.config_overrides or nil,
})
end,
desc = "Run Nearest Test",
},
{ "<leader>tT", require("jdtls.dap").pick_test, desc = "Run Test" },
},
{
"<leader>tr",
function()
require("jdtls.dap").test_nearest_method({
config_overrides = type(opts.test) ~= "boolean" and opts.test.config_overrides or nil,
})
end,
desc = "Run Nearest Test",
},
{ "<leader>tT", require("jdtls.dap").pick_test, desc = "Run Test" },
},
})
})
end
end
end

View File

@ -92,6 +92,19 @@ return {
["async-recursion"] = { "async_recursion" },
},
},
files = {
excludeDirs = {
".direnv",
".git",
".github",
".gitlab",
"bin",
"node_modules",
"target",
"venv",
".venv",
},
},
},
},
},

View File

@ -130,9 +130,7 @@ return {
optional = true,
opts = {
sources = {
completion = {
enabled_providers = { "dadbod" },
},
default = { "dadbod" },
providers = {
dadbod = { name = "Dadbod", module = "vim_dadbod_completion.blink" },
},

View File

@ -0,0 +1,51 @@
return {
-- disable snacks indent when indent-blankline is enabled
{
"snacks.nvim",
opts = {
indent = { enabled = false },
},
},
{
"lukas-reineke/indent-blankline.nvim",
event = "LazyFile",
opts = function()
Snacks.toggle({
name = "Indention Guides",
get = function()
return require("ibl.config").get_config(0).enabled
end,
set = function(state)
require("ibl").setup_buffer(0, { enabled = state })
end,
}):map("<leader>ug")
return {
indent = {
char = "",
tab_char = "",
},
scope = { show_start = false, show_end = false },
exclude = {
filetypes = {
"Trouble",
"alpha",
"dashboard",
"help",
"lazy",
"mason",
"neo-tree",
"notify",
"snacks_dashboard",
"snacks_notif",
"snacks_terminal",
"snacks_win",
"toggleterm",
"trouble",
},
},
}
end,
main = "ibl",
},
}

Some files were not shown because too many files have changed in this diff Show More