This commit is contained in:
pmcc committed 2026-10-17 17:49:09 -04:00
1 parent b2d375f484
commit 1349e3b76f
7 files changed
+186 -14

No files matched your search

+17 -8
View File
@@ -50,24 +50,33 @@ vim.api.nvim_create_autocmd("LspAttach", {
end,
})
-- Enable LSP servers for Neovim 0.11+
-- Enable LSP servers. Configs come from nvim-lspconfig (lua/plugins/lspconfig.lua).
-- Per-server overrides go through vim.lsp.config("<server>", { ... }).
-- Server-specific overrides
-- Neovim uses LuaJIT
vim.lsp.config("lua_ls", {
settings = {
Lua = {
runtime = { version = "LuaJIT" },
diagnostics = { globals = { "vim" } }, -- Recognize 'vim' global
},
},
})
-- gdscript: Godot's LSP runs inside the Godot editor over TCP (no standalone binary).
-- Enable it in Godot via Editor Settings > Network > Language Server (default port 6005).
-- It is only available while the project is open in the Godot editor (or headless:
-- `godot --headless --editor --path .`); override the port with GDScript_Port.
if vim.fn.has("nvim-0.11") == 1 then
vim.lsp.config("gdscript", {
cmd = vim.lsp.rpc.connect("127.0.0.1", tonumber(os.getenv("GDScript_Port") or "6005")),
filetypes = { "gdscript" },
root_markers = { "project.godot" },
})
end
vim.lsp.enable({
"lua_ls",
"ols",
"clangd",
"gdscript",
"rust_analyzer",
"gopls",
})
-- Load Lsp on-demand, e.g: eslint is disable by default