It’s here everyone! If you’re looking for the deep cuts check out this article for a nice overview.

all 7 comments

sorted by: hot top controversial new old
[–] 6 points 1 day ago (2 children)

The "blessed user defaults" theme is long overdue. Emacs blows all its competitors out the water but the on ramp to Emacs is a tar pit.

A lot of emacsims are being ironed out and tree-sitter modes are looking great. It might make me decide to try fully vanilla emacs again (before using magit again).

  • source
  • hideshow 4 child comments
  • [–] 3 points 22 hours ago

    Something about tree-sitter I need to tell someone:

    I have found (when I tried it last year) that for C (and C++ I presume), the existence of the preprocessor causes tree-sitter-mode serious problems. Using such common macros as #define list_for_each(...) for (...) or #define _unused_ __attribute__((unused)) makes it shit the bed. It treats list_for_each as a function and gets confused that it is followed by {...}, which is especially annoying as it then insists on indenting it incorrectly. Something like _unused_ can screw up the declaration parser and it can no longer figure out what the identifier is that's being declared. Also writing multi-line macros is a pain because when it auto-indents it fucks up my manual indentation, because it has no understanding of the thing; I suspect it doesn't attempt to parse macro bodies at all. You could probably disable auto-indent somehow for the whole mode, but I do want it to do that when it does it correctly.

    Why doesn't someone fix this you may ask? Well...

    In order to parse C macros properly and correctly, you'd need to run the code through a cpp of some kind before handing it over to tree-sitter. That would of course mean it has to parse the headers also, and in order to find the headers reliably it would need to be told the compiler flags. It would also need to be able to map file positions back to its original non-preprocessed sources. Also imagine it having to go through approximately one billion lines of C++ templates for every STL include.

    Doing all this seems hard, so I can see why they don't do that, but unfortunately it's worse than cc-mode right now (or rather last year when I tried it), which kind of muddles through all this stuff.

    Maybe tree-sitter-mode could muddle through also somehow? Maybe by modifying the grammar, one could alter how exactly it misparses code involving such macros and then at least it would get the indentation correct. Also possibly one could do a mode on top of tree-sitter-mode that overrides the indentation stuff but keeps tree-sitter-mode's syntax highlighting, which can be incorrect in the face of macros, but is overall more sophisticated than cc-mode's.

  • source
  • parent
  • [–] 5 points 1 day ago (1 child)

    Yeah, I'm tempted to steal a baseline from https://github.com/LionyxML/emacs-solo and see if I can be convinced to break a decade-long Evil habit. Tree-sitter modes are awesome (daily driving the pgtk branch for as long as that's been possible), and I have not considered going back to lsp-mode since eglot was absorbed into Emacs proper.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 3 points 1 day ago* (1 child)

    I need to make the switch. I use VSCode primarily because it's easier to make sure the tech-illiterate folks I work with can occasionally edit configs with minimal setup.

    It's been getting so bad lately though, I write fully typed Python and it's painfully slow with the built in pyright server. Some of my files take like 3s to lint, and it's doing it constantly in the background (partially my fault for having such complex type hints).

    I might switch to ty or basedpyright first then make the editor switch when I'm not pushing 20 commits a day all by myself lol

  • source
  • hideshow 2 child comments
  • [–] [S] 3 points 20 hours ago (1 child)

    Uff breaking up a workflow can be tough. I don’t code professionally at all, so Emacs ends up being a hobby project that is slowly taking over all my personal projects. Praise be to org-mode. Also learning lisp is just fun.

  • source
  • parent
  • hideshow 2 child comments