diff options
Diffstat (limited to 'nvim')
-rw-r--r-- | nvim/.config/nvim/init.vim | 3 | ||||
-rw-r--r-- | nvim/.config/nvim/lua/filetree.lua (renamed from nvim/.config/nvim/lua/nvim-tree.lua) | 4 | ||||
-rw-r--r-- | nvim/.config/nvim/lua/lsp-config.lua | 1 | ||||
-rw-r--r-- | nvim/.config/nvim/lua/lsp-saga.lua | 11 | ||||
-rw-r--r-- | nvim/.config/nvim/vim-plug/plugins.vim | 1 |
5 files changed, 16 insertions, 4 deletions
diff --git a/nvim/.config/nvim/init.vim b/nvim/.config/nvim/init.vim index aad7ecd..921859c 100644 --- a/nvim/.config/nvim/init.vim +++ b/nvim/.config/nvim/init.vim @@ -72,7 +72,8 @@ nnoremap <Leader>r :Telescope live_grep<CR> source ~/.config/nvim/startify.vim source ~/.config/nvim/vimwiki.vim -lua require('nvim-tree') lua require('lsp-config') +lua require('lsp-saga') lua require('completion') lua require('treesitter') +lua require('filetree') diff --git a/nvim/.config/nvim/lua/nvim-tree.lua b/nvim/.config/nvim/lua/filetree.lua index 57340aa..43f7da3 100644 --- a/nvim/.config/nvim/lua/nvim-tree.lua +++ b/nvim/.config/nvim/lua/filetree.lua @@ -1,13 +1,13 @@ local tree_cb = require'nvim-tree.config'.nvim_tree_callback -vim.api.nvim_set_keymap('n', '<F3>', ':NvimTreeToggle', { noremap = true, silent = true }) +vim.api.nvim_set_keymap('n', '<F3>', ':NvimTreeToggle<CR>', { noremap = true, silent = true }) vim.g.nvim_tree_auto_close = 1 vim.g.nvim_tree_group_empty = 1 vim.g.nvim_tree_bindings = { { key = "l", cb = tree_cb("edit") }, - { key = "h", cb = tree_cb("close_node") }, + { key = "h", cb = tree_cb("parent_node") and tree_cb("close_node") }, { key = "cw", cb = tree_cb("rename") }, { key = "o", cb = tree_cb("create") }, } diff --git a/nvim/.config/nvim/lua/lsp-config.lua b/nvim/.config/nvim/lua/lsp-config.lua index 74f22a6..f9189d7 100644 --- a/nvim/.config/nvim/lua/lsp-config.lua +++ b/nvim/.config/nvim/lua/lsp-config.lua @@ -17,7 +17,6 @@ local on_attach = function(client, bufnr) buf_set_keymap('n', 'gD', '<cmd>lua vim.lsp.buf.type_definition()<CR>', opts) buf_set_keymap('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<CR>', opts) buf_set_keymap('n', 'gr', '<cmd>lua vim.lsp.buf.references()<CR>', opts) - buf_set_keymap('n', 'K', '<cmd>lua vim.lsp.buf.hover()<CR>', opts) buf_set_keymap('n', '<leader>rn', '<cmd>lua vim.lsp.buf.rename()<CR>', opts) buf_set_keymap('n', '<leader>ca', '<cmd>lua vim.lsp.buf.code_action()<CR>', opts) end diff --git a/nvim/.config/nvim/lua/lsp-saga.lua b/nvim/.config/nvim/lua/lsp-saga.lua new file mode 100644 index 0000000..d3c1739 --- /dev/null +++ b/nvim/.config/nvim/lua/lsp-saga.lua @@ -0,0 +1,11 @@ +local saga = require 'lspsaga' + +vim.api.nvim_set_keymap('n', 'K', ':Lspsaga hover_doc<CR>', { noremap = true, silent = true }) + +saga.init_lsp_saga { + error_sign = '', + warn_sign = '', + hint_sign = '', + infor_sign = '', + border_style = "round", +} diff --git a/nvim/.config/nvim/vim-plug/plugins.vim b/nvim/.config/nvim/vim-plug/plugins.vim index e90a401..a99bb14 100644 --- a/nvim/.config/nvim/vim-plug/plugins.vim +++ b/nvim/.config/nvim/vim-plug/plugins.vim @@ -6,6 +6,7 @@ call plug#begin('~/.config/nvim/autoload/plugged') " Built-in LSP Plug 'neovim/nvim-lspconfig' Plug 'hrsh7th/nvim-compe' + Plug 'glepnir/lspsaga.nvim' " Treesitter Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} Plug 'nvim-treesitter/playground' |