mirror of
https://github.com/chenasraf/nvim-treesitter.git
synced 2026-05-18 01:39:00 +00:00
- configs.lua holds the `repositories` data - install health moved to health.lua - plugins loads _root.setup() on startup - install and list command are available through vim > use them with `:TSInstall lang` and `:TSInstallInfo`
28 lines
624 B
Lua
28 lines
624 B
Lua
local api = vim.api
|
|
local parsers = require'nvim-treesitter.parsers'
|
|
local configs = require 'nvim-treesitter.configs'
|
|
local install = require'nvim-treesitter.install'
|
|
local locals = require'nvim-treesitter.locals'
|
|
|
|
local M = {}
|
|
|
|
function M.available_parsers()
|
|
return vim.tbl_keys(configs.repositories)
|
|
end
|
|
|
|
-- This function sets up everythin needed for a given language
|
|
-- this is the main interface through the plugin
|
|
function M.setup(lang)
|
|
if parsers.has_parser(lang) then
|
|
end
|
|
end
|
|
|
|
-- This function initialize the plugin
|
|
-- it is run at startup
|
|
M._root = {}
|
|
function M._root.setup()
|
|
install.setup()
|
|
end
|
|
|
|
return M
|