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

@ -43,7 +43,7 @@ return require('packer').startup(function(use)
-- tree sitter -- tree sitter
use { use {
'nvim-treesitter/nvim-treesitter', 'nvim-treesitter/nvim-treesitter',
event = "VimEnter", event = "VimEnter",
config = function() require "plugins.treesitter" end, config = function() require "plugins.treesitter" end,
run = ':TSUpdate' run = ':TSUpdate'
} }
@ -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"},
@ -147,8 +143,8 @@ return require('packer').startup(function(use)
} }
use { use {
'p00f/nvim-ts-rainbow', 'p00f/nvim-ts-rainbow',
after = "nvim-treesitter", after = "nvim-treesitter",
config = function() require "plugins.nvim-ts-rainbow" end config = function() require "plugins.nvim-ts-rainbow" end
} }
use { use {
'winston0410/range-highlight.nvim', 'winston0410/range-highlight.nvim',

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 = true,
-- hijack netrw window on startup open_on_setup = false,
hijack_netrw = true, ignore_ft_on_setup = {},
-- open the tree when running this setup function auto_close = false,
open_on_setup = false, open_on_tab = false,
-- will not open on setup if the filetype is in this list hijack_cursor = true,
ignore_ft_on_setup = {}, update_cwd = false,
-- closes neovim automatically when the tree is the last **WINDOW** in the view update_to_buf_dir = {enable = true, auto_open = true},
auto_close = false, diagnostics = {
-- opens the tree when changing/opening a new tab if the tree wasn't previously opened enable = true,
open_on_tab = false, icons = {hint = "", info = "", warning = "", error = ""}
-- hijack the cursor in the tree to put it at the start of the filename },
hijack_cursor = true, update_focused_file = {enable = false, update_cwd = false, ignore_list = {}},
-- updates the root directory of the tree on `DirChanged` (when your run `:cd` usually) system_open = {cmd = nil, args = {}},
update_cwd = false, filters = {dotfiles = false, custom = {}},
-- show lsp diagnostics in the signcolumn view = {
lsp_diagnostics = false, width = 30,
-- update the focused file on `BufEnter`, un-collapses the folders recursively until it finds the file height = 30,
update_focused_file = { hide_root_folder = false,
-- enables the feature side = 'left',
enable = false, auto_resize = 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 mappings = {custom_only = false, list = {}}
-- 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)
system_open = {
-- the command to run this, leaving nil should work in most cases
cmd = nil,
-- the command arguments as a list
args = {}
},
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'
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 = {}
} }
}
} }

View File

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