migrate lspconfig to native vim.lsp.config API for nvim 0.11+
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
cb3df7c03c
commit
1a2dfc753d
@ -132,28 +132,19 @@ require("mason").setup({
|
||||
|
||||
require("mason-lspconfig").setup({
|
||||
ensure_installed = { "lua_ls", "rust_analyzer" },
|
||||
automatic_enable = true,
|
||||
})
|
||||
|
||||
require("lspconfig").lua_ls.setup({
|
||||
vim.lsp.config("lua_ls", {
|
||||
settings = {
|
||||
Lua = {
|
||||
runtime = {
|
||||
-- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
|
||||
version = "LuaJIT",
|
||||
},
|
||||
diagnostics = {
|
||||
-- Get the language server to recognize the `vim` global
|
||||
globals = { "vim" },
|
||||
},
|
||||
runtime = { version = "LuaJIT" },
|
||||
diagnostics = { globals = { "vim" } },
|
||||
workspace = {
|
||||
-- Make the server aware of Neovim runtime files
|
||||
library = vim.api.nvim_get_runtime_file("", true),
|
||||
checkThirdParty = false,
|
||||
},
|
||||
-- Do not send telemetry data containing a randomized but unique identifier
|
||||
telemetry = {
|
||||
enable = false,
|
||||
},
|
||||
telemetry = { enable = false },
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
Loading…
Reference in New Issue
Block a user