owulveryck / tree-sitter-wtg

Experimental grammer for the WardleyToGo grammar

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tree-sitter-wtg

Experimental grammer for the WardleyToGo grammar

HowTo Neovim

local parser_config = require "nvim-treesitter.parsers".get_parser_configs()
parser_config.wtg = {
	install_info = {
		url = "https://github.com/owulveryck/tree-sitter-wtg", -- local path or git repo
		files = {"src/parser.c"},
		-- optional entries:
		branch = "main", -- default branch in case of git repo if different from master
		generate_requires_npm = false, -- if stand-alone parser without npm dependencies
		requires_generate_from_grammar = true, -- if folder contains pre-generated src/parser.c
	},
	filetype = "wtg", -- if filetype does not match the parser name
}

Add the queries to the correct directory

mkdir ~/.config/nvim/after/queries/wtg && cp queries/highlights.scm ~/.config/nvim/after/queries/wtg

Then set the filetype for the current buffer

:set filetype=wtg

About

Experimental grammer for the WardleyToGo grammar

License:MIT License


Languages

Language:C 69.5%Language:Rust 18.6%Language:C++ 4.9%Language:JavaScript 4.5%Language:Python 2.1%Language:Scheme 0.3%