[nvim] Add some shortcuts and Aerial plugin
This commit is contained in:
parent
09c2619797
commit
67130a28e3
1 changed files with 29 additions and 12 deletions
|
@ -21,9 +21,10 @@ options = { noremap = true }
|
||||||
map('n', '<Leader>ff', ':Telescope find_files<Enter>', options)
|
map('n', '<Leader>ff', ':Telescope find_files<Enter>', options)
|
||||||
map('n', '<Leader>fg', ':Telescope git_files<Enter>', options)
|
map('n', '<Leader>fg', ':Telescope git_files<Enter>', options)
|
||||||
map('n', '<Leader>fc', ':Telescope git_commits<Enter>', options)
|
map('n', '<Leader>fc', ':Telescope git_commits<Enter>', options)
|
||||||
|
map('n', '<Leader>fC', ':Telescope git_bcommits<Enter>', options)
|
||||||
map('n', '<Leader>fl', ':Telescope live_grep<Enter>', options)
|
map('n', '<Leader>fl', ':Telescope live_grep<Enter>', options)
|
||||||
|
map('n', '<Leader>fh', ':Telescope help_tags<Enter>', options)
|
||||||
map('n', '<Leader><Space>', ':Telescope buffers<Enter>', options)
|
map('n', '<Leader><Space>', ':Telescope buffers<Enter>', options)
|
||||||
map('n', '<Leader>t', ':TagbarToggle<Enter>', options)
|
|
||||||
map('n', '<Leader>nv', ':Telescope find_files cwd=~/.config/nvim<Enter>', options)
|
map('n', '<Leader>nv', ':Telescope find_files cwd=~/.config/nvim<Enter>', options)
|
||||||
map('n', '<Leader>nc', ':Telescope find_files cwd=~/.config<Enter>', options)
|
map('n', '<Leader>nc', ':Telescope find_files cwd=~/.config<Enter>', options)
|
||||||
|
|
||||||
|
@ -32,6 +33,8 @@ map('n', '<Leader>gr', ':Telescope lsp_references<Enter>', options)
|
||||||
map('n', '<Leader>gs', ':Telescope lsp_workspace_symbols<Enter>', options)
|
map('n', '<Leader>gs', ':Telescope lsp_workspace_symbols<Enter>', options)
|
||||||
map('n', '<Leader>gS', ':Telescope lsp_dynamic_workspace_symbols<Enter>', options)
|
map('n', '<Leader>gS', ':Telescope lsp_dynamic_workspace_symbols<Enter>', options)
|
||||||
|
|
||||||
|
map('n', '<Leader>h', ':nohlsearch<Enter>', options)
|
||||||
|
|
||||||
--------------------------------------------------
|
--------------------------------------------------
|
||||||
-- Telescope
|
-- Telescope
|
||||||
--------------------------------------------------
|
--------------------------------------------------
|
||||||
|
@ -110,3 +113,17 @@ cmp.setup({
|
||||||
},
|
},
|
||||||
mapping = cmp.mapping.preset.insert({}),
|
mapping = cmp.mapping.preset.insert({}),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
--------------------------------------------------
|
||||||
|
-- Aerial
|
||||||
|
--------------------------------------------------
|
||||||
|
require("aerial").setup({
|
||||||
|
-- optionally use on_attach to set keymaps when aerial has attached to a buffer
|
||||||
|
on_attach = function(bufnr)
|
||||||
|
-- Jump forwards/backwards with '{' and '}'
|
||||||
|
--vim.keymap.set("n", "{", "<cmd>AerialPrev<CR>", { buffer = bufnr })
|
||||||
|
--vim.keymap.set("n", "}", "<cmd>AerialNext<CR>", { buffer = bufnr })
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
-- You probably also want to set a keymap to toggle aerial
|
||||||
|
vim.keymap.set("n", "<leader>a", "<cmd>Telescope aerial<CR>")
|
||||||
|
|
Loading…
Reference in a new issue