~rockorager/tree-sitter-ansi

a tree-sitter grammar for ANSI escaped files

refs

main
browse  log 

clone

read-only
https://git.sr.ht/~rockorager/tree-sitter-ansi
read/write
git@git.sr.ht:~rockorager/tree-sitter-ansi

You can also use your local clone with git send-email.

#tree-sitter-ansi

tree-sitter highlighting for ansi escape sequences

#Usage

#neovim

  1. Manually add the parser to your nvim config:
    require("nvim-treesitter.parsers").get_parser_configs().ansi = {
        install_info = {
            url = "https://git.sr.ht/~rockorager/tree-sitter-ansi",
            files = {"src/parser.c"},
        },
        filetype = "ansi",
        requires_generate_from_grammar = true,
    }
    
  2. Link or copy queries/highlights.scm to $XDG_CONFIG_HOME/nvim/queries/ansi/highlights.scm
  3. Open nvim, and run :TSInstall ansi