mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 11:06:54 -04:00
feat(api): expose list of available and installed languages
This commit is contained in:
parent
0860b9b107
commit
ce903fde5d
8 changed files with 36 additions and 13 deletions
|
|
@ -3,7 +3,7 @@ vim.opt.runtimepath:append('.')
|
|||
|
||||
local configs = require('nvim-treesitter.parsers')
|
||||
local parsers = #_G.arg > 0 and { unpack(_G.arg) }
|
||||
or require('nvim-treesitter.config').installed_languages('parsers')
|
||||
or require('nvim-treesitter.config').get_installed('parsers')
|
||||
|
||||
local data = {} ---@type table[]
|
||||
local errors = {} ---@type string[]
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ vim.opt.runtimepath:append('.')
|
|||
local query_types = require('nvim-treesitter.health').bundled_queries
|
||||
local configs = require('nvim-treesitter.parsers')
|
||||
local parsers = #_G.arg > 0 and { unpack(_G.arg) }
|
||||
or require('nvim-treesitter.config').installed_languages('queries')
|
||||
or require('nvim-treesitter.config').get_installed('queries')
|
||||
|
||||
-- Check queries for each installed parser in parsers
|
||||
local errors = {} ---@type string[]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue