mirror of
https://github.com/neovim/neovim.git
synced 2024-09-17 20:58:20 -04:00
docs(treesitter): some functions are only valid for registered parsers
This commit is contained in:
parent
15bfdf73ea
commit
52eef14703
@ -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`)
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user