diff options
| author | Sergei Slipchenko <faergeek@gmail.com> | 2025-07-25 00:41:56 +0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-24 13:41:56 -0700 |
| commit | 4d3b3bb8815fbe37bcaf3dbdb12a22382bc11ebe (patch) | |
| tree | 8f141671911960e6496803d0e2c33c025db8df33 | |
| parent | feat(biome): monorepo support #3972 (diff) | |
| download | nvim-lspconfig-4d3b3bb8815fbe37bcaf3dbdb12a22382bc11ebe.tar nvim-lspconfig-4d3b3bb8815fbe37bcaf3dbdb12a22382bc11ebe.tar.gz nvim-lspconfig-4d3b3bb8815fbe37bcaf3dbdb12a22382bc11ebe.tar.bz2 nvim-lspconfig-4d3b3bb8815fbe37bcaf3dbdb12a22382bc11ebe.tar.lz nvim-lspconfig-4d3b3bb8815fbe37bcaf3dbdb12a22382bc11ebe.tar.xz nvim-lspconfig-4d3b3bb8815fbe37bcaf3dbdb12a22382bc11ebe.tar.zst nvim-lspconfig-4d3b3bb8815fbe37bcaf3dbdb12a22382bc11ebe.zip | |
docs: mention 'exrc' for project-local configuration #3973
| -rw-r--r-- | README.md | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -126,6 +126,14 @@ Start with `:checkhealth vim.lsp` to troubleshoot. The most common reasons a lan 2. Missing filetype plugins. Some languages are not detected by Nvim because they have not yet been added to the filetype detection system. Ensure `:set filetype?` shows the filetype and not an empty value. 3. Not triggering root detection. Some language servers require a "workspace", which is found by looking for an ancestor directory that contains a "root marker". The most common root marker is `.git/`, but each config defines other "root marker" names. Root markers/directories are listed in `:help lspconfig-all`. + You can also explicitly set a root instead of relying on automatic detection by enabling `'exrc'` and adding an `.nvim.lua` at the desired root dir with the following code: + ```lua + vim.lsp.config('<client name>', { + root_dir = vim.fn.fnamemodify(debug.getinfo(1, 'S').source:sub(2), ':p:h'), + }) + ``` + Note that prior to nvim 0.12 `exrc` file is executed only if it's inside of a cwd where you start `nvim`. + ## Bug reports If you found a bug with LSP functionality, [report it to Neovim core](https://github.com/neovim/neovim/issues/new?assignees=&labels=bug%2Clsp&template=lsp_bug_report.yml). |
