#tree-sitter #kakoune

app kak-tree-sitter

Server between Kakoune and tree-sitter

27 releases (10 stable)

Uses new Rust 2024

new 3.1.1 Dec 26, 2025
3.0.0 Nov 29, 2025
2.0.0 May 24, 2025
1.1.3 Dec 18, 2024
0.3.0 Jun 8, 2023

#131 in Text editors

BSD-3-Clause

170KB
4K SLoC

kak-tree-sitter

This is a binary server that interfaces tree-sitter with kakoune.

Important note: by default, no colorscheme supporting tree-sitter is set for you. You have to pick one or write your own. See this section from the man for further information.

asciicast

Features

  • Semantic highlighting.
    • Automatically detects whether a buffer language type can be highlighted.
    • Removes any default highlighter and replaces them with a tree-sitter based.
  • Semantic selections (types, functions, parameters, comments, tests, etc.)
    • Similar features to f, ?, <a-/>, etc.
    • Full object mode support (i.e. <a-i>, {, <a-]>, etc.)
  • Indents
  • Incremental parsing
  • Fetch, compile and install grammars / queries with ease (via the use of the ktsctl controller companion)
  • Ships with no mappings, defined options, but allows to use well-crafted values, user-modes, mappings and commands by picking them by hand.
  • Transformation-oriented; actual data (i.e. grammars, queries, etc.) can be used from any sources.
  • Shell completions.

Wiki

See the Wiki to know how to install, use, configure and get runtime resources.

Contributing

Whether you want to report or fix a bug, make a feature request, help improving something or add support for a new language by changing the default configuration, you should read the CONTRIBUTING.md file.

Chat

Feel free to join #kakoune on the libera.chat IRC network, or the Kakoune Community discord serve.

Credits

This program was inspired by:

Dependencies

~10–15MB
~271K SLoC