feat: move entirely to built in vim.lsp.config
#35
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📑 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
andvim.lsp.enable
for powering LSP features in Neovim.Required Before Merging
nvim-lspconfig
migration tovim.lsp.config
: Missing legacy configs neovim/nvim-lspconfig#3705mason-lspconfig
v2 releaseworkspace_required
option invim.lsp.config
ℹ Additional Information
config
table has been refactored to be a general API forvim.lsp.config
which includes moving default capabilities and flags toconfig = { ["*"] = { capabilities = {}, flags = {} } }
, users can still do their configuration in~/.config/nvim/lsp/<server_name>.lua
on_attach
behavior is moved to an autocommand onLspAttach
eventon_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 defaulton_attach
autocommandcapabilities
andflags
is simply callingvim.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 withvim.lsp.config[server_name]
mason-lspconfig
at runtime. This is not necessary as Mason packages will manage their own mappings tonvim-lspconfig
server names