feat: add note about root_dir for nvim-lspconfig#2642
Open
martenmatrix wants to merge 4 commits intodenoland:mainfrom
Open
feat: add note about root_dir for nvim-lspconfig#2642martenmatrix wants to merge 4 commits intodenoland:mainfrom
martenmatrix wants to merge 4 commits intodenoland:mainfrom
Conversation
Author
|
I apologize for not creating an issue for this. I hope that is fine. |
bartlomieju
requested changes
Mar 27, 2026
Member
bartlomieju
left a comment
There was a problem hiding this comment.
Thanks for the contribution! The single_file_support → workspace_required update is needed, but there are a few issues to address:
1. root_dir example is incorrect
The added code block has:
root_dir = {"package.json"},But root_dir expects a function, not a table of strings. It should use root_pattern from lspconfig:
root_dir = require("lspconfig").util.root_pattern("package.json"),As written, this would break users' configs.
2. Kickstart.nvim section not updated
The kickstart.nvim example further down the page still uses single_file_support = false — this should also be updated to workspace_required = true for consistency.
3. Fragile GitHub line-number link
The link to lsp/ts_ls.lua#L56-L68 will break as that file changes. Consider linking to the file without line numbers, or just describing the behavior inline.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
nvim-lspconfigis the official collection of LSP server configurations by NeoVim. Therefore, the majority of NeoVim users use those defaults. It should be included how to prevent attachingts_lsanddenolsto a buffer.Additionally,
single_file_supportwas renamed toworkspace_requiredin NeoVim.