howl
howl copied to clipboard
Support for Language Server Protocol
This probably needs socket support first (cough cough)...
@megatux - Yes! I've been interested in this for a while and have started looking into this more deeply, but as always, time is scarce.
@kirbyfan64 - this does not necessary need socket support. LSP does not require sockets (any stream transport works) and there are definitely implementations that just talk LSP over stdio - which already works well in Howl.
For instance, the Python language server works on stdio by default (https://github.com/palantir/python-language-server/blob/develop/pyls/main.py). It also supports mypy, btw :smile:
Ohh, nice...
So much this. Gets us advanced language modes for free :-)
@shalabhc - will it work now by using the py-server as proxy?
I'm working my ass off atm, deadlines and stuff, with a codebase primarily in TypeScript, which really just is helpful when having the great input from the lang-server. Which means, I've left Howl aside for several weeks now, in favor of Atom — which blows balls in comparison to Howl, quality wise :'-(
Just have to make a hopeful bump here... I'm continually working 12 hour days with exclusively typescript code bases, so am stuck with Atom, Visual Code and Sublime these days (sob, sob) — I miss Howl soooo much it hurts my heart :'-(
This is probably the next thing I'll work on once I'm done with command-interaction-refactor (see branch of same name). I need langserver integration for stuff I'm working on atm. At one point I got the messaging between Howl and a langserver working, parsed using dkjson.
@ozra - do you have ideas on what the best way to design the UI for this might be? Which LSP features do you need most? I assume goto-definition and maybe completion?
I'll just randomly interject and say that it'd be really nice if the LSP and JSON-RPC parts were separate, since the latter could be reused for e.g. Dart's analysis server which really closely follows JSON-RPC.
(I actually had a sort-of-working JSON RPC that went in the black hole of data loss...)
I have a JSON-RPC thing working and unfinished LSP support. I can manually invoke 'textDocument/definition' etc and get meaningful results from within Howl. Nothing is tied into the editor yet. The JSON-RPC part is decoupled - we could pull it out into its own bundle (or even put in lib/howl?) if we want.
@shalabhc
Regarding UI, there's not that much to talk about for the most important features, pretty basic UI elements.
Features I use all the time, in order of importance:
- go to definition
- see errors marked in code (same as for moonscript, etc.)
- go to next / prev error in project (I use alt-up/down like in meld)
- could be separated into two cmds: next/prev-err-in-file, or next/prev-err-in-project
- I don't know if there are standardized commands for this in Howl already, since I've been out of it for too long: also good are: goto-next-error, goto-next-warning, goto-next-hint, goto-next-notice-of-any-level
- auto completion of everything (basically I type everything super soundly with generic types, and make heavy use of literal types (akin to dependent types), making the whole program self documenting and impossible to get arguments etc. wrong, even when variant based on prior arguments values, etc, so it's the most important step in TDD imo and, also a driving factor, is that it makes it super easy for entry level coders in the teams to be way more productive and valuable — and learn faster [I wish there was a
TypedMoonScript
— holy shit that would rock!]) - peek type (mouse hover, or command while cursor at identifier) - shows the inferred type of the identifier in the context
- semantic rename of identifier - this is veeeery convenient for making semantically safe whole-program refactoring in just a second of work
- auto add imports of identifiers that match in modules already declared in the program manifest
- find usages
Has there been any update on this? I love Howl as an editor but the lack of any meaningful autocomplete/autodocs/etc. is a bit of a productivity issue.
Indeed. With this and a couple of extra features and fixes this editor will skyrocket :)
I have a JSON-RPC thing working and unfinished LSP support. I can manually invoke 'textDocument/definition' etc and get meaningful results from within Howl. Nothing is tied into the editor yet. The JSON-RPC part is decoupled - we could pull it out into its own bundle (or even put in lib/howl?) if we want.
@shalabhc Would you mind sharing this code?
Any updates on this? Howl is one the best editors I've ever used but the lack of LSP support makes it really useless for software development these days with modern languages...
Hmm, I might try to find some time to have a look at this. Time is a short as ever, but will let you know.