feat: R specific root_dir setup

This commit is contained in:
Maximilian Muecke 2023-09-27 22:40:42 +02:00
parent 4d561aced3
commit 7cbc788b46

View file

@ -11,7 +11,13 @@ return {
"neovim/nvim-lspconfig",
opts = {
servers = {
r_language_server = {},
r_language_server = {
root_dir = function(fname)
return require("lspconfig.util").root_pattern("DESCRIPTION", "NAMESPACE", ".Rbuildignore")(fname)
or require("lspconfig.util").find_git_ancestor(fname)
or vim.loop.os_homedir()
end,
},
},
},
},