Closed ghost closed 3 years ago
Hey @blackCauldron7 , sorry for the inconvenience and late reply.😅
As it states in README, staline doesn't have git or lsp related stuff by default but,
defaults.filename_section
and defaults.cool_symbol
can take custom modules.
The easiest way would be to create a function which returns a string and pass it to filename_section
or cool_symbol
.
For example,
function Get_lsp_stuff()
local errors = vim.lsp.diagnostic.get_count(0, 'Error')
return " "..errors
end
and pass that function into filename_section,
require'staline'.setup{
defaults = {
filename_section = '%{luaeval("Get_lsp_stuff()")}'
}
}
Which would look something like,
thanks that works.
Thanks for the Amazing Plugin.
I wanted to add nvim_lsp diagnostics and treesitter nearest function to my staline.