Hacker News new | ask | show | jobs
by undoware 1456 days ago
I loved vi for decades, but I don't miss it. Neovim is my current go-to but even this feels stodgy these days. Helix Editor is probably my future -- it manages to have just the right features, but with saner defaults and syntax -- but it will take a while for me to work up the nerve to let go of the investment in muscle memory.
2 comments

I don't think going all in on treesitter is very practical, considering basic python indentation has not been functional for over a year. I think Helix is a little bit too much of niche layered on niche, and Kakoune is much better all around in my experience.

https://github.com/nvim-treesitter/nvim-treesitter/issues/80...

My understanding is that treesitter doesn't do anything with indentation. I believe the issues described in the linked issues are neovim specific.

So it should be possible in theory to use treesitter data to calculate indents, though it seems difficult.

Treesitter does do indentation, but not well, and it is the sole mechanism of indentation for the Helix editor. Therein lies the problem.
Ah cool, I guess I completely missed that in my reading of the docs. Thank you for clarifying!
that sounds hard but I... don't often code in python?

I can see bolting a fallback regex mode for the few languages that have features which ts cannot (yet) accommodate.

And 'niche layered on niche' is -- well, it leaves me wondering how much you've actually used hx. The experience is nominal, the installation is sane, and it was way faster to get to 'genuinely pleasant' than nvim ever was.

As a plus, nix home-manager also handles helix config, which, as a nixos user, puts it over the top for me.

(home-manager also does nvim, but this is mostly mooted by my need for an elaborate (and turing-complete) Packer configuration, which has me using a separate git repo for nvim specifically)

I don't often code in python either, but it's a considerable red flag that one of the largest languages in the world has been completely broken for this long. It makes me not want to invest time building muscle memory for the editor. Sometimes I need to code in python, and when I do, I don't want a lot of inconsistencies and jank.

That's what I mean by niche layered on niche- the editor itself is a niche project that leverages another niche project (tree-sitter) to do indentation, and when contributions on either aren't up to par it kind of falls apart.

I have used the editor a decent amount and it's quite nice when it works. I don't even mind the lack of plugin extensibility because there's not really anything I needed that wasn't built in.

> it kind of falls apart

I'd like to point out that the editor is barely a year old and I'm working on it entirely during my free time. It takes time to sort out all the issues and provide excellent support for all languages. I primarily write Rust and Go so those are guaranteed to work well.

It's hard to do tree-sitter query based indentation with space based languages, because the indent has semantic meaning and the AST node is invalid until indentation is typed out. We do have a potential solution (https://github.com/helix-editor/helix/issues/763#issuecommen...), it just needs someone to go and implement it.

I don't consider tree-sitter niche though. Outside of VSCode it's widely adopted, but yes it's probably too soon to only rely on tree-sitter with no fallback. Of course we do implement fallback behaviours too: we try to use tree-sitter first, then provide a simpler fallback for cases where there's no grammar available (or like in this case, it's not a great fit).

Edit: this has prompted me to switch python to the fallback algorithm for now https://github.com/helix-editor/helix/commit/9ae70cc410bd042...

I am currently looking forward Helix too. I like the Kakoune philosophy (Object - Action rather than the contrary) better and I like the out of the box experience they are aiming at.

I never really enjoyed having to configure vim. What I like about vim is the idea of modal editing which and the fact it runs and interacts in/with the shell. Still waiting a bit more before making the jump.