add: treesitter status line info

This commit is contained in:
asep.komarudin 2024-05-20 12:52:01 +07:00
parent 29ce43859b
commit f62b7c6227
2 changed files with 16 additions and 4 deletions

View file

@ -16,6 +16,18 @@ return {
end
end
local treesitter = {
function()
return icons.ui.Tree
end,
color = function()
local buf = vim.api.nvim_get_current_buf()
local ts = vim.treesitter.highlighter.active[buf]
return { fg = ts and not vim.tbl_isempty(ts) and "#50fa7b" or "#FF5555" }
end,
cond = hide_in_width,
}
-- start for lsp
local list_registered_providers_names = function(filetype)
local s = require("null-ls.sources")
@ -257,7 +269,7 @@ return {
},
lualine_b = { get_branch },
lualine_c = { lsp_info, diagnostics, lsp_progress },
lualine_x = { diff, spaces, "filetype" },
lualine_x = { treesitter, diff, spaces, "filetype" },
lualine_y = { "progress" },
lualine_z = {
{ "location", separator = { right = "" }, padding = 1 },