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 -- lsp stuff
vim.api.nvim_buf_set_keymap(0, 'n', 'K', '<cmd>lua vim.lsp.buf.hover()<CR>', vim.api.nvim_buf_set_keymap(0, 'n', 'K', '<cmd>lua vim.lsp.buf.hover()<CR>',
{noremap = true}) {noremap = true})
-- toggle tagbar
vim.api.nvim_set_keymap('', '<leader>tt', ':TagbarToggle<cr>', {silent = true})
-- toggle NvimTree -- toggle NvimTree
vim.api.nvim_set_keymap('', '<C-n>', ':NvimTreeToggle<cr>', {silent = true}) vim.api.nvim_set_keymap('', '<C-n>', ':NvimTreeToggle<cr>', {silent = true})
-- toggle formatter -- toggle formatter
vim.api.nvim_set_keymap('', '<leader>fm', ':Neoformat<cr>', {silent = true}) vim.api.nvim_set_keymap('', '<leader>fm', ':Neoformat<cr>', {silent = true})
-- toggle comment
vim.api.nvim_set_keymap('', '<leader>/', ':CommentToggle<cr>', {silent = true}) 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>b', ':HopWordBC<cr>', {silent = true})
vim.api.nvim_set_keymap('', '<leader>w', ':HopWordAC<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>tf', ':Telescope fd<cr>', {silent = true})
vim.api.nvim_set_keymap('', '<leader>tb', ':Telescope buffers<cr>', vim.api.nvim_set_keymap('', '<leader>tb', ':Telescope buffers<cr>',
{silent = true}) {silent = true})
@ -46,7 +51,3 @@ vim.api.nvim_set_keymap('', '<leader>tdd',
vim.api.nvim_set_keymap('', '<leader>tdw', vim.api.nvim_set_keymap('', '<leader>tdw',
':Telescope lsp_workspace_diagnostics<cr>', ':Telescope lsp_workspace_diagnostics<cr>',
{silent = true}) {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', after = 'coq_nvim',
config = function() config = function()
require("coq_3p") { require("coq_3p") {
{src = "nvimlua", short_name = "nLUA"}, {src = "repl"}, {src = "nvimlua", short_name = "nLUA"}, {src = "repl"}
} }
end end
@ -120,6 +120,7 @@ return require('packer').startup(function(use)
requires = {{'nvim-lua/plenary.nvim'}}, requires = {{'nvim-lua/plenary.nvim'}},
cmd = 'Telescope' cmd = 'Telescope'
} }
use {'preservim/tagbar', cmd = 'TagbarToggle'}
use { use {
'phaazon/hop.nvim', 'phaazon/hop.nvim',
event = "VimEnter", event = "VimEnter",
@ -130,11 +131,6 @@ return require('packer').startup(function(use)
} }
-- eye-candy -- eye-candy
use {
'sunjon/shade.nvim',
event = "VimEnter",
config = function() require "plugins.shade" end
}
use { use {
"lukas-reineke/indent-blankline.nvim", "lukas-reineke/indent-blankline.nvim",
after = {"nvim-treesitter", "nvim-base16"}, after = {"nvim-treesitter", "nvim-base16"},

View File

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

View File

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