Skip to content

Instantly share code, notes, and snippets.

@lewalkingdad
Last active November 3, 2025 23:42
Show Gist options
  • Select an option

  • Save lewalkingdad/6fe0ef63418f1f87aa1d963c3778c707 to your computer and use it in GitHub Desktop.

Select an option

Save lewalkingdad/6fe0ef63418f1f87aa1d963c3778c707 to your computer and use it in GitHub Desktop.
Kakoune Tree Sitter Nix
{
config,
pkgs,
lib,
...
}:
let
groups = [
"variable"
"variable.builtin"
"variable.parameter"
"variable.parameter.builtin"
"variable.member"
"variable.other.member"
"variable.other.member.private"
"constant"
"constant.builtin"
"constant.builtin.boolean"
"constant.character"
"constant.character.escape"
"constant.macro"
"constant.numeric"
"constant.integer"
"constant.float"
"module"
"module.builtin"
"label"
"string"
"string.documentation"
"string.regexp"
"string.escape"
"string.special"
"string.special.symbol"
"string.special.url"
"string.special.path"
"character"
"character.special"
"boolean"
"number"
"number.float"
"type"
"type.builtin"
"type.definition"
"type.parameter"
"type.enum"
"type.enum.variant"
"attribute"
"attribute.builtin"
"property"
"function"
"function.builtin"
"function.call"
"function.macro"
"function.method"
"function.method.call"
"function.method.private"
"function.special"
"constructor"
"operator"
"keyword"
"keyword.coroutine"
"keyword.function"
"keyword.operator"
"keyword.import"
"keyword.type"
"keyword.modifier"
"keyword.repeat"
"keyword.return"
"keyword.debug"
"keyword.exception"
"keyword.conditional"
"keyword.conditional.ternary"
"keyword.directive"
"keyword.directive.define"
"keyword.storage"
"keyword.storage.type"
"keyword.storage.modifier"
"keyword.control.conditional"
"keyword.control.repeat"
"keyword.control.import"
"keyword.control.return"
"keyword.control.exception"
"punctuation.delimiter"
"punctuation.bracket"
"punctuation.special"
"comment"
"comment.line"
"comment.line.documentation"
"comment.block"
"comment.block.documentation"
"comment.unused"
"comment.documentation"
"comment.error"
"comment.warning"
"comment.todo"
"comment.note"
"markup"
"markup.strong"
"markup.bold"
"markup.italic"
"markup.strikethrough"
"markup.underline"
"markup.heading"
"markup.heading.marker"
"markup.heading.1"
"markup.heading.2"
"markup.heading.3"
"markup.heading.4"
"markup.heading.5"
"markup.heading.6"
"markup.quote"
"markup.math"
"markup.link"
"markup.link.label"
"markup.link.url"
"markup.link.text"
"markup.raw"
"markup.raw.block"
"markup.raw.inline"
"markup.list"
"markup.list.checked"
"markup.list.unchecked"
"markup.list.unnumbered"
"markup.list.numbered"
"diff"
"diff.plus"
"diff.plus.gutter"
"diff.minus"
"diff.minus.gutter"
"diff.delta"
"diff.delta.moved"
"diff.delta.conflict"
"diff.delta.gutter"
"tag"
"tag.builtin"
"tag.attribute"
"tag.delimiter"
"none"
"special"
"conceal"
"spell"
"nospell"
"embedded"
];
kts-master = pkgs.rustPlatform.buildRustPackage {
pname = "kak-tree-sitter-master";
version = "main-2025-10-26";
src = pkgs.fetchFromSourcehut {
owner = "~hadronized";
repo = "kak-tree-sitter";
rev = "cdcfb42da9affd9dd0db9e8df1173731c61e3d9f";
hash = "sha256-Q8R++fEJMZFftiI9zGjwF7X8mek2oc40Yl9WMUtQWEA=";
};
cargoHash = "sha256-lZNM5HqICP6JfaMiBjACcUNRTTTIRhq2ou8cOLU0yOU=";
};
only_file = (attrName: attrValue: attrValue == "regular");
get_include = (file_content: builtins.match "^.*inherits: (([a-z_-]+,?)+)+.*$" file_content);
has_include = file: null != get_include file.content;
map_queries =
lang_name:
let
lang_basepath = "${pkgs.helix}/lib/runtime/queries/";
query_files = lib.filterAttrs only_file (builtins.readDir "${lang_basepath}/${lang_name}");
in
pkgs.lib.mapAttrsToList (file: type: {
name = file;
content = builtins.readFile "${lang_basepath}/${lang_name}/${file}";
}) query_files;
needs_processing = (
lang_name:
let
lang_basepath = "${pkgs.helix}/lib/runtime/queries/";
in
if builtins.pathExists "${lang_basepath}/${lang_name}" then
builtins.any has_include (map_queries lang_name)
else
false
);
languagesConfig = builtins.fromTOML (builtins.readFile ./helix-languages.toml);
languages_to_process = builtins.filter (lang: needs_processing lang.name) languagesConfig.language;
processed_queries = builtins.map (
language:
let
queries_files = map_queries language.name;
in
rec {
lang = language;
destination = "${config.home.homeDirectory}/.config/kak-tree-sitter/runtime/queries/${lang.name}";
files = builtins.map (
file:
let
include_refs = pkgs.lib.splitString "," (builtins.head (get_include file.content));
includes = builtins.filter (include: null != include) (
builtins.map (
other_lang:
let
ref_path = "${pkgs.helix}/lib/runtime/queries/${other_lang}/${file.name}";
in
if builtins.pathExists ref_path then builtins.readFile ref_path else null
) include_refs
);
in
{
name = file.name;
content =
if has_include file then
builtins.concatStringsSep "\n" includes
else
builtins.readFile "${pkgs.helix}/lib/runtime/queries/${lang.name}/${file.name}";
}
) queries_files;
}
) languages_to_process;
standard_queries = builtins.map (lang: {
lang = lang;
destination = "${pkgs.helix}/lib/runtime/queries/${lang.name}";
}) (builtins.filter (lang: false == needs_processing lang.name) languagesConfig.language);
kakoune_queries = builtins.foldl' (
acc: query:
{
"${query.lang.name}".queries.source.local.path = query.destination;
}
// acc
) { } (standard_queries ++ processed_queries);
grammars = builtins.foldl' (
acc: lang:
{
"${lang.name}".source.local.path =
"${pkgs.helix}/lib/runtime/grammars/${lang.grammar or lang.name}.so";
}
// acc
) { } languagesConfig.language;
kts-config = {
highlight = { inherit groups; };
features = {
highlighting = true;
text_objects = true;
};
language = kakoune_queries;
grammar = grammars;
};
kts-config-toml = (pkgs.formats.toml { }).generate "kak-tree-sitter-config.toml" kts-config;
in
{
homeManagerModules.kakoune = {
home.packages = with pkgs; [
kakoune-lsp
kts-master
google-java-format
fzf
helix
fd
moreutils
nixfmt
usql
perl
bc
timewarrior
taskwarrior3
];
programs.kakoune = {
enable = true;
extraConfig = builtins.readFile ./kakrc;
plugins = with pkgs.kakounePlugins; [
rep
(pkgs.kakouneUtils.buildKakounePluginFrom2Nix {
pname = "kak-dap";
version = "2022-08-11";
src = pkgs.fetchgit {
url = "https://codeberg.org/jdugan6240/kak-dap";
rev = "355df2c627ceb124f4ff018c95762cf9c19068ae";
hash = "sha256-73DdcOduxMJ/KhEOQuJD3JgY52TYCQfdjiWeIwLxodE=";
};
})
];
};
xdg.configFile."kak/colors/catppuccin-mocha.kak".source = ./catppuccin-mocha.kak;
xdg.configFile."kak/plugins/password-store.kak".source = ./password-store.kak;
home.file =
(builtins.listToAttrs (
builtins.concatMap (
query:
builtins.map (file: {
name = ".config/kak-tree-sitter/runtime/queries/${query.lang.name}/${file.name}";
value = {
text = file.content;
};
}) query.files
) processed_queries
))
// {
".config/kak-tree-sitter/config.toml" = {
source = kts-config-toml;
};
};
};
}
@lewalkingdad
Copy link
Author

Here is the content of .config/kak-tree-sitter:

├── config.toml -> /nix/store/pkhminjbia12xgi3mn1n1a5c3i5xdsd1-home-manager-files/.config/kak-tree-sitter/config.toml
├── grammars -> /nix/store/pkhminjbia12xgi3mn1n1a5c3i5xdsd1-home-manager-files/.config/kak-tree-sitter/grammars
│   ├── ada.so
│   ├── adl.so
│   ├── agda.so
│   ├── alloy.so
│   ├── amber.so
│   ├── astro.so
│   ├── awk.so
│   ├── bash.so
│   ├── bass.so
│   ├── beancount.so
│   ├── bibtex.so
│   ├── bicep.so
│   ├── bitbake.so
│   ├── blade.so
│   ├── blueprint.so
│   ├── caddyfile.so
│   ├── cairo.so
│   ├── capnp.so
│   ├── cel.so
│   ├── circom.so
│   ├── clarity.so
│   ├── clojure.so
│   ├── cmake.so
│   ├── comment.so
│   ├── cpon.so
│   ├── cpp.so
│   ├── crystal.so
│   ├── c-sharp.so
│   ├── c.so
│   ├── css.so
│   ├── csv.so
│   ├── cue.so
│   ├── cylc.so
│   ├── dart.so
│   ├── dbml.so
│   ├── debian.so
│   ├── devicetree.so
│   ├── dhall.so
│   ├── diff.so
│   ├── djot.so
│   ├── dockerfile.so
│   ├── dot.so
│   ├── d.so
│   ├── dtd.so
│   ├── dunstrc.so
│   ├── earthfile.so
│   ├── edoc.so
│   ├── eex.so
│   ├── elisp.so
│   ├── elixir.so
│   ├── elm.so
│   ├── elvish.so
│   ├── embedded-template.so
│   ├── erlang.so
│   ├── esdl.so
│   ├── fennel.so
│   ├── fga.so
│   ├── fidl.so
│   ├── fish.so
│   ├── forth.so
│   ├── fortran.so
│   ├── fsharp.so
│   ├── gas.so
│   ├── gdscript.so
│   ├── gherkin.so
│   ├── ghostty.so
│   ├── gitattributes.so
│   ├── gitcommit.so
│   ├── git-config.so
│   ├── gitignore.so
│   ├── git-rebase.so
│   ├── gleam.so
│   ├── glimmer.so
│   ├── glsl.so
│   ├── gn.so
│   ├── godot-resource.so
│   ├── gomod.so
│   ├── go.so
│   ├── gotmpl.so
│   ├── gowork.so
│   ├── gpr.so
│   ├── graphql.so
│   ├── gren.so
│   ├── groovy.so
│   ├── hare.so
│   ├── haskell-persistent.so
│   ├── haskell.so
│   ├── hcl.so
│   ├── heex.so
│   ├── hocon.so
│   ├── hoon.so
│   ├── hosts.so
│   ├── htmldjango.so
│   ├── html.so
│   ├── hurl.so
│   ├── hyprlang.so
│   ├── iex.so
│   ├── ini.so
│   ├── inko.so
│   ├── ink.so
│   ├── janet-simple.so
│   ├── javascript.so
│   ├── java.so
│   ├── jinja2.so
│   ├── jjdescription.so
│   ├── jq.so
│   ├── jsdoc.so
│   ├── json5.so
│   ├── jsonnet.so
│   ├── json.so
│   ├── julia.so
│   ├── just.so
│   ├── kdl.so
│   ├── koka.so
│   ├── kotlin.so
│   ├── koto.so
│   ├── latex.so
│   ├── ldif.so
│   ├── ld.so
│   ├── lean.so
│   ├── ledger.so
│   ├── llvm-mir.so
│   ├── llvm.so
│   ├── log.so
│   ├── lpf.so
│   ├── lua.so
│   ├── luau.so
│   ├── mail.so
│   ├── make.so
│   ├── markdoc.so
│   ├── markdown_inline.so
│   ├── markdown.so
│   ├── matlab.so
│   ├── mermaid.so
│   ├── meson.so
│   ├── mojo.so
│   ├── move.so
│   ├── nasm.so
│   ├── nginx.so
│   ├── nickel.so
│   ├── nim.so
│   ├── nix.so
│   ├── nu.so
│   ├── ocaml-interface.so
│   ├── ocaml.so
│   ├── odin.so
│   ├── ohm.so
│   ├── opencl.so
│   ├── openscad.so
│   ├── org.so
│   ├── pascal.so
│   ├── passwd.so
│   ├── pem.so
│   ├── perl.so
│   ├── pest.so
│   ├── php-only.so
│   ├── php.so
│   ├── pkl.so
│   ├── pod.so
│   ├── ponylang.so
│   ├── po.so
│   ├── powershell.so
│   ├── prisma.so
│   ├── prolog.so
│   ├── properties.so
│   ├── proto.so
│   ├── prql.so
│   ├── pug.so
│   ├── purescript.so
│   ├── python.so
│   ├── ql.so
│   ├── qmljs.so
│   ├── query.so
│   ├── quint.so
│   ├── regex.so
│   ├── rego.so
│   ├── rescript.so
│   ├── robot.so
│   ├── ron.so
│   ├── r.so
│   ├── rst.so
│   ├── ruby.so
│   ├── rust-format-args.so
│   ├── rust.so
│   ├── scala.so
│   ├── scheme.so
│   ├── scss.so
│   ├── slang.so
│   ├── slint.so
│   ├── smali.so
│   ├── smithy.so
│   ├── sml.so
│   ├── snakemake.so
│   ├── solidity.so
│   ├── sourcepawn.so
│   ├── spade.so
│   ├── spicedb.so
│   ├── sql.so
│   ├── sshclientconfig.so
│   ├── strace.so
│   ├── supercollider.so
│   ├── svelte.so
│   ├── sway.so
│   ├── swift.so
│   ├── t32.so
│   ├── tablegen.so
│   ├── tact.so
│   ├── task.so
│   ├── tcl.so
│   ├── teal.so
│   ├── templ.so
│   ├── tera.so
│   ├── textproto.so
│   ├── thrift.so
│   ├── tlaplus.so
│   ├── todotxt.so
│   ├── toml.so
│   ├── tsx.so
│   ├── twig.so
│   ├── typescript.so
│   ├── typespec.so
│   ├── typst.so
│   ├── ungrammar.so
│   ├── unison.so
│   ├── uxntal.so
│   ├── vala.so
│   ├── vento.so
│   ├── verilog.so
│   ├── vhdl.so
│   ├── vhs.so
│   ├── v.so
│   ├── vue.so
│   ├── wast.so
│   ├── wat.so
│   ├── werk.so
│   ├── wesl.so
│   ├── wgsl.so
│   ├── wit.so
│   ├── xit.so
│   ├── xml.so
│   ├── xtc.so
│   ├── yaml.so
│   ├── yara.so
│   ├── yuck.so
│   └── zig.so
└── queries -> /nix/store/pkhminjbia12xgi3mn1n1a5c3i5xdsd1-home-manager-files/.config/kak-tree-sitter/queries
    ├── ada
    │   ├── folds.scm
    │   ├── highlights.scm
    │   ├── locals.scm
    │   └── textobjects.scm
    ├── adl
    │   ├── highlights.scm
    │   ├── indents.scm
    │   └── textobjects.scm
    ├── agda
    │   └── highlights.scm
    ├── alloy
    │   └── highlights.scm
    ├── amber
    │   └── highlights.scm
    ├── astro
    │   ├── highlights.scm
    │   └── injections.scm
    ├── awk
    │   ├── highlights.scm
    │   ├── injections.scm
    │   └── textobjects.scm
    ├── bash
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   └── textobjects.scm
    ├── bass
    │   └── highlights.scm
    ├── beancount
    │   ├── folds.scm
    │   └── highlights.scm
    ├── bibtex
    │   ├── highlights.scm
    │   └── tags.scm
    ├── bicep
    │   └── highlights.scm
    ├── bitbake
    │   ├── highlights.scm
    │   └── injections.scm
    ├── blade
    │   ├── folds.scm
    │   ├── highlights.scm
    │   └── injections.scm
    ├── blueprint
    │   └── highlights.scm
    ├── c
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   ├── locals.scm
    │   └── textobjects.scm
    ├── caddyfile
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   ├── locals.scm
    │   └── textobjects.scm
    ├── cairo
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   ├── locals.scm
    │   └── textobjects.scm
    ├── capnp
    │   ├── folds.scm
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   └── locals.scm
    ├── cel
    │   └── highlights.scm
    ├── circom
    │   ├── highlights.scm
    │   └── locals.scm
    ├── clarity
    │   └── highlights.scm
    ├── clojure
    │   ├── highlights.scm
    │   └── injections.scm
    ├── cmake
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   └── textobjects.scm
    ├── codeql
    │   ├── highlights.scm
    │   └── textobjects.scm
    ├── comment
    │   └── highlights.scm
    ├── common-lisp
    │   ├── highlights.scm
    │   ├── indents.scm
    │   └── injections.scm
    ├── cpon
    │   ├── highlights.scm
    │   └── indents.scm
    ├── cpp
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   └── textobjects.scm
    ├── crystal
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   ├── locals.scm
    │   ├── tags.scm
    │   └── textobjects.scm
    ├── c-sharp
    │   ├── highlights.scm
    │   ├── injections.scm
    │   ├── tags.scm
    │   └── textobjects.scm
    ├── css
    │   ├── highlights.scm
    │   ├── indents.scm
    │   └── injections.scm
    ├── csv
    │   └── highlights.scm
    ├── cue
    │   └── highlights.scm
    ├── cylc
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   └── textobjects.scm
    ├── d
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   └── textobjects.scm
    ├── dart
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   ├── locals.scm
    │   └── textobjects.scm
    ├── dbml
    │   └── highlights.scm
    ├── debian
    │   └── highlights.scm
    ├── devicetree
    │   └── highlights.scm
    ├── dhall
    │   ├── highlights.scm
    │   ├── injections.scm
    │   └── textobjects.scm
    ├── diff
    │   └── highlights.scm
    ├── djot
    │   ├── highlights.scm
    │   └── injections.scm
    ├── docker-compose
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   └── textobjects.scm
    ├── dockerfile
    │   ├── highlights.scm
    │   ├── injections.scm
    │   └── textobjects.scm
    ├── dot
    │   ├── highlights.scm
    │   └── injections.scm
    ├── dtd
    │   ├── highlights.scm
    │   └── injections.scm
    ├── dune
    │   └── highlights.scm
    ├── dunstrc
    │   └── highlights.scm
    ├── earthfile
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   └── textobjects.scm
    ├── ecma
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   ├── locals.scm
    │   ├── README.md
    │   └── textobjects.scm
    ├── edoc
    │   ├── highlights.scm
    │   └── injections.scm
    ├── eex
    │   ├── highlights.scm
    │   └── injections.scm
    ├── ejs
    │   ├── highlights.scm
    │   └── injections.scm
    ├── elisp
    │   ├── highlights.scm
    │   └── tags.scm
    ├── elixir
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   └── textobjects.scm
    ├── elm
    │   ├── highlights.scm
    │   ├── injections.scm
    │   ├── locals.scm
    │   ├── tags.scm
    │   └── textobjects.scm
    ├── elvish
    │   ├── highlights.scm
    │   └── injections.scm
    ├── env
    │   ├── highlights.scm
    │   └── textobjects.scm
    ├── erb
    │   ├── highlights.scm
    │   └── injections.scm
    ├── erlang
    │   ├── highlights.scm
    │   ├── injections.scm
    │   ├── locals.scm
    │   └── textobjects.scm
    ├── esdl
    │   └── highlights.scm
    ├── fennel
    │   └── highlights.scm
    ├── fga
    │   ├── highlights.scm
    │   ├── indents.scm
    │   └── textobjects.scm
    ├── fidl
    │   ├── folds.scm
    │   ├── highlights.scm
    │   └── injections.scm
    ├── fish
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   └── textobjects.scm
    ├── forth
    │   └── highlights.scm
    ├── fortran
    │   ├── folds.scm
    │   ├── highlights.scm
    │   ├── indents.scm
    │   └── injections.scm
    ├── fsharp
    │   ├── highlights.scm
    │   ├── injections.scm
    │   └── locals.scm
    ├── gas
    │   ├── highlights.scm
    │   ├── injections.scm
    │   └── textobjects.scm
    ├── gdscript
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   ├── tags.scm
    │   └── textobjects.scm
    ├── gemini
    │   └── highlights.scm
    ├── gherkin
    │   └── highlights.scm
    ├── ghostty
    │   └── highlights.scm
    ├── git-attributes
    │   └── highlights.scm
    ├── git-commit
    │   ├── highlights.scm
    │   ├── injections.scm
    │   └── textobjects.scm
    ├── git-config
    │   ├── highlights.scm
    │   └── textobjects.scm
    ├── git-ignore
    │   └── highlights.scm
    ├── git-notes
    │   └── highlights.scm
    ├── git-rebase
    │   ├── highlights.scm
    │   └── injections.scm
    ├── _gjs
    │   ├── highlights.scm
    │   └── injections.scm
    ├── gjs
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   ├── locals.scm
    │   ├── tags.scm
    │   └── textobjects.scm
    ├── gleam
    │   ├── highlights.scm
    │   ├── injections.scm
    │   ├── locals.scm
    │   └── textobjects.scm
    ├── glimmer
    │   └── highlights.scm
    ├── glsl
    │   ├── folds.scm
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   ├── locals.scm
    │   └── textobjects.scm
    ├── gn
    │   ├── highlights.scm
    │   └── injections.scm
    ├── go
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   ├── locals.scm
    │   ├── tags.scm
    │   └── textobjects.scm
    ├── godot-resource
    │   ├── highlights.scm
    │   ├── injections.scm
    │   └── textobjects.scm
    ├── gomod
    │   ├── highlights.scm
    │   └── injections.scm
    ├── gotmpl
    │   ├── highlights.scm
    │   └── injections.scm
    ├── gowork
    │   ├── highlights.scm
    │   └── injections.scm
    ├── gpr
    │   └── highlights.scm
    ├── graphql
    │   ├── highlights.scm
    │   └── textobjects.scm
    ├── gren
    │   ├── highlights.scm
    │   ├── locals.scm
    │   └── textobjects.scm
    ├── groovy
    │   ├── folds.scm
    │   ├── highlights.scm
    │   ├── injections.scm
    │   └── locals.scm
    ├── gts
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   ├── locals.scm
    │   ├── tags.scm
    │   └── textobjects.scm
    ├── hare
    │   ├── highlights.scm
    │   ├── injections.scm
    │   └── locals.scm
    ├── haskell
    │   ├── highlights.scm
    │   ├── injections.scm
    │   ├── locals.scm
    │   └── textobjects.scm
    ├── haskell-persistent
    │   ├── folds.scm
    │   └── highlights.scm
    ├── hcl
    │   ├── folds.scm
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   └── textobjects.scm
    ├── heex
    │   ├── highlights.scm
    │   ├── injections.scm
    │   └── textobjects.scm
    ├── helm
    │   ├── highlights.scm
    │   └── injections.scm
    ├── hocon
    │   ├── highlights.scm
    │   ├── indents.scm
    │   └── textobjects.scm
    ├── hoon
    │   └── highlights.scm
    ├── hosts
    │   └── highlights.scm
    ├── html
    │   ├── highlights.scm
    │   └── injections.scm
    ├── htmldjango
    │   ├── highlights.scm
    │   └── injections.scm
    ├── hurl
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   └── textobjects.scm
    ├── hyprlang
    │   ├── highlights.scm
    │   ├── indents.scm
    │   └── injections.scm
    ├── iex
    │   ├── highlights.scm
    │   └── injections.scm
    ├── ini
    │   └── highlights.scm
    ├── ink
    │   └── highlights.scm
    ├── inko
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   ├── locals.scm
    │   └── textobjects.scm
    ├── janet
    │   └── highlights.scm
    ├── java
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   └── textobjects.scm
    ├── _javascript
    │   ├── highlights.scm
    │   ├── locals.scm
    │   └── tags.scm
    ├── javascript
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   ├── locals.scm
    │   ├── tags.scm
    │   └── textobjects.scm
    ├── jinja
    │   ├── highlights.scm
    │   └── injections.scm
    ├── jjdescription
    │   ├── highlights.scm
    │   └── injections.scm
    ├── jq
    │   ├── highlights.scm
    │   ├── injections.scm
    │   ├── locals.scm
    │   └── textobjects.scm
    ├── jsdoc
    │   ├── highlights.scm
    │   └── injections.scm
    ├── json
    │   ├── highlights.scm
    │   ├── indents.scm
    │   └── textobjects.scm
    ├── json5
    │   └── highlights.scm
    ├── jsonc
    │   ├── highlights.scm
    │   └── indents.scm
    ├── json-ld
    │   ├── highlights.scm
    │   ├── indents.scm
    │   └── textobjects.scm
    ├── jsonnet
    │   └── highlights.scm
    ├── _jsx
    │   ├── highlights.scm
    │   └── indents.scm
    ├── jsx
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   ├── locals.scm
    │   ├── tags.scm
    │   └── textobjects.scm
    ├── julia
    │   ├── folds.scm
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   ├── locals.scm
    │   └── textobjects.scm
    ├── just
    │   ├── folds.scm
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   ├── locals.scm
    │   └── textobjects.scm
    ├── kdl
    │   ├── highlights.scm
    │   ├── indents.scm
    │   └── textobjects.scm
    ├── koka
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   └── locals.scm
    ├── kotlin
    │   ├── folds.scm
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   ├── locals.scm
    │   └── textobjects.scm
    ├── koto
    │   ├── folds.scm
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   ├── locals.scm
    │   └── textobjects.scm
    ├── latex
    │   ├── folds.scm
    │   ├── highlights.scm
    │   ├── injections.scm
    │   └── textobjects.scm
    ├── ld
    │   ├── highlights.scm
    │   ├── indents.scm
    │   └── injections.scm
    ├── ldif
    │   └── highlights.scm
    ├── lean
    │   ├── folds.scm
    │   ├── highlights.scm
    │   ├── injections.scm
    │   └── locals.scm
    ├── ledger
    │   ├── highlights.scm
    │   └── injections.scm
    ├── llvm
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   ├── locals.scm
    │   └── textobjects.scm
    ├── llvm-mir
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   └── textobjects.scm
    ├── llvm-mir-yaml
    │   ├── highlights.scm
    │   ├── indents.scm
    │   └── injections.scm
    ├── log
    │   └── highlights.scm
    ├── lpf
    │   └── highlights.scm
    ├── lua
    │   ├── folds.scm
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   └── textobjects.scm
    ├── luau
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   ├── locals.scm
    │   └── textobjects.scm
    ├── mail
    │   ├── highlights.scm
    │   └── textobjects.scm
    ├── make
    │   ├── highlights.scm
    │   ├── indents.scm
    │   └── injections.scm
    ├── markdoc
    │   ├── highlights.scm
    │   └── injections.scm
    ├── markdown
    │   ├── highlights.scm
    │   └── injections.scm
    ├── markdown.inline
    │   ├── highlights.scm
    │   └── injections.scm
    ├── markdown-rustdoc
    │   ├── highlights.scm
    │   └── injections.scm
    ├── matlab
    │   ├── context.scm
    │   ├── folds.scm
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   ├── locals.scm
    │   └── textobjects.scm
    ├── mermaid
    │   └── highlights.scm
    ├── meson
    │   ├── highlights.scm
    │   └── indents.scm
    ├── mojo
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   ├── locals.scm
    │   └── textobjects.scm
    ├── move
    │   └── highlights.scm
    ├── msbuild
    │   ├── highlights.scm
    │   ├── indents.scm
    │   └── injections.scm
    ├── nasm
    │   ├── highlights.scm
    │   ├── injections.scm
    │   └── textobjects.scm
    ├── nestedtext
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   └── textobjects.scm
    ├── nginx
    │   ├── highlights.scm
    │   └── injections.scm
    ├── nickel
    │   ├── highlights.scm
    │   ├── indents.scm
    │   └── injections.scm
    ├── nim
    │   ├── highlights.scm
    │   ├── indents.scm
    │   └── textobjects.scm
    ├── nix
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   └── textobjects.scm
    ├── nu
    │   ├── highlights.scm
    │   └── injections.scm
    ├── nunjucks
    │   ├── highlights.scm
    │   └── injections.scm
    ├── ocaml
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   └── locals.scm
    ├── ocaml-interface
    │   ├── highlights.scm
    │   └── injections.scm
    ├── odin
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   └── textobjects.scm
    ├── ohm
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   └── textobjects.scm
    ├── opencl
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   └── textobjects.scm
    ├── openscad
    │   └── highlights.scm
    ├── org
    │   ├── highlights.scm
    │   └── injections.scm
    ├── pascal
    │   ├── highlights.scm
    │   ├── injections.scm
    │   └── textobjects.scm
    ├── passwd
    │   └── highlights.scm
    ├── pem
    │   └── highlights.scm
    ├── perl
    │   ├── fold.scm
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   └── textobjects.scm
    ├── pest
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   └── textobjects.scm
    ├── php
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   ├── tags.scm
    │   └── textobjects.scm
    ├── php-only
    │   ├── highlights.scm
    │   ├── injections.scm
    │   └── tags.scm
    ├── pkgbuild
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   └── textobjects.scm
    ├── pkl
    │   ├── highlights.scm
    │   ├── indents.scm
    │   └── injections.scm
    ├── po
    │   ├── highlights.scm
    │   └── textobjects.scm
    ├── pod
    │   └── highlights.scm
    ├── ponylang
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── locals.scm
    │   └── textobjects.scm
    ├── powershell
    │   ├── highlights.scm
    │   └── injections.scm
    ├── prisma
    │   ├── highlights.scm
    │   └── textobjects.scm
    ├── prolog
    │   ├── folds.scm
    │   ├── highlights.scm
    │   ├── indents.scm
    │   └── injections.scm
    ├── properties
    │   ├── highlights.scm
    │   ├── injections.scm
    │   ├── locals.scm
    │   └── textobjects.scm
    ├── protobuf
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   └── textobjects.scm
    ├── prql
    │   ├── highlights.scm
    │   └── injections.scm
    ├── pug
    │   ├── highlights.scm
    │   └── injections.scm
    ├── purescript
    │   ├── highlights.scm
    │   ├── injections.scm
    │   ├── locals.scm
    │   └── textobjects.scm
    ├── python
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   ├── locals.scm
    │   ├── tags.scm
    │   └── textobjects.scm
    ├── qml
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   └── textobjects.scm
    ├── quarto
    │   ├── highlights.scm
    │   ├── indents.scm
    │   └── injections.scm
    ├── quint
    │   ├── highlights.scm
    │   └── injections.scm
    ├── r
    │   ├── highlights.scm
    │   ├── injections.scm
    │   └── locals.scm
    ├── racket
    │   ├── highlights.scm
    │   ├── indents.scm
    │   └── injections.scm
    ├── regex
    │   └── highlights.scm
    ├── rego
    │   ├── highlights.scm
    │   └── injections.scm
    ├── rescript
    │   ├── highlights.scm
    │   ├── injections.scm
    │   └── textobjects.scm
    ├── rmarkdown
    │   ├── highlights.scm
    │   ├── indents.scm
    │   └── injections.scm
    ├── robot
    │   └── highlights.scm
    ├── ron
    │   ├── highlights.scm
    │   ├── indents.scm
    │   └── injections.scm
    ├── rst
    │   └── highlights.scm
    ├── ruby
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   ├── locals.scm
    │   ├── tags.scm
    │   └── textobjects.scm
    ├── rust
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   ├── locals.scm
    │   └── textobjects.scm
    ├── rust-format-args
    │   └── highlights.scm
    ├── rust-format-args-macro
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   ├── locals.scm
    │   └── textobjects.scm
    ├── sage
    │   ├── highlights.scm
    │   ├── injections.scm
    │   └── textobjects.scm
    ├── scala
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   ├── locals.scm
    │   └── textobjects.scm
    ├── scheme
    │   ├── highlights.scm
    │   ├── indents.scm
    │   └── injections.scm
    ├── scss
    │   ├── highlights.scm
    │   └── injections.scm
    ├── slang
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   └── textobjects.scm
    ├── slint
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   ├── locals.scm
    │   └── textobjects.scm
    ├── smali
    │   ├── folds.scm
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   └── locals.scm
    ├── smithy
    │   └── highlights.scm
    ├── sml
    │   └── highlights.scm
    ├── snakemake
    │   ├── folds.scm
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   ├── LICENSE
    │   └── locals.scm
    ├── solidity
    │   ├── highlights.scm
    │   ├── locals.scm
    │   └── textobjects.scm
    ├── sourcepawn
    │   ├── highlights.scm
    │   ├── injections.scm
    │   └── textobjects.scm
    ├── spade
    │   ├── highlights.scm
    │   └── indents.scm
    ├── spicedb
    │   ├── highlights.scm
    │   ├── injections.scm
    │   └── tags.scm
    ├── sql
    │   ├── highlights.scm
    │   └── textobjects.scm
    ├── sshclientconfig
    │   └── highlights.scm
    ├── starlark
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   └── textobjects.scm
    ├── strace
    │   └── highlights.scm
    ├── supercollider
    │   ├── folds.scm
    │   └── highlights.scm
    ├── svelte
    │   ├── highlights.scm
    │   ├── indents.scm
    │   └── injections.scm
    ├── sway
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   ├── locals.scm
    │   └── textobjects.scm
    ├── swift
    │   ├── highlights.scm
    │   ├── injections.scm
    │   ├── locals.scm
    │   └── textobjects.scm
    ├── systemd
    │   └── highlights.scm
    ├── t32
    │   ├── highlights.scm
    │   └── injections.scm
    ├── tablegen
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   └── textobjects.scm
    ├── tact
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   ├── locals.scm
    │   └── textobjects.scm
    ├── task
    │   ├── highlights.scm
    │   └── injections.scm
    ├── tcl
    │   ├── folds.scm
    │   ├── highlights.scm
    │   └── indents.scm
    ├── teal
    │   ├── folds.scm
    │   ├── highlights.scm
    │   └── locals.scm
    ├── templ
    │   ├── highlights.scm
    │   └── injections.scm
    ├── tera
    │   ├── highlights.scm
    │   ├── injections.scm
    │   └── locals.scm
    ├── textproto
    │   ├── highlights.scm
    │   ├── indents.scm
    │   └── textobjects.scm
    ├── tfvars
    │   ├── folds.scm
    │   ├── highlights.scm
    │   ├── indents.scm
    │   └── injections.scm
    ├── thrift
    │   ├── folds.scm
    │   ├── highlights.scm
    │   ├── injections.scm
    │   └── locals.scm
    ├── tlaplus
    │   ├── highlights.scm
    │   └── locals.scm
    ├── todotxt
    │   └── highlights.scm
    ├── toml
    │   ├── highlights.scm
    │   ├── injections.scm
    │   └── textobjects.scm
    ├── tsq
    │   ├── folds.scm
    │   ├── highlights.scm
    │   └── injections.scm
    ├── tsx
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   ├── locals.scm
    │   ├── tags.scm
    │   └── textobjects.scm
    ├── twig
    │   ├── highlights.scm
    │   └── injections.scm
    ├── _typescript
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── locals.scm
    │   ├── tags.scm
    │   └── textobjects.scm
    ├── typescript
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   ├── locals.scm
    │   ├── tags.scm
    │   └── textobjects.scm
    ├── typespec
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   └── textobjects.scm
    ├── typst
    │   ├── highlights.scm
    │   └── injections.scm
    ├── ungrammar
    │   └── highlights.scm
    ├── unison
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   └── textobjects.scm
    ├── uxntal
    │   └── highlights.scm
    ├── v
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   └── textobjects.scm
    ├── vala
    │   ├── highlights.scm
    │   └── textobjects.scm
    ├── vento
    │   ├── highlights.scm
    │   └── injections.scm
    ├── verilog
    │   ├── highlights.scm
    │   ├── injections.scm
    │   ├── locals.scm
    │   └── textobjects.scm
    ├── vhdl
    │   └── highlights.scm
    ├── vhs
    │   └── highlights.scm
    ├── vue
    │   ├── highlights.scm
    │   └── injections.scm
    ├── wast
    │   └── highlights.scm
    ├── wat
    │   └── highlights.scm
    ├── webc
    │   ├── highlights.scm
    │   └── injections.scm
    ├── werk
    │   └── highlights.scm
    ├── wesl
    │   ├── highlights.scm
    │   ├── injections.scm
    │   ├── locals.scm
    │   └── textobjects.scm
    ├── wgsl
    │   ├── highlights.scm
    │   └── injections.scm
    ├── wit
    │   ├── highlights.scm
    │   └── indents.scm
    ├── wren
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   ├── locals.scm
    │   └── textobjects.scm
    ├── xit
    │   └── highlights.scm
    ├── xml
    │   ├── highlights.scm
    │   ├── indents.scm
    │   └── injections.scm
    ├── xtc
    │   └── highlights.scm
    ├── yaml
    │   ├── highlights.scm
    │   ├── indents.scm
    │   ├── injections.scm
    │   └── textobjects.scm
    ├── yara
    │   ├── highlights.scm
    │   ├── injections.scm
    │   └── locals.scm
    ├── yuck
    │   ├── highlights.scm
    │   └── injections.scm
    └── zig
        ├── highlights.scm
        ├── indents.scm
        ├── injections.scm
        └── textobjects.scm

282 directories, 1038 files

@lewalkingdad
Copy link
Author

lewalkingdad commented Oct 30, 2025

From Discord chats: to get the best out of tree-sitter and kakoune we are better off using the main branch of kak-tree-sitter:

kts-master = pkgs.rustPlatform.buildRustPackage {
        pname = "kak-tree-sitter-master";
	version = "main-2025-10-26";
	src = pkgs.fetchFromSourcehut {
    	 owner = "~hadronized";
    	 repo = "kak-tree-sitter";
    	 rev = "cdcfb42da9affd9dd0db9e8df1173731c61e3d9f";
    	 hash = "sha256-Q8R++fEJMZFftiI9zGjwF7X8mek2oc40Yl9WMUtQWEA=";
	};

	cargoHash = "sha256-lZNM5HqICP6JfaMiBjACcUNRTTTIRhq2ou8cOLU0yOU=";
      };

I will need to also simplify the config.toml, known working config as a reference: https://gist.github.com/saifulapm/06749fc2f3c13c269b13a0600c11350a

Also I will have to change / edit queries, kts does not support includes, I won't be able to reuse as is the helix queries, I will have to parse them check for any includes, and if there is any I will have to concat the referenced file in the grammer calling the include instruction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment