fix(treesitter): prefix treesitter types with vim

This commit is contained in:
Phạm Huy Hoàng
2024-01-23 18:06:54 +09:00
committed by Lewis Russell
parent c8a27bae3f
commit 617d1b28d6
4 changed files with 22 additions and 22 deletions

View File

@ -1,6 +1,6 @@
local api = vim.api
---@class TSLanguageModule
---@class vim.treesitter.language
local M = {}
---@type table<string,string>
@ -57,7 +57,7 @@ function M.require_language(lang, path, silent, symbol_name)
return true
end
---@class treesitter.RequireLangOpts
---@class vim.treesitter.language.RequireLangOpts
---@field path? string
---@field silent? boolean
---@field filetype? string|string[]
@ -74,7 +74,7 @@ end
--- - path (string|nil) Optional path the parser is located at
--- - symbol_name (string|nil) Internal symbol name for the language to load
function M.add(lang, opts)
---@cast opts treesitter.RequireLangOpts
---@cast opts vim.treesitter.language.RequireLangOpts
opts = opts or {}
local path = opts.path
local filetype = opts.filetype or lang