-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to configure pyls? #171
Comments
Thanks for making the issue!
The most robust way to configure pyls in particular is via config file:
https://github.com/palantir/python-language-server/blob/develop/README.rst#configuration
You can choose to put it in your $HOME, or into the directory where you
start the notebook server. Many of the plugins have their own config files,
while some can be merged together in a well-known file, e.g setup.cfg.
The stuff you found in the Schema is for The Future, where we make all of
those things configurable from the front end... but we aren't there yet.
We've talked about making a link to that page available from within the UI
(#128), as every single language server has a different scheme for config.
If some actually require cli config, we'll have to do some... Exciting
stuff to make it easy to configure. Right now, that would probably require
the entry_points approach.
…On Tue, Jan 21, 2020, 05:33 dynobo ***@***.***> wrote:
What I am trying to do...
... is to configure pyls (pycodestyle) to ignore some errors. If possible,
I would like to disable pycodestyle completely and go only with pyflakes.
(I use black as formatter, which produces a lot of "false positives" in
pycodestyle)
How I would like to learn how to do it...
It would be great to see an example of a more extensive jupyter-lab
configuration. So far the only example I found is this generic
"dummy"-snippet here
<https://github.com/krassowski/jupyterlab-lsp/blob/master/LANGUAGESERVERS.md#installing-language-servers>
:
{
"LanguageServerManager": {
"language_servers": {
"a-language-server-implementation": {
"argv": ["/absolute/path/to/a-language-server", "--stdio"],
"languages": ["a-language"]
}
}
}
}
I have found the necessary pyls configuration in this schema file
<https://github.com/krassowski/jupyterlab-lsp/blob/master/py_src/jupyter_lsp/specs/config/pyls.schema.json>,
but I don't know if/how this can be integrated/overwritten using jupyter
labs extensions settings.
Thanks!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<https://github.com/krassowski/jupyterlab-lsp/issues/171?email_source=notifications&email_token=AAALCRHDOONND2B6JO5KPCLQ63FN7A5CNFSM4KJRCYE2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IHS34XA>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAALCRBL2DQMHFJN4KSMFILQ63FN7ANCNFSM4KJRCYEQ>
.
|
In particular, please check this: https://github.com/krassowski/jupyterlab-lsp/issues/128#issuecomment-570894117 and let us know if it helped you. |
Thx, @krassowski , setting the ignore in setup.cfg like you described worked for me :-) Is it also possible to use flake8 or pyls-black instead of pycodestyle? Or is this not possible yet? The pls docu you linked mentions I have to set BTW: Thanks for this useful extension! Love the autocomplete! |
I think that switching to flake8 will require the configuration GUI, not sure if this can be achieved straightaway. I will try to expose some of the settings in the 0.8 release. |
Perfect, thanks! |
And happy that you enjoy it! Please do not hesitate to share this extension and contribute (even small documentation improvements help a lot!). |
@dynobo from past experiences with |
What I am trying to do...
... is to configure pyls (pycodestyle) to ignore some errors. If possible, I would like to disable pycodestyle completely and go only with pyflakes. (I use black as formatter, which produces a lot of "false positives" in pycodestyle)
How I would like to learn how to do it...
It would be great to see an example of a more extensive jupyter-lab configuration for jupyterlab-lsp. So far the only example I found is this generic "dummy"-snippet here:
I have found the necessary pyls configuration in this schema file, but I don't know if/how this can be integrated/overwritten using jupyter labs extensions settings.
Thanks!
The text was updated successfully, but these errors were encountered: