~rockorager/tree-sitter-ansi

be7b7ed0e80a094a45cbd34aa4eb549d05bbb882 — Tim Culverhouse 1 year, 1 month ago cb9129a
add readme

Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
1 files changed, 22 insertions(+), 0 deletions(-)

A README
A README => README +22 -0
@@ 0,0 1,22 @@
# tree-sitter-ansi

tree-sitter highlighting for ansi escape sequences

## Usage

### neovim

1. Manually add the parser to your nvim config:
	```lua
	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