NLeSC / guide

Software Development Guide
https://guide.esciencecenter.nl
Creative Commons Attribution 4.0 International
47 stars 30 forks source link

Python LSP language server #317

Closed egpbos closed 1 month ago

egpbos commented 1 year ago
          hi all! i'm not sure this is the right place, please let me know if not ;)

I'm using a language server whenever i can, and for python the best (only?) is https://github.com/python-lsp/python-lsp-server This comes with its own choice for linter/formatter etc. I really recommend using an LSP to catch errors and find docs!

Originally posted by @jiskattema in https://github.com/NLeSC/guide/issues/302#issuecomment-1795160001

jiskattema commented 1 year ago

By default the lsp server uses: rope, pyflakes, pycodestyle, autopep8/yapf, flake8, pylint. There are a bunch of other options, but python-lsp-server can work with Ruff via a plugin.

egpbos commented 1 month ago

LSP is a great protocol, but it's a bit too implementation-detail-specific to be useful in a guide on research software engineering. I think it's enough for engineers to know that they linting is very helpful. What tool they use exactly is up to them, as long as it is a good editor with support for things like this.