Update
This commit is contained in:
1 parent
7c152cc388
commit
b2d375f484
1 file changed
+13
@@ -51,10 +51,23 @@ vim.api.nvim_create_autocmd("LspAttach", {
|
|||||||
})
|
})
|
||||||
|
|
||||||
-- Enable LSP servers for Neovim 0.11+
|
-- Enable LSP servers for Neovim 0.11+
|
||||||
|
-- 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({
|
vim.lsp.enable({
|
||||||
"lua_ls",
|
"lua_ls",
|
||||||
"ols",
|
"ols",
|
||||||
"clangd",
|
"clangd",
|
||||||
|
"gdscript",
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Load Lsp on-demand, e.g: eslint is disable by default
|
-- Load Lsp on-demand, e.g: eslint is disable by default
|
||||||
|
|||||||
Reference in new issue
Block a user