Using the treesitter backend, we can use the same "selectionRange" logic
that LSP symbol sources use to provide more detailed information about
where the name of the symbol is. We already use the LSP information to
change how we navigate the cursor to symbols, so once we parse this
information from treesitter it will automatically get used.
I'm putting this behind an experimental config option for now so we can
test it out for a while before making a sudden change to the behavior.
I find that showing anonymous functions is never helpful. These are
typically passed in as callback arguments to other functions, and are
not helpful to show in a symbol tree. They also break my expectations
for navigation.
This adds support for the end_lnum and end_col fields to the treesitter
and markdown backends. Now all backends store both the start and the end
of a symbol. At the moment this is only being used for detecting exact
position matching, so the lualine component and highlighting when
`highlight_closest = false`.
This change also made the C, C++, and Julia treesitter backends a bit
more correct and robust.