This commit is contained in:
Yi Ming 2024-09-18 01:45:27 +02:00 committed by GitHub
commit 088440d84c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View File

@ -970,7 +970,7 @@ add({lang}, {opts}) *vim.treesitter.language.add()*
language to load
get_filetypes({lang}) *vim.treesitter.language.get_filetypes()*
Get the filetypes associated with the parser named {lang}.
Get the filetypes associated with the registered parser named {lang}.
Parameters: ~
• {lang} (`string`) Name of parser
@ -979,6 +979,7 @@ get_filetypes({lang}) *vim.treesitter.language.get_filetypes()*
(`string[]`) filetypes
get_lang({filetype}) *vim.treesitter.language.get_lang()*
Get the registered parser name associated with the provided filetype.
Parameters: ~
• {filetype} (`string`)

View File

@ -7,7 +7,7 @@ local ft_to_lang = {
help = 'vimdoc',
}
--- Get the filetypes associated with the parser named {lang}.
--- Get the filetypes associated with the registered parser named {lang}.
--- @param lang string Name of parser
--- @return string[] filetypes
function M.get_filetypes(lang)
@ -20,6 +20,7 @@ function M.get_filetypes(lang)
return r
end
--- Get the registered parser name associated with the provided filetype.
--- @param filetype string
--- @return string|nil
function M.get_lang(filetype)