Improved nvim-lspconfig config for r_language_server

This commit is contained in:
Ben Puryear 2024-05-22 18:13:35 -07:00
parent 4f96bdc98c
commit e8a8d50128

View file

@ -127,7 +127,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,
},
},
},
},