Do you use an LSP for python ? If so, which one ?

I just discovered basedpyright. NUTS. It is hands down the best open source experience I have had developing in this infuriatingly promiscuous language with no concern for runtime safety (I understand the historical reasons... I am just sad it has become the defacto standard for my field).

#python #languageserverProtocol #lsp #emacs #basedPyright

pylsp (python-lsp-server)
30%
pyright
15%
basedpyright
25%
pylance
0%
Other (please tell us more!)
30%
Poll ended at .
Explainer: Tree-sitter vs. LSP

I got asked a good question today: what is the difference between Tree-sitter and a language server? I don’t understand how either of these tools work in depth, so I’m just going to explain from an observable, pragmatic point of view.

Lambda Land

Back when I was looking at switching command line editors, #MicroEditor had top notch mouse support, while #HelixEditor had first class #TreeSitter and #LanguageServerProtocol support (and I wanted both).

My hunch was improving mouse support in hx was much more doable (correct, as that PR showed - but it never got accepted), and I've been using hx.

Meanwhile LSP support doesn't seem to have improved much in Micro, sadly. eg LSP feature request https://github.com/micro-editor/micro/issues/1138 opened in 2018 and closed in frustration in 2023, and discussion https://github.com/micro-editor/micro/discussions/3231 links to several since abandoned plugins, but also https://github.com/Andriamanitra/mlsp/

[Feature Request] Add support for Language Server Protocol servers · Issue #1138 · micro-editor/micro

As noted in #174 (comment) It would be nice if Micro had an inbuilt LSP client. This means we could then use Micro to talk to a whole bunch of LSP servers and then get more advanced support for aut...

GitHub

@felix
> Out of the box #Emacs lacks modes for a lot of newer languages.

The good news is that #Emacs now has built-in support (via Eglot) for #LanguageServerProtocol, so it can now natively use whatever LSP programs you install.

The bad news is that the LSP ecosystem seems to be really scattered and there's no smooth way to just get general support for arbitrary languages.

So you need to hunt down each one. But it is no longer necessary to get Emacs-specific support.

And here it is, the #languageserverProtocol plugin of #suetum for #vscode is mostly done for the features I need right now! Considering this took one and a half day to put together, I'm pretty satisfied with it.

There's tons of improvement that can be done (and I think symbol resolution is something I will sooner or later add), but now I'm up to adding includes (welp, currently the program can only be in a single file!) and debugging tools.

Anyone know of tools kind of like #languageServerProtocol but instead of keeping the AST in memory they do streaming parse / search on the fly? I'm not a huge fan of masssive memory use and it feels like we're leaving performance on the table by parsing entire files/folders instead of just enough to get to what you want.

I've added the just-lsp package to the set of #ArchLinux packages:
https://archlinux.org/packages/extra/x86_64/just-lsp/

In case you're relying on #just, try it out in with your language-server enabled editor of choice.
It's really quite useful!

#RustLang #LanguageServerProtocol

Arch Linux - just-lsp 0.2.5-1 (x86_64)

You suffer from the Copilot pause,

I suffer from the LSP pause.

We are not the same.

#DeveloperExperience #Developer #Programming #GitHubCopilot #GitHub #Copilot #AI #LLM #CopilotPause #LanguageServerProtocol #LSP #WeAreNotTheSame

TIL Network protocols Sans I/O ⚡

“… network protocol implementations written in Python that perform no I/O (this means libraries that operate directly on text or bytes; this excludes libraries that just abstract out I/O).” 🤯

Read the reference page 👇
https://sans-io.readthedocs.io/

#Reusability #Python #FastCGI #HTTP2 #H11 #IRC #OAuth2 #OAuthLib #WebSocket #SOCKS5 #RFC2217 #SerialOverIP #EPICS #FIX #QUIC #LanguageServerProtocol #SMTP #DBus #ThorlabsAPT #Matrix #SSL #TLS #CPython #multipart #formdata

Network protocols, sans I/O — Sans I/O 1.0.0 documentation

@b0rk thanks for sharing this. I’d already had a play with the #HelixEditor (impressive first class #LanguageServerProtocol support) and had a look tonight at the #MicroEditor (nice mouse support, assorted plugins but no official channel). Neither seems a perfect match but with a little personalisation either might serve - precisely your wider point about effort and configuration 😉