Re-add tree plugin
This commit is contained in:
parent
5381e06eb9
commit
3472aa110a
14
after/plugin/lsp/calltree.lua
Normal file
14
after/plugin/lsp/calltree.lua
Normal file
@ -0,0 +1,14 @@
|
||||
-- configure the litee.nvim library
|
||||
require('litee.lib').setup({})
|
||||
-- configure litee-calltree.nvim
|
||||
require('litee.calltree').setup({})
|
||||
|
||||
require('litee.lib').setup({
|
||||
tree = {
|
||||
icon_set = "codicons"
|
||||
},
|
||||
panel = {
|
||||
orientation = "right",
|
||||
panel_size = 30
|
||||
}
|
||||
})
|
@ -2,10 +2,10 @@ vim.api.nvim_create_autocmd('LspAttach', {
|
||||
callback = function(ev)
|
||||
local builtin = require('telescope.builtin')
|
||||
vim.keymap.set('n', '<leader>gr', builtin.lsp_references);
|
||||
vim.keymap.set('n', '<leader>ci', builtin.lsp_incoming_calls);
|
||||
|
||||
local opts = { noremap=true, silent=false, buffer = ev.buf }
|
||||
local opts = { noremap = true, silent = false, buffer = ev.buf }
|
||||
|
||||
vim.keymap.set('n', '<leader>ci', vim.lsp.buf.incoming_calls, opts);
|
||||
vim.keymap.set('n', '<leader>gD', '<Cmd>lua vim.lsp.buf.declaration()<CR>', opts)
|
||||
vim.keymap.set('n', '<leader>ga', '<Cmd>lua vim.lsp.buf.code_action()<CR>', opts)
|
||||
vim.keymap.set('n', 'K', '<Cmd>lua vim.lsp.buf.hover()<CR>', opts)
|
||||
@ -17,7 +17,7 @@ vim.api.nvim_create_autocmd('LspAttach', {
|
||||
vim.keymap.set('n', '[d', '<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>', opts)
|
||||
vim.keymap.set('n', ']d', '<cmd>lua vim.lsp.diagnostic.goto_next()<CR>', opts)
|
||||
vim.keymap.set('n', '<leader>q', '<cmd>lua vim.lsp.diagnostic.set_loclist()<CR>', opts)
|
||||
vim.keymap.set('n', '<leader>gd', function() vim.lsp.buf.definition() end, opts)
|
||||
vim.keymap.set('n', '<leader>gd', vim.lsp.buf.definition, opts)
|
||||
vim.keymap.set('n', '<leader>fo', function()
|
||||
vim.lsp.buf.format { async = true }
|
||||
end, opts)
|
||||
|
@ -6,11 +6,16 @@ require 'lspconfig'.lua_ls.setup {
|
||||
client.config.settings = vim.tbl_deep_extend('force', client.config.settings, {
|
||||
Lua = {
|
||||
runtime = {
|
||||
-- Tell the language server which version of Lua you're using
|
||||
-- (most likely LuaJIT in the case of Neovim)
|
||||
version = 'LuaJIT'
|
||||
},
|
||||
-- Make the server aware of Neovim runtime files
|
||||
workspace = {
|
||||
checkThirdParty = false,
|
||||
library = vim.api.nvim_get_runtime_file("", true)
|
||||
library = {
|
||||
vim.env.VIMRUNTIME
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
@ -22,6 +22,10 @@ return require('packer').startup(function(use)
|
||||
use 'simrat39/rust-tools.nvim'
|
||||
use 'akinsho/flutter-tools.nvim'
|
||||
|
||||
-- call tree
|
||||
use 'ldelossa/litee.nvim'
|
||||
use 'ldelossa/litee-calltree.nvim'
|
||||
|
||||
-- debugging
|
||||
use 'mfussenegger/nvim-dap'
|
||||
use 'leoluz/nvim-dap-go'
|
||||
|
Loading…
Reference in New Issue
Block a user