fix: add function for resolving workspace folder
This commit is contained in:
@@ -27,6 +27,12 @@ return {
|
||||
command = "EslintFixAll",
|
||||
})
|
||||
end,
|
||||
on_new_config = function (config, new_root_dir)
|
||||
config.settings.workspaceFolder = {
|
||||
uri = vim.uri_from_fname(new_root_dir),
|
||||
name = vim.fn.fnamemodify(new_root_dir, ':t'),
|
||||
}
|
||||
end
|
||||
})
|
||||
|
||||
lspconfig.omnisharp.setup({
|
||||
@@ -108,6 +114,7 @@ return {
|
||||
)
|
||||
end
|
||||
|
||||
vim.keymap.set("n", "<leader>e", vim.diagnostic.open_float, { desc = "Display errors" })
|
||||
vim.keymap.set("n", "K", vim.lsp.buf.hover, { desc = "Display symbol info", buffer = ev.buf })
|
||||
end,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user