Skip to content

neovim/lsp: expose low-level API #860

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Apr 28, 2025
Merged

neovim/lsp: expose low-level API #860

merged 7 commits into from
Apr 28, 2025

Conversation

NotAShelf
Copy link
Owner

@NotAShelf NotAShelf commented Apr 25, 2025

This exposes a low(er) level API for configuring LSPs directly with the new
options provided by Neovim 0.11. The idea is to allow configuring LSPs without
relying on the inclusion of language modules into nvf, or allowing language
modules in user configurations.

The language modules still use the old API, and will be migrated in due time.
Changes here are split off to avoid withholding important additions to the
module system until all language modules are converted. Language modules, of
course, will still need to be converted to this new API, after which lspconfig
shall be made into a regular plugin module instead of its current, specially
treated "variant."

Related: #748

github-actions bot pushed a commit that referenced this pull request Apr 25, 2025
Copy link

github-actions bot commented Apr 25, 2025

🚀 Live preview deployed from 3147ef1

View it here:

Debug Information

Triggered by: horriblename

HEAD at: lsp-api

Reruns: 747

github-actions bot pushed a commit that referenced this pull request Apr 27, 2025
@NotAShelf NotAShelf force-pushed the lsp-api branch 2 times, most recently from c262071 to 97044e6 Compare April 27, 2025 03:32
github-actions bot pushed a commit that referenced this pull request Apr 27, 2025
github-actions bot pushed a commit that referenced this pull request Apr 27, 2025
@NotAShelf NotAShelf merged commit efa8593 into main Apr 28, 2025
13 checks passed
Copy link

✅ Preview has been deleted successfully!

@jeckhart
Copy link

jeckhart commented Apr 28, 2025

Note: this breaks if you're not on neovim 0.11.0+ as vim.lsp.config wasn't introduced until then.

I found it as I'm on nix-stable-24.11 until 25.05 comes out, and that has neovim v0.10.2 still.

Error from today:

Error detected while processing VIMINIT..script /nix/store/n3l1rbdiznj7scgmlmfw7ixkpgjvjpnv-neovim-pack-dir/init.lua:
E5113: Error while calling lua chunk: /nix/store/3z4gd16qap9d9v8syz51qlnisy3gij5i-init.lua:435: attempt to index field 'config' (a nil value)
stack traceback:
        /nix/store/3z4gd16qap9d9v8syz51qlnisy3gij5i-init.lua:435: in main chunk
        [C]: in function 'dofile'
        ...3l1rbdiznj7scgmlmfw7ixkpgjvjpnv-neovim-pack-dir/init.lua:13: in main chunk
Press ENTER or type command to continue

neovim version:

❯ nvim -V1 -v
NVIM v0.10.2
Build type: Release
LuaJIT 2.1.1713773202

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "
/nix/store/wswwc2v8xkcksy1sym3kyw01ynvw0947-neovim-unwrapped-0.10.2/share/nvim
"

Run :checkhealth for more info

@NotAShelf
Copy link
Owner Author

Please do not override nvf's nixpkgs version. I know this can be (and should be) communicated better, but we only target nixpkgs unstable since we do not have the manpower to divert energy to supporting the stable branch. You can remove the follows line, and it should work as intended.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants