Skip to content

feat: move entirely to built in vim.lsp.config #35

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

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft

feat: move entirely to built in vim.lsp.config #35

wants to merge 7 commits into from

Conversation

mehalter
Copy link
Member

@mehalter mehalter commented Apr 22, 2025

📑 Description

This is pretty far out, but gives a placeholder for future development and shows the progress getting made in the background. This moves entirely to using vim.lsp.config and vim.lsp.enable for powering LSP features in Neovim.

Required Before Merging

ℹ Additional Information

  • AstroNvim branch updated to use this version
  • config table has been refactored to be a general API for vim.lsp.config which includes moving default capabilities and flags to config = { ["*"] = { capabilities = {}, flags = {} } }, users can still do their configuration in ~/.config/nvim/lsp/<server_name>.lua
  • The default on_attach behavior is moved to an autocommand on LspAttach event
    • The configuration of the default on_attach function extension simply adds onto this autocommand and allows easily modifying it/reverting things that are not desired.
    • mappings/autocommands/commands options are still left and are simply part of the default on_attach autocommand
  • Default configuration of capabilities and flags is simply calling vim.lsp.config("*", { capabilities = M.config.capabilities, flags = M.config.flags })
  • require("astrolsp").lsp_opts(server_name) has been removed. The configuration can simply be retrieved with vim.lsp.config[server_name]
  • Remove hack for allowing users to extend mason-lspconfig at runtime. This is not necessary as Mason packages will manage their own mappings to nvim-lspconfig server names

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.

1 participant