Commit Graph

110 Commits

Author SHA1 Message Date
Tom MacWright
ab657e9589 docs: improved plugin doc strings (#5657)
## Description

This improves the comment strings that produce documentation for
different plugins. I often look at the docs to learn what stuff is
already installed, and this would help people like me to quickly
understand what some of the plugins do.

## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
2025-09-17 11:17:32 +02:00
Sergey Kochetkov
ae3aaf2dd3 fix(mini): update mini plugin references from echasnovski to nvim-mini (#6374)
Updates all `mini.nvim` plugin references to use the new `nvim-mini`
organization namespace instead of the legacy `echasnovski` namespace
across all LazyVim configuration files.

## Description

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

## 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>
2025-09-15 11:45:00 +02:00
Folke Lemaitre
525377dee9 feat(extras): big rework of default extras 2025-02-08 15:04:46 +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
eb525c680d fix(lazydev): use luals' bundled luv library 2024-11-24 23:03:03 +01:00
Folke Lemaitre
fbf881f80b feat(ai): better completion/suggestions of AI engines (#4752)
## Description

The whole completion / snippets / AI is very tricky:
- multiple snippet engines
- native snippets on > 0.11 set their own keymaps, but not on 0.10
- multiple completion engines, like `nvim-cmp` and `blink.cmp`
- multiple ai completion engines that have a different API
- user's preference of showing ai suggestions as completion or not
- none of the ai completion engines currently set undo points, which is
bad

Solution:
- [x] added `LazyVim.cmp.actions`, where snippet engines and ai engines
can register their action.
- [x] an action returns `true` if it succeeded, or `false|nil` otherwise
- [x] in a completion engine, we then try running multiple actions and
use the fallback if needed
- [x] so `<tab>` runs `{"snippet_forward", "ai_accept", "fallback"}`
- [x] added `vim.g.ai_cmp`. When `true` we try to integrate the AI
source in the completion engine.
- [x] when `false`, `<tab>` should be used to insert the AI suggestion
- [x] when `false`, the completion engine's ghost text is disabled
- [x] luasnip support for blink (only works with blink `main`)
- [x] create undo points when accepting AI suggestions 

## Test Matrix

| completion   | snippets     | ai          | ai_cmp | tested? |
|--------------|--------------|-------------|--------|---------|
| nvim-cmp     | native       | copilot     | true   |       |
| nvim-cmp     | native       | copilot     | false  |       |
| nvim-cmp     | native       | codeium     | true   |       |
| nvim-cmp     | native       | codeium     | false  |       |
| nvim-cmp     | luasnip      | copilot     | true   |       |
| nvim-cmp     | luasnip      | copilot     | false  |       |
| nvim-cmp     | luasnip      | codeium     | true   |       |
| nvim-cmp     | luasnip      | codeium     | false  |       |
| blink.cmp    | native       | copilot     | true   |       |
| blink.cmp    | native       | copilot     | false  |       |
| blink.cmp    | native       | codeium     | true   |       |
| blink.cmp    | native       | codeium     | false  |       |
| blink.cmp    | luasnip      | copilot     | true   |       |
| blink.cmp    | luasnip      | copilot     | false  |       |
| blink.cmp    | luasnip      | codeium     | true   |       |
| blink.cmp    | luasnip      | codeium     | false  |       |


## Related Issue(s)

- [ ] Closes #4702

## Screenshots

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

## Checklist

- [ ] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
2024-11-11 10:50:57 +01:00
Maria José Solano
15527910c3 fix(snippet): don't set navigation mappings in nightly (#4375)
## Description

Since [this commit in
Neovim](https://github.com/neovim/neovim/pull/27339), snippet navigation
mappings are set by default to `<tab>` and `<s-tab>`, and hence don't
need to be redefined here. Moreover, the core implementation makes sure
that those snippet navigation mappings are active only when snippet
expansion is happening, and if other user bindings are using those keys,
they're restored when snippet navigation ends.

## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
2024-11-08 13:40:25 +01:00
Folke Lemaitre
2f4697443c feat(core)!: move a bunch of LazyVim features to snacks.nvim (#4706)
## Description

LazyVim comes with a bunch of smaller QoL plugin like features, but it's
not easy for non LazyVim users to use them.

That's why I started working on
[snacks.nvim](https://github.com/folke/snacks.nvim), a collection of
small QoL plugins for Neovim.

Snacks also includes a bunch of new improvements to these features.

This PR fully integrates with snacks.

## Todo

- [ ] add proper deprecations where needed
- [ ] create snacks docs
- [ ] document all the new improvements relevant to LazyVim users

## Closes

- [ ] #4492 
- [ ] #4333
- [ ] #4687

## Screenshots

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

## Checklist

- [ ] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
2024-11-07 15:54:47 +01:00
Iordanis Petkakis
0f5fa439e5 refactor(cmp): add optional where necessary (#4557)
## Description
Makes it easier to disable it for users who want to try other completion
engines, without it being pulled back by some Extra.

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

## Related Issue(s)
None
<!--
  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-10-23 11:44:27 +02:00
Folke Lemaitre
86d4f14bc8 feat(cmp): better c-n and c-p mapping fallback. Fixes #4414 2024-09-18 08:20:01 +02:00
Folke Lemaitre
78cf0320bf feat(keymaps): dynamic which-key icons/descriptions for toggles (#4050)
## Description

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

## Related Issue(s)

- [ ] Closes #4025

## Screenshots


![image](https://github.com/user-attachments/assets/8453c23c-d560-490c-9f96-a22ea88f45fd)

## Checklist

- [ ] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
2024-07-15 15:47:44 +02:00
Johnson Hu
8506cb5a98 feat(util.mini): follow the user's mappings instead of hardcoded values (#4043)
Because I use the Colemak-DH keyboard layout, I have mapped 'i' to 'h'.
Therefore, the current mini.ai which_key prompts are inconsistent with
my keymap.


## Description

The names and prefixes used in mini.ai_whichkey() are hardcoded and
should follow the user's mappings.

## Related Issue(s)

No

## Screenshots

No

## 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-07-15 09:06:34 +02:00
Iordanis Petkakis
78cf6ee024 feat(cmp): attempt for dynamic width and trimming between fields (#3873)
## What is this PR for?
Attempt for dynamic width and trimming between fields.
Testing was done on my 15.6 laptop screen so maybe values could be
raised in dynamic calculation? Also provides a `vim.g.cmp_fixed_width`
for the users to be able to define a fixed width in their personal
configuration if they'd like to.
<!-- Describe the big picture of your changes to communicate to the
maintainers
  why we should accept this pull request. -->

## Does this PR fix an existing issue?
Attempts to rectify a concern raised in #3858
<!--
  If this PR fixes any issues, please link to the issue here.
  Fixes #<issue_number>
-->

## 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-06-30 23:14:00 +02:00
Iordanis Petkakis
ee44b21898 feat(cmp): disable item.menu for Rust filetypes (#3858)
## What is this PR for?
Tries to improve aesthetics for `nvim-cmp` in Rust by disabling
`item.menu` since it contains the `return` types that take up too much
space.
<!-- Describe the big picture of your changes to communicate to the
maintainers
  why we should accept this pull request. -->

## Does this PR fix an existing issue?
Fixes #3855
<!--
  If this PR fixes any issues, please link to the issue here.
  Fixes #<issue_number>
-->

## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
2024-06-29 21:04:40 +02:00
Songli Yu
492fa86faa fix(snippets): nvim-snippets <S-Tab> prev key (#3712)
Fix nvim-snippets' <S-Tab> rollback keymap.
2024-06-18 07:15:24 +02:00
Folke Lemaitre
e2972f0cca refactor: cmp 2024-06-16 15:17:56 +02:00
Folke Lemaitre
2daca4b510 feat(mini.pairs): enable mini.pairs in the cmdline 2024-06-16 10:33:20 +02:00
Folke Lemaitre
540261d74d feat(mini.pairs): and now the actual code :) 2024-06-15 18:52:25 +02:00
Folke Lemaitre
bf809ad2a1 feat(mini.pairs): added some custom options to make mini.pairs behave better 2024-06-15 12:05:55 +02:00
Iordanis Petkakis
af80811be0 fix(cmp): don't enable snippets source without nvim-snippets (#3527)
Make it easier, so if users decide to disable `nvim-snippets`, they
don't have to remove the `snippets` source manually in their config.
2024-06-07 23:12:59 +02:00
Folke Lemaitre
f70d350085 style: comment 2024-06-07 07:02:51 +02:00
Folke Lemaitre
ae0d94e048 fix(lazydev): add cmd 2024-06-04 09:39:37 +02:00
Folke Lemaitre
39da8514d3 feat(lazydev): new lazydev config based on trigger words 2024-06-04 08:43:31 +02:00
Folke Lemaitre
bb66618f1f fix(lazydev): easier way of defining library plugin paths 2024-06-02 14:24:14 +02:00
Folke Lemaitre
5e76948d58 feat(coding): use lazydev.nvim instead of neodev.nvim 2024-06-02 09:33:52 +02:00
Folke Lemaitre
8024201e75 refactor: move 0.9 stuff to a compat layer. Cleaner this way 2024-06-01 20:46:58 +02:00
Folke Lemaitre
91493588a8 fix(nvim-snippets): no longer needed to set global_snippets 2024-05-28 17:51:10 +02:00
Folke Lemaitre
a6e6d4dabd fix(nvim-snippets): remove extra filetypes since thats no longer needed with merged PR 2024-05-28 16:12:53 +02:00
Folke Lemaitre
025ba33dc3 fix(nvim-snippets): also enable for tsx/jsx files 2024-05-28 15:13:29 +02:00
Folke Lemaitre
99f0a1cb40 fix(nvim-snippets): load js snippets for ts. See #3344 2024-05-28 15:11:32 +02:00
Folke Lemaitre
027d6bc2e8 fix(snippets): my nvim-snippets PR is merged, so remove work-around. That was quick :) 2024-05-21 20:26:30 +02:00
Folke Lemaitre
cb1e1b9c82 fix(snippets): fixes custom snippets. use my branch till nvim-snippets PR is merged. Fixes #3240 2024-05-21 20:18:20 +02:00
Folke Lemaitre
d73397c4aa fix(snippets): make friendly snippets a dep of nvim-snippets 2024-05-21 19:54:20 +02:00
Folke Lemaitre
2bae438570 fix(cmp): fix cmp's broken snippet parsing functionality. Fixes #3266 2024-05-21 19:51:13 +02:00
Folke Lemaitre
8ba7c64a7d feat(comments): use ts-comments.nvim instead of nvim-ts-context-commentstring on Neovim 0.10 2024-05-21 19:31:40 +02:00
Folke Lemaitre
55b07dee21 fix(nvim-snippets): enable global friendly-snippets. See #3240 2024-05-21 19:22:41 +02:00
Folke Lemaitre
97862f4259 feat(cmp): better error handling and automatic fixing of snippets that fail to parse with native Neovim snippets 2024-05-19 22:48:01 +02:00
Folke Lemaitre
2961162eba fix(cmp): use better cmp.confirm 2024-05-19 22:46:09 +02:00
Folke Lemaitre
24a2a9fb0b feat(cmp): add missing documentation to snippets when needed 2024-05-19 21:47:42 +02:00
Folke Lemaitre
39f3ebcadf feat(cmp): move cmp autobracket support to util class 2024-05-19 21:46:54 +02:00
Folke Lemaitre
57a31c3920 fix(cmp): no need to setup native snippets with latest cmp 2024-05-19 21:24:23 +02:00
Folke Lemaitre
ad22adab7d fix(cmp): only complete on <cr> when cmp is really visible. Dont wait till it might be visible. Faster and more correct imho 2024-05-19 09:58:28 +02:00
Folke Lemaitre
673975ebbe feat(cmp): create undo point right before confirming a completion 2024-05-18 23:28:38 +02:00
Folke Lemaitre
d8644c4715 feat(mini.ai): mini.ai is back in core with some improved features. Removing it was a mistake. 2024-05-18 21:53:26 +02:00
Folke Lemaitre
4bc9389bb5 refactor(snippets): refactored snippet code 2024-05-18 21:53:26 +02:00
Folke Lemaitre
c653c4a9a5 perf(comments): vim.schedule ts-context-commentstring integration 2024-05-18 12:09:07 +02:00
Folke Lemaitre
1d23c98da1 fix(comments): better way of using ts-context-commentstring with native comments 2024-05-18 12:05:19 +02:00
Folke Lemaitre
289c2f81c4 perf(coding): dont load vim.snippet early 2024-05-17 14:27:00 +02:00
Folke Lemaitre
4f4911ff95 feat(coding)!: move mini.ai to an extra 2024-05-16 21:25:51 +02:00