Comment by dlivingston

Comment by dlivingston 2 days ago

3 replies

Currently, I'm using VS Code with Vim keybindings (through the Neovim plugin). My workflow (C/C++/Rust) involves multiple panes open, using the lldb debugger, goto/peek definitions, CMake integration w/ active target compilation on Ctrl+Shift+B, clang format on save, LLM-powered tab-autocomplete, and IntelliSense powered by `compile_commands.json`.

Is switching to Helix worth it? Can I get more-or-less equivalent functionality with Helix?

suby 2 days ago

I don't think Helix can currently match the C++ experience you get with VS Code.

* Debugging is rough. There's experimental DAP support, but it isn't ready to be used. I was able to set breakpoints and step through the code, but the UI for exploring variables / state while paused felt missing or was unintuitive enough that I couldn't figure it out. I use CLion for debugging.

* Goto definition works with clangd as long as your CMake setup outputs compile_commands.json, which you already do.

* Renaming symbols (variables / functions) via clangd works fine.

* Intellisense is decent, but I had to tweak clangd settings. By default, it would stop returning results after scanning a certain number of symbols, so some valid functions just didn't show up. I was using Helix for a few days before realizing this problem, it isn't obvious that you are getting an artificially constrained filtered view of your symbols via default clangd. Maybe this is a distro packaging issue though?

* The order of intellisense completions is not great. CLion is smart about surfacing relevant suggestions first. In Helix + clangd, I often get obscure symbols that obviously have nothing to do with my project or context. It's not the worst thing, but it is mildly annoying and noticeable.

* "go to error" doesn't surface errors in files that aren't open. In Helix, space D brings up workspace diagnostics, but it only shows errors for compilation units already open. This appears to be a clangd issue, as space D in other languages will show all project errors. CLion does not suffer from this problem.

* I think you can get LLM suggestions via an LSP, but I've not tried personally. Assuming it's true that you can get LLM suggestions, it's not clear to me that you can run two LSP's on the same file, so it might be a choice between clangd and an LLM LSP? Not sure.

* No integrated build support. You'll probably end up building from a terminal. I use Wezterm with a custom lua script that is invoked on a hotkey. I put a lot of thought into the build UX, and what I've done is both extremely hacky and still not good enough.

Helix is not flexible, it's uncompromising. I like it, but I think it's hard to beat CLion or vscode for C++ development.

I'd say right now, if you have a good setup already, stick with what you have.

rs186 a day ago

You'll need to spend a lot of time figuring it out and yet miss many of the features.

I experimented with Helix a bit, and my experience (which uses a slightly different workflow):

* I need workspace folders. Even combined with fzf or similar tools, file navigation is nowhere as easy as in VSCode

* Debugging is important and missing

* Missing custom extensions that likely will never be ported to Helix even if there is an extension system

Crowberry 2 days ago

The debugger in helix was extremely barebones last I tried, LLM integration can only be made available through custom language servers since they do not support plugins yet.

If you are interested in making a move to a terminal editor I would instead look to neovim until helix matures a bit more