Commit Graph

126 Commits

Author SHA1 Message Date
Folke Lemaitre
1a40162714 fix(lsp.keymaps): make cond -> enabled work again. Closes #6697 2025-10-26 12:21:22 +01:00
Folke Lemaitre
cd8c4977a0 feat(lsp): lsp keymaps can now be configured with lsp-config.opts.servers['*'].keys like for lsp servers 2025-10-25 16:57:16 +02:00
Folke Lemaitre
3964433062 feat(lsp): refactor lsp code to use Snacks.util.lsp.on 2025-10-25 16:56:19 +02:00
Folke Lemaitre
2f76d572a2 fix(stylua): stylua is now also an LSP. Disable it since we use the CLI tool. 2025-09-30 18:10:39 +02:00
Folke Lemaitre
8a76098461 style(lsp): typo 2025-09-23 13:06:34 +02:00
Folke Lemaitre
37b1ec41ae fix(lsp): fix mason install/exclude. Closes #6504 2025-09-23 12:58:45 +02:00
Folke Lemaitre
a90b56518f fix(lsp): fixup for when not using mason 2025-09-21 12:35:17 +02:00
Folke Lemaitre
16637dd655 refactor(lsp): cleanup lsp/mason-lspconfig code 2025-09-21 12:34:27 +02:00
Folke Lemaitre
775621ac0a fix(vtsls): fix and move denols/vtsls disambigutaion to typescript extra. Fixes #6476 2025-09-21 11:58:59 +02:00
Folke Lemaitre
3ca7b47365 feat(core): relax hard requirement for vim.lsp.is_enabled. Show warning instead 2025-09-19 08:11:38 +02:00
Folke Lemaitre
ccbaf55c2f feat(options): don't overwrite indentexpr/foldexpr/foldmethod when set by plugins. Fixes #6464 2025-09-18 22:19:03 +02:00
Folke Lemaitre
75a3809e15 fix(lsp): schedule_wrap setting up LSPs to work around root cause of #6456. Fixes #6456 2025-09-18 13:52:07 +02:00
Folke Lemaitre
b93303d233 feat(treesitter): refactored setting up treesitter indent/highlight/folds 2025-09-18 09:49:54 +02:00
Folke Lemaitre
5e2c4e62f2 feat(lsp): enable LSP folds when available 2025-09-17 08:11:33 +02:00
Folke Lemaitre
64ee23f38f style: remove references to Neovim 0.10 2025-09-17 07:14:37 +02:00
Folke Lemaitre
9fa832dc95 fix(lsp): properly register capabilities with new vim.lsp.config. Not needed for blink 2025-09-16 15:41:21 +02:00
Folke Lemaitre
2f75d9a90f fix(lsp): properly ambiguate denols vs vtsls 2025-09-15 21:00:19 +02:00
Folke Lemaitre
23b9cdeb34 fix(lspconfig): remove all references to lspconfig. Closes #6426 2025-09-15 20:42:10 +02:00
Folke Lemaitre
0d27e89a36 refactor(lsp): cleanup lsp config 2025-09-15 16:28:46 +02:00
Iordanis Petkakis
773f28b491 fix(mason): migrate to mason v2 (#6053)
## Description
`mason-lspconfig` v2 made changes to conform with latest Neovim
`vim.lsp.config`/`vim.lsp.enable` API.

- Lock `mason` and `mason-lspconfig` to v1 versions for Neovim <0.11 and
latest HEAD for Neovim >=0.11.
- Change `:get_install_path()` method in LazyVim to use
`LazyVim.get_pkg_path()` and also update name references to new ones.
- Change `nvim-lspconfig` from `LazyFile` to `{ "BufReadPre",
"BufNewFile", "BufWritePre" }` for Neovim >=0.11, since on `BufReadPost`
the LSP would not attach on the first buffer. Previously the
`setup.handlers()` function from `mason-lspconfig` would take care of
that, but that has been removed on v2. I fail to think if there's a
better way to handle this.

Most of the changes in `/lsp/init.lua` are thanks to @williamboman
comment
[here](https://github.com/LazyVim/LazyVim/pull/6041#issuecomment-2857266471).

I've also seen that both `mason-lspconfig` and `rustaceanvim` now have
as minimum requirements Neovim >=0.11.
As such I would suggest, instead of all the conditional checks for
Neovim versions to create a stable release where we pin `mason` and
`mason-lspconfig` to v1 versions and then only incorporate William's
suggestions in a new release and mention in the README that users who
are on Neovim <0.11 should use the stable release where the plugin
versions are pinned to v1. Not sure how you want to tackle this, so this
is merely just a suggestion from my part.

Both #6041 and #6045 tackle only with the new name references and the
offending line that was causing the error, but don't take into
consideration the LSP servers configurations. `opts.setup` would not
execute on both, since that was handled by `setup_handlers()` function
in the past. I checked with Typescript lang and with those PRs there are
no Javascript settings in `vtsls` (by checking with
`:=LazyVim.opts("nvim-lspconfig").servers.vtsls`).
#6045 also tried to change the method `:get_install_pkg()` by using
`vim.fn.exepath`, but to my understanding that only returns the binary
path not the package installation path and that is later concatenated to
find other paths, which I believe is not correct.

PS: There are 2 commits, because my LazyVim fork was not up to date and
updated it and then merged the branch I had into a new branch. Sorry if
that causes any inconvenience.
<!-- Describe the big picture of your changes to communicate to the
maintainers
  why we should accept this pull request. -->

## Related Issue(s)
Fixes #6039
<!--
  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>
Co-authored-by: William Boman <william@redwill.se>
Co-authored-by: Luis Durão <kpvrzlzzx@mozmail.com>
2025-09-15 12:08:19 +02:00
Folke Lemaitre
a7a94c50ac refactor: remove all <0.11 compat code 2025-09-15 11:16:53 +02:00
Folke Lemaitre
c20c402295 fix(mason): rename and pin to v1 2025-05-12 10:39:04 +02:00
Folke Lemaitre
0b6d1c0050 style(lsp): remove refs to document_highlight, which is no longer used 2024-12-16 17:47:07 +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
Folke Lemaitre
ad52bf91bc feat(extras): blink (#4680)
## Description

Extra to use [blink.cmp](https://github.com/Saghen/blink.cmp) instead of
**nvim-cmp**.

## Todo

- [x] tokyonight suport
- [x] basic integration
- [ ] check / update all cmp sources
- [ ] copilot and others integration 
- [x] native lazydev source

## Limitations

There's no copilot source, so instead when enabling both blink and
copilot:
- blink ghost text is disabled
- copilot suggestions are enabled
- use `<tab>` to navigate snippets and accept copilot completions 

## Related Issue(s)

- https://github.com/LazyVim/LazyVim/discussions/4679
2024-11-02 09:54:55 +01:00
dotfrag
61ce1cfaaf feat(python): default to new ruff instead of ruff_lsp (#4126)
## Description

Change default python ruff lsp from `ruff_lsp` to `ruff`. It is now
marked as stable. I have been using it for a few days without any
problems. I use python for relatively small to medium projects. Maybe
someone who is using python more rigorously has better feedback.

References:

https://github.com/astral-sh/ruff-lsp (see note)
https://github.com/astral-sh/ruff/releases/tag/0.5.3
https://docs.astral.sh/ruff/editors/setup/#neovim

Also the issue in https://github.com/LazyVim/LazyVim/pull/3057 has been
resolved. I tested it and I only get 1 `ruff server` process per nvim
instance. The processes close correctly when nvim is closed.

## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
2024-07-21 12:24:28 +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
Folke Lemaitre
8c900f92e7 fix(lsp): prevent setting up mason-lspconfig more than once when setting mslp opts 2024-06-29 21:01:42 +02:00
Folke Lemaitre
05e45e0d35 refactor: LazyVim.config 2024-06-16 15:35:38 +02:00
Folke Lemaitre
3233385ddb fix(vue): disable inlay hints for vue, since they seem broken 2024-06-11 23:21:56 +02:00
Folke Lemaitre
ab41ff551b refactor: use lazy's new opts_extend functionality for treesitter and mason 2024-06-07 09:03:59 +02:00
Erik Lindebratt
9a635ef8d6 fix(lsp): Enable using deno.enablePaths in denols settings (#3446) 2024-06-04 11:31:29 +02:00
Folke Lemaitre
5e76948d58 feat(coding): use lazydev.nvim instead of neodev.nvim 2024-06-02 09:33:52 +02:00
Folke Lemaitre
c14d21ce75 feat: moved neoconf.nvim to extras 2024-06-02 09:05:16 +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
9d999fa210 refactor: refactored mason/typescript/vue support 2024-06-01 08:31:10 +02:00
Folke Lemaitre
f6bcf6f12c fix(lsp): fix ts/deno both attaching 2024-05-29 15:39:17 +02:00
Folke Lemaitre
fba06ce9f5 feat(typescript)!: the typescript extra now uses vtsls instead of tsserver. You may want to update your lsp settings. 2024-05-29 15:10:57 +02:00
Folke Lemaitre
4bbeb37a18 fix(lsp): fix LazyVim's on_file_rename to work according to the lsp spec 2024-05-29 14:45:55 +02:00
Folke Lemaitre
e68ff6897e feat(lsp): config option to exclude certain filetypes from inlay hints. Closes #3202 2024-05-27 21:19:36 +02:00
Iordanis Petkakis
7aa37064a2 fix(lspconfig): make opts a function (#3311)
`LazyVim.config` gets evaluated during the parsing phase with `opts`
as a table (thus not taking into account changes made in the user's
personal configuration for the icons), so make `opts` a function to
defer the evaluation until the plugin loads.
2024-05-26 16:06:15 +02:00
Folke Lemaitre
46cf5347b5 fix(lsp): only enableinlay hints for when buffer is an actual file. See #3284 2024-05-23 07:14:17 +02:00
Folke Lemaitre
3db94e44a0 refactor(lsp): refactored again :) 2024-05-20 20:25:55 +02:00
Folke Lemaitre
20e002f9f0 feat(lsp): properly update certain Neovim functionlity based on dynamic capabilities. See #3244. Fixes #3246 2024-05-20 00:08:05 +02:00
Folke Lemaitre
cc99b219de feat(lsp): document highlights now use native lsp. vim-illuminate is available as an extra 2024-05-17 09:19:28 +02:00
Folke Lemaitre
76f9dbb40c refactor: use LazyVim.opts 2024-05-16 22:11:55 +02:00
Folke Lemaitre
960e958548 feat(lsp): enable inlay hints by default on Neovim 0.10 2024-05-16 21:25:51 +02:00
Folke Lemaitre
91ead22116 feat(lua_ls): configure default lua_ls inlay hint settings 2024-05-15 15:48:46 +02:00
Iordanis Petkakis
6a2545025e fix(lsp): check if diagnostics.signs is disabled by user (#2897) 2024-05-15 11:29:55 +02:00
Iordanis Petkakis
8968c9e9ea feat(mason-lspconfig): allow opts.ensure_installed to be taken into account (#3134) 2024-05-12 10:09:54 +02:00