• mickeyp@alien.topB
    link
    fedilink
    English
    arrow-up
    0
    ·
    10 months ago

    The problem is monochromacity. The font lock rules in a lot of the TS modes are… not always thought through. Ramp up python-ts-mode’s font lock level to the maximum and most of everything is dyed the same colour. It’s frustrating and I have had to muck around with treesit-font-lock-feature-list to selectively unpick the chaff from the grist. And it’s not exactly easy changing it either: if you’re new to elisp, or not fluent in the extremely awkward interface for changing this stuff, you’ll have to look up how someone else has done it.

    It’s not even customizable, so you can’t just click around and change it either.

    • hvis@alien.topB
      link
      fedilink
      English
      arrow-up
      0
      ·
      10 months ago

      The font lock rules in a lot of the TS modes are… not always thought through. Ramp up python-ts-mode’s font lock level to the maximum and most of everything is dyed the same colour.

      And then on the other side, people come asking why even when TS is used, highlighting is not “up to par” with VS Code and etc. Then hear about treesit-font-lock-level, ramp it up to the max, and apparently live happily after.

  • grimscythe_@alien.topB
    link
    fedilink
    English
    arrow-up
    0
    ·
    10 months ago

    It’s a good opinion. However, colors work magic for reading code for me, so I guess it depends on the person.

  • FrozenOnPluto@alien.topB
    link
    fedilink
    English
    arrow-up
    0
    ·
    10 months ago

    Aside - is there any good docs about _using_ treesitter mode? Setting it up was covered in a few great notes and guides, and took only a couple minutes.

    ex: python-mode has a keybinsd that shifts current line/region right or left a hop; super handy! I didnt’ see any obvious keybind for that in python-ts-mode … I expected to have a lot of like-for-like in the new mode, but I guess thats not quite right. Its not ‘a new python mode’, its ‘treesit modes’, so have to get used to presumably new keybinds for treesit-modes … and maybe they’re even consistent across languages (that’d be something!) … alas, I didn’t find out what that key was, so, sort of a shame.

    Any handy list of keybinds that are super useful across the treesit modes?

    • hvis@alien.topB
      link
      fedilink
      English
      arrow-up
      0
      ·
      10 months ago

      Have you tried to use the same binding? python-ts-mode should have the same default set as python-mode due of how python-ts-mode-map is defined.

      To see all available bindings, type C-h f python-ts-mode RET. You’re probably thinking of C-c < and C-c >.

      • FrozenOnPluto@alien.topB
        link
        fedilink
        English
        arrow-up
        0
        ·
        10 months ago

        Many of the ‘defaut’ (in my head) bindings dont’ work in python-ts-mode (such as C-c >), but perhaps my config is blowing something up. Hmm … I’ll dig in more, thanks!