feat: add hurl
Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
parent
5e50a8a432
commit
7967c0f87e
28
lua/plugins/treesitter.lua
Normal file
28
lua/plugins/treesitter.lua
Normal file
@ -0,0 +1,28 @@
|
||||
return {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = function(_, _)
|
||||
local parser_config = require "nvim-treesitter.parsers".get_parser_configs()
|
||||
|
||||
|
||||
-- https://github.com/nvim-treesitter/nvim-treesitter/tree/master#adding-parsers
|
||||
parser_config.hurl = {
|
||||
install_info = {
|
||||
url = "~/git/github.com/kjuulh/tree-sitter-hurl",
|
||||
files = { "src/parser.c" },
|
||||
branch = "main",
|
||||
generate_requires_npm = false,
|
||||
requires_generate_from_grammar = false,
|
||||
},
|
||||
filetype = "hurl",
|
||||
}
|
||||
|
||||
|
||||
-- https://neovim.io/doc/user/lua.html#vim.filetype.add()
|
||||
-- Search for vim.filetype.add
|
||||
vim.filetype.add({
|
||||
extension = {
|
||||
hurl = "hurl"
|
||||
}
|
||||
})
|
||||
end
|
||||
}
|
17
queries/hurl/highlights.scm
Normal file
17
queries/hurl/highlights.scm
Normal file
@ -0,0 +1,17 @@
|
||||
[
|
||||
"GET"
|
||||
"POST"
|
||||
"PUT"
|
||||
"DELETE"
|
||||
"CONNECT"
|
||||
"OPTIONS"
|
||||
"TRACE"
|
||||
"PATCH"
|
||||
"LINK"
|
||||
"UNLINK"
|
||||
"PURGE"
|
||||
"LOCK"
|
||||
"UNLOCK"
|
||||
"PROPFIND"
|
||||
"VIEW"
|
||||
] @keyword
|
Loading…
Reference in New Issue
Block a user