The text is useful, but it can be a bit too verbose.
It would be great if we could shape the segments to be something like this:
describe something > describe subcategory > it can do things
Which can be achieved by reading an optional format_text function to treat each segment of the result:
navic.setup({
format_text = function(text)
if (text:match("^it%(") or text:match("^describe%(")) then
return text:gsub("^it%('", "it ")
:gsub("^describe%('", "describe ")
:gsub("'%) callback$", "")
end
return text
end
})
Hi @SmiteshP,
I've been enjoying your plugin for a while, and I would like to add customize the segments returned by the LSP client.
For example, when working with test suites, the navigation looks like
describe('something') callback > describe ('subcategory') callback > it('can do things') callback
The text is useful, but it can be a bit too verbose.
It would be great if we could shape the segments to be something like this:
describe something > describe subcategory > it can do things
Which can be achieved by reading an optional
format_text
function to treat each segment of the result: