I’m taking a run at Oni Vim 2 and one of the few extensions available for Elixir on the Open VSX Registry is ElixirLS. That’s great since it is probably the most important one. I do get the warning below every time the editor is opened. Is this to be expected?
There’s a fix for that that will be out in the next release of ElixirLS, which I plan to cut soon. So it is currently an expected error.
What are your thoughts on Onivim 2? I’m thinking about trying it out.
Thanks. This was the first I had used ElixirLS in any editor so nice to see that it was available here.
Well, I just started poking around it yesterday so just have some very early thoughts. I run Neovim in iTerm2 and am mostly happy with it, though I find myself looking at the smooth UI of VS Code every once in awhile wishing those two worlds were one.
Initial good stuff:
- Seems very snappy and smooth. Since this is native code rather than JS/Electron, it is just faster. In initial tests it felt just as snappy as my terminal vim. Feels like vim and is vim. It uses libvim under the hood.
- Works with VS Code extensions. Note that this is limited to those extensions listed on the Open VSX Registry. The ElixirLS extension was available which made syntax highlighting, autocomplete, go to definition, documentation work immediately. All it takes is clicking the install button for the extension and then restarting Oni Vim. The appropriate packages are downloaded in the background.
- First run experience was quite good. I use a single vim window and split panes so disabled tabs via a settings variable. Theme selection can be accessed via the command menu. As you hover over the themes, the UI instantly changes; pretty cool. I was able to make it look like my terminal vim quickly.
- Keybindings are easy to add and I didn’t have much trouble writing the 10 critical ones I need; mostly mappings for easy pane management and using the spacebar as leader.
- File search is very good (CMD+P by default, but I remap).
- Command mode access is really nice and easy to get at, including configuration and keybindings files.
- Full text search is fast. Think it uses ripgrep out of the box.
- I have probably 20 or so vim plugins, but almost all of them seem unnecessary here.
Initial bad stuff:
- This is specific to me, but I don’t use a file tree in vim. Rather, I use netrw+vim-vinegar to navigate within splits. There is some talk of supporting this in the future, but this is really the biggest issue I have with it. It’s also possible there is some sort of plugin that can solve it in the meantime of which I am unaware. Additionally, more of my navigation is via go to, file search, etc anyway.
- The file drawer seems pretty nice. Easy to disable and navigate. You can move over to it via shortcut or pane movements. For whatever reason, I couldn’t figure out how to move back to the code area without actually clicking a file though. Probably doing something wrong.
- Easy command to access full text search, but seems like it doesn’t place your cursor in the search field automatically. Maybe bug.
- No “replace” for searches. UI is similar to VS Code and sounds like they want to get replace in.
- When I “go to definition” for a lot of files, it seems to drop me on the file with the pane scrolled to the right. Pressing any keys realigns the pane. Assume bug.
- Need to be able to run tests for cursor position, file, suite from within the editor. Think this is probably a matter of getting one of the Elixir test runner extensions on the VSX registry.
- Would probably like to have something like vim-projectionist work here if possible and will see if there is anything that is on or can be added to the registry.
- I did notice my computer sounded like a jet engine yesterday at one point and the app was eating up all my CPU. Used again later and didn’t see the same so just not sure yet. That would be a problem.
I was going to point you to vscode-elixir-test, but you’re already ahead of me!
I did notice my computer sounded like a jet engine yesterday at one point and the app was eating up all my CPU. Used again later and didn’t see the same so just not sure yet. That would be a problem.
That might have been ElixirLS’s dialyzer integration: https://github.com/elixir-lsp/elixir-ls/#dialyzer-integration
But after the initial PLT’s are built it should be fast.