Commit graph

101 commits

Author SHA1 Message Date
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
Folke Lemaitre
e37a699096 feat(mini.surround)!: move mini.surround to an extra 2024-05-16 21:25:51 +02:00
Folke Lemaitre
9839f10013 refactor: comments code 2024-05-16 21:25:51 +02:00
Folke Lemaitre
3c4ebd522e feat(coding)!: native snippets are now the default on Neovim 0.10. Install the luasnip extra to get luasnip back 2024-05-16 21:25:51 +02:00
Folke Lemaitre
d999be7401 feat(coding)!: use native comments on 0.10, with support for ts_context_commentstring 2024-05-16 21:25:51 +02:00
Folke Lemaitre
6e7ba50141
fix(cmp): never auto bracket for snippets and correct prev char check. Fixes #2949 2024-05-16 08:07:36 +02:00
Folke Lemaitre
c70a78e631
fix(cmp): dont add autobrackets if prev char is a bracket. Closes #2949 2024-05-15 16:23:42 +02:00
Folke Lemaitre
32eacde793
fix(mini.pairs): better default for ```` 2024-04-11 17:23:17 +02:00
Folke Lemaitre
bf8ce8076e
feat(cmp): added option auto_brackets that adds brackets to functions/methods in configured filetypes 2024-03-28 21:32:09 +01:00
Kevin Traver
eb9f9a8862
fix(keymaps): update all keymap descriptions to be Title Case (#2844) 2024-03-27 08:56:44 +01:00