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
Folke Lemaitre
24665fc736
feat(keymaps): leader-bo to close other buffers
2024-11-09 16:13:11 +01:00
Folke Lemaitre
aa53cd47c4
feat(keymaps): only add lazygit keymaps when available. Closes #4643 . Closes #4247
2024-11-07 16:21:48 +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
Roey Darwish Dror
4ee6be4499
fix(lazygit): file history when cwd is outside the repo ( #4666 )
...
## Description
When using `<leader>gf` Lazygit is launched in the current directory
rather than the root directory.
<!-- 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-11-01 22:47:03 +01:00
Iordanis Petkakis
b4eb4e1f4a
feat(keymaps): allow v:count1
when moving lines ( #4618 )
...
## Description
Allow user to use `v:count1` when moving lines
<!-- Describe the big picture of your changes to communicate to the
maintainers
why we should accept this pull request. -->
## Related Issue(s)
Closes #4615 .
<!--
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:40:31 +02:00
Folke Lemaitre
391f506295
fix(keymaps): leader-wm
2024-07-24 07:03:45 +02:00
Folke Lemaitre
f0d8b8b293
fix(keymaps): leader-wd
2024-07-23 08:29:08 +02:00
Folke Lemaitre
bab54406dc
feat(keymaps): proxy leader-w to ctrl-w
2024-07-17 12:40:56 +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

## Checklist
- [ ] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md )
guidelines.
2024-07-15 15:47:44 +02:00
Folke Lemaitre
119dcb949a
fix: removed leader-m, since it is leading to too many issues. Still available at leader-wm
2024-06-07 10:53:56 +02:00
Folke Lemaitre
c4ccd7cbce
feat(git): added leader-gB to browse remotes of the current repo
2024-06-06 10:46:56 +02:00
Kevin Traver
de9e337f0d
feat(keymaps): add keymap to close all tab pages except the current one ( #2975 )
...
* feat(keymaps): add keymap to close all tab pages except the current one
* fix: use o
---------
Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
2024-06-05 16:04:17 +02:00
Folke Lemaitre
662e2ffe0f
fix(keymaps): use root dir for git log
2024-06-05 13:41:59 +02:00
Folke Lemaitre
3ace8277e5
feat(keymaps): new keymap to toggle mazimize of current window leader-m or leader-wm
2024-05-29 22:35:40 +02:00
Folke Lemaitre
47a8736278
feat(keymaps): add comment above/below current line with gco/gcO
2024-05-28 07:39:26 +02:00
George Guimarães
9ccdbf644c
feat(git): Change Commit Log to use Lazygit ( #2959 )
...
* feat(git): Change Commit Log to use Lazygit
* fix: use gl
* fix conflicts
---------
Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
2024-05-27 07:53:49 +02:00
Folke Lemaitre
779de263f1
feat(util): mini.bufremove
is no longer needed
2024-05-17 10:10:31 +02:00
Folke Lemaitre
3b74ef793f
feat(keymaps): added leader-uI to open InspectTree
2024-05-16 21:25:51 +02:00
André Freitas
36802fea19
fix(keymaps): better up/down keymaps description ( #1909 )
2024-05-15 16:10:06 +02:00
Michael Butler
095bc13188
style(keymaps): clarify no to use LazyVim.safe_keymap_set
#3085
...
* Update keymaps.lua
add more explanation about what to use
* Update keymaps.lua
* fix typo YOU => YOUR
2024-05-03 09:10:36 +02:00
Folke Lemaitre
9e3af1070f
feat(git): <leader>gb
for Git Blame Line
2024-04-11 17:23:46 +02:00
Kevin Traver
eb9f9a8862
fix(keymaps): update all keymap descriptions to be Title Case ( #2844 )
2024-03-27 08:56:44 +01:00
Folke Lemaitre
7d0dbc6ded
feat(lazygit): lazygit now automatically uses colors from your Neovim colorscheme
...
Disable by setting `vim.g.lazygit_theme = false` in your `options.lua`
2024-03-26 12:43:07 +01:00
Folke Lemaitre
7a5dbeae75
feat: use LazyVim everywhere instead of require("lazyvim.util")
2024-03-22 09:15:09 +01:00
Folke Lemaitre
d8d380a60e
fix(lazygit): make sure we start lazygit in a valid git root
2024-03-18 11:23:55 +01:00
craempler
42a7e79d5a
fix(git): use compatible function for windows and linux ( #2740 )
2024-03-15 18:01:33 +01:00
Uthman Mohamed
0ec7a9040b
feat(git): add <leader>gf for lazygit commit history on current file ( #2728 )
...
* Add <leader>gf for lazygit commit history on current file
* Change root dir to git root using git command
* refactor: cleanup
---------
Co-authored-by: Uthman Mohamed <83053931+1239uth@users.noreply.github.com>
Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
2024-03-14 00:06:47 +01:00
NickSager
fa6158a595
feat(keymaps): add function to toggle between light/dark backgrounds ( #2088 )
2024-01-21 19:52:36 +01:00
Gary Murray
6853b785d9
fix(lsp): detect if using nvim-0.10 and use new inlay_hint.enable method ( #2007 )
...
* Detect if using nvim 0.10 and use new inlay_hint.enable method
* Add lsp util for inlay-hints and update keymap
* Remove the need to check vim version
* Support older nightly builds
* Move inlay_hint toggle in Util.toggle
---------
Co-authored-by: Gary Murray <gamurray@fanatics.com>
2023-11-30 19:53:40 +01:00
Jorge Villalobos
9e1f835223
feat(nvim): extend j/k enhancements to up/down arrows ( #1833 )
2023-10-25 15:48:45 +02:00
ian
1d4fbd3b2e
fix(keymaps): let keymap n and N opens folds ( #1298 )
...
It's strange that mappings to n and N do not open folds like its original behavior, so I append `zv` to manually open folds.
2023-10-17 18:03:34 +02:00
Folke Lemaitre
5c4f881158
style(keymaps): no need to check for trouble to set [q, ]q
2023-10-16 07:44:20 +02:00
Kevin Traver
c3daced11c
feat(ui): add keymap to close other buffers ( #1743 )
...
* feat(ui): add keymap to close other buffers
* refactor
---------
Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
2023-10-16 07:35:57 +02:00
Folke Lemaitre
be5eea476c
feat(keymaps): added toggle for treesitter highlights
2023-10-16 07:30:06 +02:00
Phúc H. Lê Khắc
873ff89284
fix(keymaps): no diagnostic keymaps w/o lsp attached ( #1698 )
2023-10-13 16:53:55 +02:00
Folke Lemaitre
73acab1675
feat: added NEWS.md and option to automatically show when changed (enabled by default)
2023-10-12 14:38:25 +02:00
Folke Lemaitre
a2d604928b
feat(root): customizable root detection and :LazyRoot
command
2023-10-12 11:48:02 +02:00
Folke Lemaitre
f1a8f24a36
feat(format): new LazyVim formatter with integrations for lsp/none-ls/conform/eslint/...
2023-10-12 11:48:02 +02:00
Folke Lemaitre
c8c929c9fd
perf(util): split lazyvim.util in smaller separate modules
2023-10-12 11:48:02 +02:00
Folke Lemaitre
25f3587f3f
refactor(keymaps): move safe keymap.set wrapper to util and add message not to use it in a personal config
2023-10-08 10:28:01 +02:00
Folke Lemaitre
1bc78272da
feat(keymaps): added support for lazy's per-mode keymap disabling
2023-10-08 10:15:28 +02:00
Folke Lemaitre
3f868aa825
feat(keymaps): added toggle for relative line numbers
2023-10-03 14:56:55 +02:00
Folke Lemaitre
9b16770573
fix(format): moved formatting keymap to lua/lazyvim/config/keymaps.lua
2023-10-01 23:31:24 +02:00
Folke Lemaitre
9935dc3944
fix: cleanup all Neovim < 0.9.0 code
2023-10-01 14:18:25 +02:00
Iordanis Petkakis
ec0ddd481c
fix(keymaps): change v
mode to x
mode for save file
( #1262 )
...
While trying to disable `<C-s>` entirely by `vim.keymap.del({ "i", "v","n", "s" }, "<C-s>")`
in my own `keymaps.lua`, I got an error on reopening Neovim `No such mapping`.
After tinkering around a bit, I changed `v` to `x`, since `v` incorporates both
`x` and `s` and the error stopped occuring.
2023-08-29 18:07:56 +02:00
Folke Lemaitre
23e2b073e6
fix(keymaps): remove gw keymap
2023-08-29 18:00:54 +02:00
Folke Lemaitre
df0818880e
fix(util): fixed line number toggling. Closes #1173
2023-07-20 23:38:43 +02:00
Folke Lemaitre
a28acf0ce7
feat(keymaps): added leader-K to run keywordprg
2023-07-18 08:46:52 +02:00
Folke Lemaitre
9387ab388e
feat: added leader-L
to show the LazyVim changelog
2023-07-13 08:18:02 +02:00