let LS detect workspace root after first file opened#562
Open
Konfekt wants to merge 3 commits intoyegappan:mainfrom
Open
let LS detect workspace root after first file opened#562Konfekt wants to merge 3 commits intoyegappan:mainfrom
Konfekt wants to merge 3 commits intoyegappan:mainfrom
Conversation
Only set workspace root once the first file of that file type is opened; otherwise the workspace root often is $HOME (say when using Gvim, or opening a file in a Git repo) and the LS scans too many files Partially resolves [0] as ideally this workspace root would automatically change with the CWD, in particular after loading a session (:h mksession) Links: [0]: yegappan#512
Contributor
Author
|
If initializing the LS for a language as soon as a buffer of that language is opened sounds sensible, then the cleaner solution would be officializing that list of LSs (g:LspServers) and let the plug-in take care of adding the LSP and all commands buffer-locally. If this also sounds sensible, I could craft such a PR. |
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.
Only set workspace root once the first file of that file type is opened; otherwise the workspace root often is
$HOMEor more generally different from the repo of the file (say when using Gvim, or generally opening a file in a Git repo different from the current work dir) and the LS scans too many filesPartially resolves 0 as ideally this workspace root would automatically change with the CWD, in particular after loading a session (
:h mksession)