jmacdonald / amp

A complete text editor for your terminal.
https://amp.rs
Other
3.75k stars 106 forks source link

Support the Language Server Protocol #37

Open ghost opened 6 years ago

ghost commented 6 years ago

Have you considered supporting the language server protocol (LSP)?

Supporting this directly in the editor might be a good idea since it would already cover a lot of the use cases that would otherwise be relegated to a plugin API. Pretty much all of the other major editors (atom, emacs, code, (neo)vim, etc.) have decent support for the LSP at this point and most major languages have good server implementations too.

jmacdonald commented 6 years ago

This is genius. ๐Ÿ‘Œ

I love the idea of an integrated, general solution that isn't language-specific. It looks like RLS supports it, and preliminary support is available for Ruby, too.

If there is broad enough language support for this, I think this is a great direction for Amp.

zaynetro commented 6 years ago

Language support is rather reasonable: http://langserver.org/ (There is a table "Language servers") The page might be a bit outdated. Nonetheless, there are a plenty of languages there.

As an example sbt recently released support for Language Server protocol.

Yep, RLS is really well working.

korken89 commented 5 years ago

Any update on LSP support? For me this is the only thing missing to use amp day to day :)

Keep up the good work ^^

jmacdonald commented 5 years ago

Thanks, @korken89!

The priority for 0.6 is moving away from termbox, which will get us 24-bit color support, drop the Python build requirement, and remove a C library dependency. I'm thinking the focus for 0.7 may be LSP support. I'll do a bit of roadmap planning and will add that to the README; thanks for the nudge. :slightly_smiling_face:

korken89 commented 5 years ago

Thanks for the update, can't wait to see where this goes!

TotalKrill commented 5 years ago

Just a small nudge here, I am in the exact same boat as @korken89, where LSP being the main blocker for me. Would love to nuke my NeoVim config to use something that does not have 10x different plugins that breaks on libboost update or something similar .

Very nice editor you have created! Cant wait to see how 0.7 turns out!

jmacdonald commented 5 years ago

I'd love to know what, specifically, folks are after with LSP support. I've often wanted "jump to definition", as navigating/reading code is something I'm doing fairly often. Would appreciate other people's perspectives before I start planning the implementation for this. :slightly_smiling_face:

mzarnitsa commented 5 years ago

Agree. This is one of the most important features of a dev env. Especially when reading someone elseโ€™s code. That and contextual auto suggestion.

TotalKrill commented 5 years ago

I constantly use tools to get autosuggestions about accessible methods and members on a structure, as well as their signatures, saves me a trip to the documentation quite often, as well as typing the entire function name.

This usually keeps me from using abbreviated method names which is common in environments without autocomplete.

The other thing which I do not know is LSP is syntax errors and compilation warning/error indication directly in the editor.

Ofcourse I also use jump to definition and to jump back to where I was after. In vim I have ctrl+I (jump in) gotot definition and ctrl+o (jump out) to go back

jrop commented 4 years ago

@jmacdonald Here's why I want it:

TotalKrill commented 4 years ago

Is there any status update on this?

nyaa8 commented 4 years ago

This might be helpful: autozimu/LanguageClient-neovim It's a Language Server Protocol client written in Rust, although intended for neovim ๐Ÿ˜„

greenfork commented 3 years ago

My 2 cents on how I use LSP in the order from most to least important:

  1. Go to definition
  2. Lookup documentation or get an error on the current line as a pop-up message under cursor
  3. Rename symbol
  4. Semantic token highlighting (stock highlighting isn't even used, generally useful to get highlighting on defined variables to avoid typos and it is a superior highlighting method in all respects too)
  5. Formatting (mostly when it is interpreted language and formatting isn't as fast as Zig or Go version, I used it with Elixir and it's pleasingly fast)

EDIT: Also a link to LSP implementation for Kakoune text editor if useful, in Rust too https://github.com/kak-lsp/kak-lsp.

SadSock commented 4 weeks ago

Is there any status update on this?

jmacdonald commented 4 days ago

๐Ÿ‘‹๐Ÿผ yep, 0.8 is shaping up to include a bunch of improvements around open mode and adding file browser interop, and 0.9 is going to be focused around language server support. Will report back once that's underway. ๐Ÿ˜‰