fix(mesonlsp): use correct root dir

This commit is contained in:
2024-10-08 21:02:59 +02:00
parent 30e0e768c4
commit 7fa49801a6
+9
View File
@@ -3,6 +3,15 @@ return {
enable = true,
mason = { "mesonlsp" },
lspconfig = {
---@type fun(filename: string, bufnr: number): string?
root_dir = function(filename, bufnr)
local parent = require("lspconfig").util.find_git_ancestor(filename)
if not parent then
local win = vim.fn.bufwinid(bufnr)
parent = vim.fn.getcwd(win)
end
return parent
end,
settings = {
others = {
disableInlayHints = true,