Syphon grammar for tree-sitter.
1 - Add this to your languages.toml
file
[[language]]
name = "syphon"
scope = "scope.syphon"
injection-regex = "syphon"
file-types = ["sy"]
comment-tokens = ["#"]
indent = { tab-width = 4, unit = " " }
shebangs = ["syphon"]
[[grammar]]
name = "syphon"
source = { git = "https://github.com/yhyadev/tree-sitter-syphon", rev = "<PUT THE COMMIT REVISION HERE>" }
2 - Now, copy the queries from queries/helix to runtime/queries/syphon
directory inside the root of local config
3 - And lastly run these commands to fetch and build the parser
hx -g fetch
hx -g build
1 - Add this to your init.lua file if you use nvim-treesitter
local parser_config = require("nvim-treesitter.parsers").get_parser_configs()
parser_config.syphon = {
install_info = {
url = "https://github.com/yhyadev/tree-sitter-syphon",
files = { "src/parser.c" },
rev = "<PUT THE COMMIT REVISION HERE>",
},
filetype = "sy"
}
vim.filetype.add({
extension = {
sy = "syphon"
}
})
2 - Now, copy the queries from queries/nvim to queries/syphon
directory inside the root of local config
3 - And lastly restart neovim and then run :TSUpdate