update mappings remove and add tagbar

This commit is contained in:
juan 2021-11-13 15:29:17 +08:00
parent 2870de965f
commit 9f58d7de20
Signed by: juan
GPG Key ID: 5C1E5093C74F1DC7
4 changed files with 35 additions and 68 deletions

View File

@ -28,13 +28,18 @@ vim.api.nvim_set_keymap('', '<leader>gs', ':Gitsigns toggle_signs<cr>',
-- lsp stuff
vim.api.nvim_buf_set_keymap(0, 'n', 'K', '<cmd>lua vim.lsp.buf.hover()<CR>',
{noremap = true})
-- toggle tagbar
vim.api.nvim_set_keymap('', '<leader>tt', ':TagbarToggle<cr>', {silent = true})
-- toggle NvimTree
vim.api.nvim_set_keymap('', '<C-n>', ':NvimTreeToggle<cr>', {silent = true})
-- toggle formatter
vim.api.nvim_set_keymap('', '<leader>fm', ':Neoformat<cr>', {silent = true})
-- toggle comment
vim.api.nvim_set_keymap('', '<leader>/', ':CommentToggle<cr>', {silent = true})
-- toggle Hop
vim.api.nvim_set_keymap('', '<leader>b', ':HopWordBC<cr>', {silent = true})
vim.api.nvim_set_keymap('', '<leader>w', ':HopWordAC<cr>', {silent = true})
-- telescope stuff
vim.api.nvim_set_keymap('', '<leader>tf', ':Telescope fd<cr>', {silent = true})
vim.api.nvim_set_keymap('', '<leader>tb', ':Telescope buffers<cr>',
{silent = true})
@ -46,7 +51,3 @@ vim.api.nvim_set_keymap('', '<leader>tdd',
vim.api.nvim_set_keymap('', '<leader>tdw',
':Telescope lsp_workspace_diagnostics<cr>',
{silent = true})
vim.api.nvim_set_keymap('', '<leader>dt', ':lua require("dapui").toggle()<cr>',
{silent = true})
vim.api.nvim_set_keymap('', '<leader>de', ':lua require("dapui").eval()<cr>',
{silent = true})

View File

@ -73,7 +73,7 @@ return require('packer').startup(function(use)
after = 'coq_nvim',
config = function()
require("coq_3p") {
{src = "nvimlua", short_name = "nLUA"}, {src = "repl"},
{src = "nvimlua", short_name = "nLUA"}, {src = "repl"}
}
end
@ -120,6 +120,7 @@ return require('packer').startup(function(use)
requires = {{'nvim-lua/plenary.nvim'}},
cmd = 'Telescope'
}
use {'preservim/tagbar', cmd = 'TagbarToggle'}
use {
'phaazon/hop.nvim',
event = "VimEnter",
@ -130,11 +131,6 @@ return require('packer').startup(function(use)
}
-- eye-candy
use {
'sunjon/shade.nvim',
event = "VimEnter",
config = function() require "plugins.shade" end
}
use {
"lukas-reineke/indent-blankline.nvim",
after = {"nvim-treesitter", "nvim-base16"},

View File

@ -1,55 +1,29 @@
-- following options are the default
-- each of these are documented in `:help nvim-tree.OPTION_NAME`
require'nvim-tree'.setup {
-- disables netrw completely
disable_netrw = true,
-- hijack netrw window on startup
hijack_netrw = true,
-- open the tree when running this setup function
open_on_setup = false,
-- will not open on setup if the filetype is in this list
ignore_ft_on_setup = {},
-- closes neovim automatically when the tree is the last **WINDOW** in the view
auto_close = false,
-- opens the tree when changing/opening a new tab if the tree wasn't previously opened
open_on_tab = false,
-- hijack the cursor in the tree to put it at the start of the filename
hijack_cursor = true,
-- updates the root directory of the tree on `DirChanged` (when your run `:cd` usually)
update_cwd = false,
-- show lsp diagnostics in the signcolumn
lsp_diagnostics = false,
-- update the focused file on `BufEnter`, un-collapses the folders recursively until it finds the file
update_focused_file = {
-- enables the feature
enable = false,
-- update the root directory of the tree to the one of the folder containing the file if the file is not under the current root directory
-- only relevant when `update_focused_file.enable` is true
update_cwd = false,
-- list of buffer names / filetypes that will not update the cwd if the file isn't found under the current root directory
-- only relevant when `update_focused_file.update_cwd` is true and `update_focused_file.enable` is true
ignore_list = {}
update_to_buf_dir = {enable = true, auto_open = true},
diagnostics = {
enable = true,
icons = {hint = "", info = "", warning = "", error = ""}
},
-- configuration options for the system open command (`s` in the tree by default)
system_open = {
-- the command to run this, leaving nil should work in most cases
cmd = nil,
-- the command arguments as a list
args = {}
},
update_focused_file = {enable = false, update_cwd = false, ignore_list = {}},
system_open = {cmd = nil, args = {}},
filters = {dotfiles = false, custom = {}},
view = {
-- width of the window, can be either a number (columns) or a string in `%`
width = 28,
-- side of the tree, can be one of 'left' | 'right' | 'top' | 'bottom'
width = 30,
height = 30,
hide_root_folder = false,
side = 'left',
-- if true the tree will resize itself after opening a file
auto_resize = false,
mappings = {
-- custom only false will merge the list with the default mappings
-- if true, it will only use your list to set the mappings
custom_only = false,
-- list of mappings to set on the tree manually
list = {}
}
mappings = {custom_only = false, list = {}}
}
}

View File

@ -1,4 +0,0 @@
require'shade'.setup({
overlay_opacity = 70,
keys = {toggle = '<Leader>s'}
})