From 98197f8102e693c26c0f575e24cf4acab3720876 Mon Sep 17 00:00:00 2001 From: mathijs-bakker Date: Thu, 25 Sep 2025 11:18:18 +0200 Subject: [PATCH] fix(lsp): update Godot LSP setup for Neovim 0.11+ --- lua/godotdev/lsp.lua | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lua/godotdev/lsp.lua b/lua/godotdev/lsp.lua index 4479e84..c941728 100644 --- a/lua/godotdev/lsp.lua +++ b/lua/godotdev/lsp.lua @@ -2,7 +2,6 @@ local M = {} M.setup = function(config) config = config or {} - local lspconfig = require("lspconfig") local utils = require("godotdev.utils") local host = config.editor_host or "127.0.0.1" @@ -20,16 +19,18 @@ M.setup = function(config) cmd = vim.lsp.rpc.connect(host, port) end - lspconfig.gdscript.setup({ + vim.lsp.config["gdscript"] = { name = "godot_editor", cmd = cmd, - filetypes = { "gd", "gdscript", "gdshader" }, - root_dir = lspconfig.util.root_pattern("project.godot"), + filetypes = { "gd", "gdscript", "gdshader", "gdscript3" }, + root_markers = { "project.godot", ".git" }, capabilities = capabilities, on_attach = function(client, bufnr) utils.suppress_unsupported_lsp_messages(client, { "Method not found: godot/reloadScript" }) end, - }) + } + + vim.lsp.enable("gdscript") end return M