tree-sitter implementation for feint
NOTE: This is a work in progress.
-
Install the tree-sitter CLI with
brew install tree-sitter
or the equivalent on your platform. -
Clone this repo:
git clone git@github.com:wylee/tree-sitter-feint.git ~/path/to/tree-sitter-feint
NOTE: The following seems rather convoluted. Hopefully this can be simplified eventually.
NOTE: Adjust paths as needed in all the code snippets below.
-
Install the nvim-treesitter plugin. You can use pathogen, vim-plug, etc.
-
Link the
tree-sitter
queries used for syntax highlight:ln -s ~/path/to/tree-sitter-feint/queries ~/.config/nvim/bundle/nvim-treesitter/queries/feint
-
Add the following to your
~/.config/nvim/init.lua
:-- NOTE: This line is only needed if you have an init.vim that you -- need to load too (e.g., to load your plugins). vim.cmd [[source ~/.config/nvim/legacy.vim]] vim.filetype.add({ extension = { fi = "feint", }, }) local parser_config = require "nvim-treesitter.parsers".get_parser_configs() parser_config.feint = { install_info = { url = "~/path/to/tree-sitter-feint", files = {"src/parser.c", "src/scanner.cc"}, generate_requires_npm = false, requires_generate_from_grammar = false, }, filetype = "fi", } require"nvim-treesitter.configs".setup { highlight = { enable = true, additional_vim_regex_highlighting = false, }, indent = { enable = true, }, } local ft_to_parser = require"nvim-treesitter.parsers".filetype_to_parsername ft_to_parser.feint = "feint"
-
Run
nvim
and install thefeint
tree-sitter impementation::TSInstall feint