lapce-python icon indicating copy to clipboard operation
lapce-python copied to clipboard

Disable linting/formatting

Open SecT0uch opened this issue 1 year ago • 4 comments

I would like to use ruff-lsp for linting and formatting and python-language-server for completions (ruff doesn't do completions).

When activating both plugins at the same time, linting is not working anymore. Is there any way to configure these options of the LSP server ?

I would like to configure the LSP server with:

pylsp.plugins.autopep8.enabled = false
pylsp.plugins.flake8.enabled = false
pylsp.plugins.yapf.enabled = false
pylsp.plugins.black.enabled = false
pylsp.plugins.pylint.enabled = false
pylsp.plugins.pyflakes.enabled = false
pylsp.plugins.pycodestyle.enabled = false
pylsp.plugins.pydocstyle.enabled = false
pylsp.plugins.mccabe.enabled = false
pylsp.plugins.rope_autoimport.code_actions.enabled = false

Can we do that via settings.toml or superlou.lapce-python/volt.toml ?

Or even better: would it be possible to disable linting and formatting capabilities of the plugin ? So if a new linter gets added to python-lang-server we won't have to edit our configuration to exclude it

SecT0uch avatar Aug 23 '24 09:08 SecT0uch

I'm currently trying out Lapce and I'm running into the same problem. Is there no way to configure the language server settings?

KrisSlyka avatar Mar 14 '25 13:03 KrisSlyka

I think there used to be in an older version of this plugin, and maybe there still is? https://github.com/superlou/lapce-python/blob/819f9b016efb136f127500e928e59ce092af51f5/src/main.rs#L49

That said, I believe this plugin is pretty out of date and I'm not sure what is the state of the art for Lapce plugins. I'd be happy to review a PR.

superlou avatar Mar 14 '25 22:03 superlou

Is there a way to apply a repo as a template for an existing project? It looks like this plugin is a bit out of date.

superlou avatar Mar 15 '25 00:03 superlou

Well, this plugin is the only that seems to offer python LSP support in Lapce, so it's the one I tried!

Looking at the code in the Volt branch, which is what seems to be the thing you get when installing the plugin in Lapce, it just seems to pass an empty array as server_args and and then the whole initialization_options struct. I tried sticking options for the language server in various config files but nothing happened…

I'd help out but I really don't have the energy right now to learn enough rust to do this

KrisSlyka avatar Mar 15 '25 17:03 KrisSlyka