Treesitter module developement

This file contains links and information pertinent to the tree sitter module.

design decisions

  • should tree sitter support for languages be opt in? (like lsp) This would make sense as tree sitter support is spotty at best and people can opt in with a +treesitter flag


Hacks in testing

  • scss currently this snippet adds scss “support”. it mostly works but the tree errors on most scss specific syntax. I have not gone very deep but it does work for basics examples
        (after! tree-sitter
          (pushnew! tree-sitter-major-mode-language-alist
                    '(scss-mode . css)))

text objects

  • bind keys to tree sitter text objects

  • only rebind to tree sitter text-objs if the language supports tree sitter

    • This can be achieved by either making a variable of major modes that have tree

    sitter support (which requires a little bit of fore thought)

    • or rebind keys if a tree-sitter error is raised (which is slower but easier to maintain:tm:)
  • Handle bad bounding 0 1 error to emmit a more useful message

Current bugs

  • text objects can’t seem to be rebound? currently i can’t rebind text objects using the conventional methods

  • in some conditions a Bad bounding indices: 0, 1 error is raised. This is due to the query needed not existing. The easiest fix would be to add these querys but this is easier said than done

  • Tree sitter somehow is being eager loaded


To look for / write

To consider adding



  • current candidate:
    • the :emacs vc module stole our tree joke