ldelossa / litee-calltree.nvim

Neovim's missing call hierarchy UI
131 stars 9 forks source link

Lazyvim support? #21

Open sp71 opened 9 months ago

sp71 commented 9 months ago

Does this work with lazyvim? If so, could you provide a snippet how to hook it all up in readme?

djdv commented 9 months ago

I'm using it with lazy.nvim (which seems to be how lazyvim manages its plugins as well). The readme's snippet can be adapted like this:

{
    'ldelossa/litee-calltree.nvim',
    dependencies = 'ldelossa/litee.nvim',
    config = function()
        require('litee.lib').setup({})
        require('litee.calltree').setup({})
    end
}

So that the litee dependency gets pulled in and loaded before calltree.

If you use other litee plugins you could probably invert the dependency order like this:

{
    'ldelossa/litee.nvim'
    dependencies = {
        'ldelossa/litee-calltree.nvim',
        'ldelossa/litee-symboltree.nvim',
        'ldelossa/litee-filetree.nvim',
        'kyazdani42/nvim-web-devicons' -- For filetree.
    }
    config = function()
        require('litee.lib').setup({})
        require('litee.calltree').setup({})
        require('litee.symboltree').setup({})
        require('litee.filetree').setup({})
    end
}

I'm specifically using this in my own config:

{
    'ldelossa/litee-calltree.nvim', -- Call tree / hierarchy UI.
    dependencies = 'ldelossa/litee.nvim',
    config = function()
        require('litee.lib').setup({})
        require('litee.calltree').setup({
            on_open = "popout",
            map_resize_keys = false,
            keymaps = {
                expand = "<Right>",
                collapse = "<Left>"
            },
        })
        vim.keymap.set('n', '<Leader>c', vim.lsp.buf.incoming_calls)
    end
}

And haven't had any issues with it. (But might switch to using the second style mentioned above if I decide to use more than just calltree.)

Zeioth commented 6 months ago

This should 100% be in the readme:

ldelossa commented 6 months ago

Open up PRs for README changes, will accept :)