feat(vlang): initial support

Add support for vlang filetypes.

- [ ] Highlight `C` as builtin variable. This is FFI in vlang land,
  where C act like extern and access c functions. The vlang parser does
  some extension between C function calls and arguments but I believe
  highlighting C as builtin variable is sufficient indicator for now. I
  tried to use offset! but failed. Any suggestions?
- [ ] Set up parser url. the vlang parser is located within [vls] repo. Is
  installing from nested repo supported? `tree_sitter_v/src/parser.c`?

[vls]: https://github.com/vlang/vls/tree/master/tree_sitter_v

cc @elianiva @theHamsta
This commit is contained in:
tami5 2022-02-22 17:36:44 +03:00 committed by Stephan Seitz
parent f0f75b6c54
commit 010f364295
7 changed files with 460 additions and 1 deletions

View file

@ -1068,6 +1068,17 @@ list.proto = {
filetype = "proto",
}
list.v = {
install_info = {
url = "~/sources/vls/tree_sitter_v",
files = { "src/parser.c", "src/scanner.c" },
generate_requires_npm = false,
requires_generate_from_grammar = false,
},
filetype = "vlang",
maintainers = { "@tami5" },
}
local M = {
list = list,
filetype_to_parsername = filetype_to_parsername,