mirror of
https://github.com/neovim/neovim
synced 2025-07-16 09:11:51 +00:00
fix(treesitter): prefix treesitter types with vim
This commit is contained in:
committed by
Lewis Russell
parent
c8a27bae3f
commit
617d1b28d6
@ -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
|
||||
|
Reference in New Issue
Block a user