Open languitar opened 6 years ago
This would be quite useful. I, too, had to go through the vscode plugin code via #139 to find out how to enable plugins that I already have running using a different editor plugin.
Any update on this? Struggling to find even basic samples for what and how to configure things.
I agree, this is a bit frustrating. The point of language servers is to be IDE agnostic.
See https://raw.githubusercontent.com/palantir/python-language-server/develop/vscode-client/package.json also, Python LSP mode for spacemacs, which uses pyls, outputs this default config:
:plugins.jedi_completion.enabled t
:plugins.jedi_definition.follow_imports t
:configurationSources ["pycodestyle"]
:plugins.jedi_completion.enabled t
:plugins.jedi_definition.enabled t
:plugins.jedi_definition.follow_imports nil
:plugins.jedi_definition.follow_builtin_imports nil
:plugins.jedi_hover.enabled t
:plugins.jedi_references.enabled t
:plugins.jedi_signature_help.enabled nil
:plugins.jedi_symbols.enabled nil
:plugins.jedi_symbols.all_scopes t
:plugins.mccabe.enabled nil
:plugins.mccabe.threshold 15
:plugins.preload.enabled t
:plugins.preload.modules nil
:plugins.pycodestyle.enabled t
:plugins.pycodestyle.exclude nil
:plugins.pycodestyle.filename nil
:plugins.pycodestyle.select nil
:plugins.pycodestyle.ignore nil
:plugins.pycodestyle.hangClosing nil
:plugins.pycodestyle.maxLineLength nil
:plugins.pydocstyle.enabled nil
:plugins.pydocstyle.convention nil
:plugins.pydocstyle.addIgnore nil
:plugins.pydocstyle.addSelect nil
:plugins.pydocstyle.ignore nil
:plugins.pydocstyle.select nil
:plugins.pydocstyle.match "(?!test_).*.py"
:plugins.pydocstyle.matchDir nil
:plugins.pyflakes.enabled t
:plugins.rope_completion.enabled t
:plugins.yapf.enabled t
:rope.extensionModules nil
:rope.ropeFolder nil
For reference in case anyone else ends up here, I've managed to get the following to work to some extent for me:
{
"pyls": {
"configurationSources": ["flake8"],
"plugins": {
"flake8": {
"enabled": true
},
"mypy": {
"enabled": true
},
"pycodestyle": {
"enabled": false
},
"pyflakes": {
"enabled": true
},
"pylint": {
"enabled": true
}
}
}
}
The above lives in .vim/settings.json
in my project root and is successfully picked up by my language server client (LanguageClient-neovim) and passed into pyls, but I have no idea whether I can provide more comprehensive settings to any of the various plugins.
Currently I don't seem to get mypy diagnostics back either, so there's still more to do.
If you are not using vscode, then there is no documentation on the available configuration options. I only accidentally found it by browsing the source code of the vscode plugin. Could a markdown file be added with the options or at least a reference to the json file from the plugin?