-
|
I would like to provide the following additional settings to pyrefly via the "settings": {
"pyrefly": {
"analyzer": true,
"diagnostics": true,
"typechecking": "strict"
}
}How can I provide these settings in my my current configuration: {
"rust-analyzer.serverPath": "/usr/lib/rustup/bin/rust-analyzer",
"languageserver": {
"pyrefly": {
"command": "pyrefly",
"args": ["lsp"],
"filetypes": ["python"],
"rootPatterns": ["pyrefly.toml", "pyproject.toml", ".git"]
}
}
}coc.nvim wiki explains how to setup pyrefly but I am unsure how to provide these additional settings. Why I wish to provide these parameters ? because of this pyrefly issue (facebook/pyrefly#1633) At the moment, unless I provide these settings in each of my [tool.pyrefly]
diagnostics = trueI would like to provide these settings globally instead.
I am using pyrefly built from source: a4d0bfa8abb78ef1ecffbf6c5eae765be1998c5b |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
|
From the commit the pyrefly will read "languageserver": {
"pyrefly": {
"command": "pyrefly",
"args": ["lsp"],
"filetypes": ["python"],
"rootPatterns": ["pyrefly.toml", "pyproject.toml", ".git"],
"initializationOptions": {
"pyrefly": {
"disableLanguageServices": true
}
}
}
}, |
Beta Was this translation helpful? Give feedback.
Ok, I finally managed to configure it, here is my configuration:
{ "languageserver": { "pyrefly": { "command": "pyrefly", "args": ["lsp"], "filetypes": ["python"], "rootPatterns": ["pyrefly.toml", "pyproject.toml", ".git"], "initializationOptions": { "pyrefly": { "displayTypeErrors": "force-on" } } } }After checking pyrefly source code I could not find the
diagnosticssetting but I found the documentation I was looking for: https://pyrefly.org/en/docs/IDE/#customization, it describes the option I was looking fordisplayTypeErrors.Thanks @fannheyward f…