Skip to content

inobulles/tree-sitter-flamingo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flamingo: Tree-sitter

Installing Tree-sitter

With cargo:

cargo install tree-sitter-cli
export PATH=$PATH:~/.cargo/bin

Generating parser

Run:

tree-sitter generate

Testing

Run:

tree-sitter test

To quickly test highlighting of a single file, run:

tree-sitter highlight hello_world.fl

Installing in Neovim

You can use the nvim-treesitter plugin to enable syntax highlighting for Flamingo in Neovim.

Add the following to your init.lua:

local treesitter_parser_configs = require "nvim-treesitter.parsers".get_parser_configs()

treesitter_parser_configs.flamingo = {
	install_info = {
		url = "https://github.com/inobulles/flamingo",
		files = {"src/parser.c"},
	},
}

vim.filetype.add({
	extension = {
		fl = "flamingo"
	}
})

This URL can also be a local path, e.g. ~/flamingo/tree-sitter-flamingo.

Then, any time you want to update the parser, run :TSInstall flamingo in Neovim.

More detail may be found in the "Adding Parser" section in the nvim-treesitter README.

Formatting

Run:

pnpm i
pnpm prettier . --write

Roadmap

About

Flamingo grammar for Tree-sitter🦩🌳

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published