mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-06 13:30:01 -04:00
feat/refacto: improve configurations
- You should now get the configs through functions - Configs for languages are now inside a local object called parsers - You can get the parser installation configurations with `get_parser_configs` - A new object has been initialized inside configs to specify module config (called config). - Provide functions to enable/disable a module on one buffer - Provide functions to enable/disable a module on all buffers, and if filetype is specified, for specific filetype - Provide function to determine if module is activated for a specified filetype
This commit is contained in:
parent
b7fdd6ae38
commit
62786ec7c6
8 changed files with 453 additions and 112 deletions
|
|
@ -13,7 +13,7 @@ local health_error = vim.fn['health#report_error']
|
|||
|
||||
local M = {}
|
||||
|
||||
local function configs_health()
|
||||
local function install_health()
|
||||
if fn.executable('git') == 0 then
|
||||
health_error('`git` executable not found.', {
|
||||
'Install it with your package manager.',
|
||||
|
|
@ -38,11 +38,11 @@ end
|
|||
function M.checkhealth()
|
||||
-- Installation dependency checks
|
||||
health_start('Installation')
|
||||
configs_health()
|
||||
install_health()
|
||||
|
||||
local missing_parsers = {}
|
||||
-- Parser installation checks
|
||||
for parser_name in pairs(configs.repositories) do
|
||||
for _, parser_name in pairs(configs.available_parsers()) do
|
||||
local installed = #api.nvim_get_runtime_file('parser/'..parser_name..'.so', false)
|
||||
|
||||
-- Only print informations about installed parsers
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue