/lsp-rooter.nvim

Neovim plugin to automatically change the current working directory to the LSP root dir

Primary LanguageLuaOtherNOASSERTION

🌳 lsp-rooter.nvim

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.

✨ Features

  • Automatically cd to project directory using Neovim's LSP client
  • Dependency free, does not rely on lspconfig
  • nvim-tree.lua support/integration

⚡️ Requirements

  • Neovim >= 0.7.0

📦 Installation

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
}

⚙️ Configuration

Lsp Rooter comes with the following defaults:

{
  -- Table of lsp clients to ignore by name
  -- eg: {"efm", ...}
  ignore_lsp = {},
}