[FEAT] pyrefly lsp config path customization#2481
Open
yeetypete wants to merge 6 commits intofacebook:mainfrom
Open
[FEAT] pyrefly lsp config path customization#2481yeetypete wants to merge 6 commits intofacebook:mainfrom
yeetypete wants to merge 6 commits intofacebook:mainfrom
Conversation
…config cli argument or editor pyrefly.ConfigFile setting. --config cli argument takes priority.
…s not control the pyrefly lsp server configuration
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.
Summary
Adds support for customizing the config path used by the pyrefly lsp. This is particularly useful in large projects where your
search-pathconfiguration includes paths that are outside the directory tree where the pyrefly lsp searches for its configuration. In that case currently if you open a file in your editor the lsp will fall back to showing you the file without using any of your custom pyrefly settings.Test Plan
Tested all possible configuration options for setting the config path used by the pyrefly lsp:
PYREFLY_CONFIGenv var.pyrefly lsp --config <config path>.pyrefly.configPathvscode setting.pyrefly.lspArgsin the vscode settings to include--config.No custom build of the pyrefly vscode extension is needed to test this change.
TODO
pyrefly checkandpyrefly lspuse the same config loading interface for explicit config loading?