mirror of
https://github.com/chenasraf/nvim-treesitter.git
synced 2026-05-18 01:39:00 +00:00
Instead we lazily evaluate them on request.
This allow two things :
* better performances
* being sure the locas are up to date
20 lines
542 B
Lua
20 lines
542 B
Lua
local api = vim.api
|
|
local parsers = require'nvim-treesitter.parsers'
|
|
local install = require'nvim-treesitter.install'
|
|
local locals = require'nvim-treesitter.locals'
|
|
|
|
local M = {}
|
|
|
|
-- 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
|
|
|
|
-- To install, run `:lua require'nvim-treesitter'.install_parser('language')`
|
|
-- we should add a vim layer over the lua function
|
|
M.install_parser = install.install_parser
|
|
|
|
return M
|