davelens / dotvim

There are many vimrc's, but this one's mine.
0 stars 0 forks source link

Configure ALE for use with the Solargraph LSP #4

Closed davelens closed 1 month ago

davelens commented 4 years ago

This would essentially require me to use Deoplete as a completion framework, and LanguageClient-neovim to configure the link with Solargraph. Can't say I'm wildly excited for two new plugins, but it would get rid of the coc.nvim blob.

davelens commented 4 years ago

So I've done some further study on both ALE and Coc's documentation, and some source code to see how things look under the hood. I need to understand how they work internally before I'll extensively probe them in vim itself.

Coc mainly exists for LSP autocompletion purposes, but it can be... well, everything. It also lints, it has refactoring tools provided by the LSP, and more. This is good, but it's also bad. It also has a Node.js dependency which runs a server along with vim, and provides its LSP integration through that. That's also... undesirable, but probably faster than a direct LSP connection. It's completion engine works well and is pretty much the same interface as YCM's. That said, I really don't like hidden dependencies (which is why I went looking for YCM alternatives and stumbled upon Coc two years ago in the first place) and least of all the bloated mess that is Node.

ALE exists for async linting. It runs external linting programs through a control interface in vim. This means syntax checks, inline code analysis, and formatting fixes. vim-airline hooks into it to provide feedback on the statusline. It also sports decent refactoring functions through its LSP support, and can even give autocompletion (for which you'll need the aforementioned Deoplete or another completer of choice). I like plugins that are made to do one thing well. It also has no external dependencies.

ALE's LSP connection is harder to configure than Coc, but that's no reason to choose one over the other, as long as it works well once configured. My vimrc states I'm fond of plugins that do what they're supposed to out of the box, but I also believe in this analogy: If you're a mechanic, you won't go shopping for cars with an expectation that you'll never open the hood yourself.

Next step will be actual ALE configuration and feature probing.