Lsp Rooter is a Neovim plugin written in Lua to change the current working directory to the project's root directory automatically using Neovim's native LSP client.
- Automatically cd to project directory using Neovim's LSP client
- Dependency free, does not rely on
lspconfig
- nvim-tree.lua support/integration
- Neovim >= 0.7.0
Install the plugin with your preferred package manager:
" Vim Script
Plug 'poljar/lsp-rooter.nvim'
lua << EOF
require("lsp-rooter").setup {
-- your configuration comes here
-- or leave it empty to use the default settings
-- refer to the configuration section below
}
EOF
-- Lua
use {
"poljar/lsp-rooter.nvim",
config = function()
require("lsp-rooter").setup {
-- your configuration comes here
-- or leave it empty to use the default settings
-- refer to the configuration section below
}
end
}
Lsp Rooter comes with the following defaults:
{
-- Table of lsp clients to ignore by name
-- eg: {"efm", ...}
ignore_lsp = {},
}