From 749a8a7f25f6aaee7adcb2c0d6b4cbcf98695346 Mon Sep 17 00:00:00 2001 From: Pau Ruiz Safont Date: Thu, 10 Sep 2020 18:44:09 +0100 Subject: feat: add parser for ocaml interface files The files have the mli extension. The parser grammar uses the name ocaml_interface, but since vim the underscore has a special meaning ocamlinterface is used as the filetype. --- lua/nvim-treesitter/parsers.lua | 10 ++++++++++ lua/nvim-treesitter/query.lua | 1 + 2 files changed, 11 insertions(+) (limited to 'lua') diff --git a/lua/nvim-treesitter/parsers.lua b/lua/nvim-treesitter/parsers.lua index a51f9770a..24a7ca0a6 100644 --- a/lua/nvim-treesitter/parsers.lua +++ b/lua/nvim-treesitter/parsers.lua @@ -135,6 +135,16 @@ list.ocaml = { maintainers = {'@undu'}, } +list.ocaml_interface = { + install_info = { + url = "https://github.com/tree-sitter/tree-sitter-ocaml", + files = { "src/parser.c", "src/scanner.cc" }, + location = "tree-sitter-ocaml_interface/interface" + }, + maintainers = {'@undu'}, + filetype = 'ocamlinterface' +} + list.swift = { install_info = { url = "https://github.com/tree-sitter/tree-sitter-swift", diff --git a/lua/nvim-treesitter/query.lua b/lua/nvim-treesitter/query.lua index d308e59b9..9881cd2dd 100644 --- a/lua/nvim-treesitter/query.lua +++ b/lua/nvim-treesitter/query.lua @@ -15,6 +15,7 @@ M.base_language_map = { typescript = {'javascript'}, javascript = {'jsx'}, tsx = {'typescript', 'javascript', 'jsx'}, + ocaml_interface = {'ocaml'}, } M.built_in_query_groups = {'highlights', 'locals', 'textobjects', 'folds'} -- cgit v1.2.3-70-g09d2