mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-07 05:50:04 -04:00
health(refactor): move checks inside health.lua
This commit is contained in:
parent
4d4e7d8a8c
commit
ce690e550d
3 changed files with 23 additions and 34 deletions
|
|
@ -10,22 +10,6 @@ local M = {
|
|||
locals={}
|
||||
}
|
||||
|
||||
function M.checkhealth(lang)
|
||||
local health_start = vim.fn["health#report_start"]
|
||||
local health_ok = vim.fn['health#report_ok']
|
||||
local health_info = vim.fn['health#report_info']
|
||||
local health_warn = vim.fn['health#report_warn']
|
||||
local health_error = vim.fn['health#report_error']
|
||||
|
||||
if not queries.get_query(lang, "locals") then
|
||||
health_warn("No `locals.scm` query found for " .. lang, {
|
||||
"Open an issue at https://github.com/nvim-treesitter/nvim-treesitter"
|
||||
})
|
||||
else
|
||||
health_ok("`locals.scm` found.")
|
||||
end
|
||||
end
|
||||
|
||||
function M.collect_locals(bufnr)
|
||||
local ft = api.nvim_buf_get_option(bufnr, "ft")
|
||||
if not ft then return end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue