summaryrefslogtreecommitdiff
path: root/lua/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'lua/plugins')
-rw-r--r--lua/plugins/lspconfig.lua16
1 files changed, 15 insertions, 1 deletions
diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua
index d9395ff..a5cb52a 100644
--- a/lua/plugins/lspconfig.lua
+++ b/lua/plugins/lspconfig.lua
@@ -10,6 +10,14 @@ local function get_lua_lib()
}
end
+local function get_gdscript_cmd()
+ local port = os.getenv('GDScript_Port') or '6005'
+ if vim.loop.os_uname().sysname == 'Linux' then
+ return { 'nc', 'localhost', port }
+ end
+ return { 'ncat', 'localhost', port }
+end
+
local servers = {
clangd = {},
gopls = { -- just the key for the gopls config
@@ -175,7 +183,13 @@ return {
setup_server('ruff_lsp')
setup_server('lua_ls')
-- assumes localhost is mirrored (networkingMode=mirrored in .wslconfig)
- setup_server('gdscript')
+ -- setup_server('gdscript')
+ lspconfig['gdscript'].setup({
+ capabilities = capabilities,
+ on_attach = on_attach,
+ settings = servers['gdscript'],
+ cmd = get_gdscript_cmd(),
+ })
end,
},
}