fix(mesonlsp): use correct root dir
This commit is contained in:
@@ -3,6 +3,15 @@ return {
|
|||||||
enable = true,
|
enable = true,
|
||||||
mason = { "mesonlsp" },
|
mason = { "mesonlsp" },
|
||||||
lspconfig = {
|
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 = {
|
settings = {
|
||||||
others = {
|
others = {
|
||||||
disableInlayHints = true,
|
disableInlayHints = true,
|
||||||
|
|||||||
Reference in New Issue
Block a user