News for hackers. Stuff that matters.
Re:LSP-AI: open-source language server serving as back end f... by ukuina on Sunday June 09, 2024 @03:00PM (#40626654)
Are there any text editors that use LSPs for non-coding tasks?
Re:LSP-AI: open-source language server serving as back end f... by deanishe on Monday June 10, 2024 @12:55AM (#40630291)
I've seen one for Bean ledgers, so that's a bookkeeping LSP, I guess.
Re:LSP-AI: open-source language server serving as back end f... by Dessesaf on Monday June 10, 2024 @01:42AM (#40630565)
It's not really about the editor. The editor (the LSP client) just provides support for telling the server what the user wants a definition for, and how to display that back to the user.

As a simple example, I'm learning japanese so I built a 50-line LSP server that just looks up definitions of a word under cursor in a dictionary. This is an almost-trivial server. Its only capability is to offer definitions when hovering a position in a text document. It works perfectly well in neovim with lspconfig with 2 lines of configuration. I'm sure it would be similarly trivial to integrate in VSCode, Emacs, etc.

Other non-coding uses of LSP that I'm aware of are spell-checking and grammar suggestions (LSP clients can display diagnostics), semantic syntax highlighting (e.g. for highlighting a markdown document), and projects like the one discussed here which just integrate more general-purpose AI.