mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-15 18:00:07 -04:00
fix: Sort parsers for :TSInstallInfo
This commit is contained in:
parent
9ebe0bd8d7
commit
ddc0f1b606
1 changed files with 3 additions and 1 deletions
|
|
@ -10,7 +10,9 @@ local function install_info()
|
||||||
if #ft > max_len then max_len = #ft end
|
if #ft > max_len then max_len = #ft end
|
||||||
end
|
end
|
||||||
|
|
||||||
for _, ft in pairs(parsers.available_parsers()) do
|
local parser_list = parsers.available_parsers()
|
||||||
|
table.sort(parser_list)
|
||||||
|
for _, ft in pairs(parser_list) do
|
||||||
local is_installed = #api.nvim_get_runtime_file('parser/'..ft..'.so', false) > 0
|
local is_installed = #api.nvim_get_runtime_file('parser/'..ft..'.so', false) > 0
|
||||||
api.nvim_out_write(ft..string.rep(' ', max_len - #ft + 1))
|
api.nvim_out_write(ft..string.rep(' ', max_len - #ft + 1))
|
||||||
if is_installed then
|
if is_installed then
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue