hedyhli / outline.nvim

Code outline sidebar powered by LSP. Forked from symbols-outline.nvim.
https://sr.ht/~hedy/outline.nvim
MIT License
620 stars 17 forks source link

Option to support virtual text wrapping of symbol details #82

Open balpert89 opened 3 months ago

balpert89 commented 3 months ago

I am currently configuring outline for my setup.

With opts = { outline_window = { wrap = true }, outline_items = { show_symbol_details = true } } the wrapping only takes the func name into consideration, not the signature:

image

How can I achieve wrapping to also consider the signature?

This is my current configuration, using lazy.nvim:

return {
    {
        "hedyhli/outline.nvim",
        lazy = true,
        event = { "LspAttach" },
        cmd = { "Outline", "OutlineOpen" },
        opts = {
            outline_window = {
                auto_close = false,
                auto_jump = true,
                show_numbers = false,
                width = 20,
                wrap = true,
            },
            outline_items = {
                show_symbol_lineno = true,
                show_symbol_details = true,
            },
        },
    },
}
hedyhli commented 2 months ago

Hmm, symbol details are added as virtual text, it's unaffected by set wrap. I imagine there might be a way to workaround this, or maybe there's even an option for nvim_buf_set_extmark to support wrapping. I'll leave this up for grabs as a feature request.