From 8b2f535a2e6926bfac8510087d2946c3cb6f69c5 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Tue, 31 Jan 2023 09:06:01 +0000 Subject: [PATCH] Simplify aerial config and update keymaps --- .../nvim/lua/config_plugins/config_aerial.lua | 19 +------------------ .../lua/config_plugins/config_telescope.lua | 8 ++++++++ config/nvim/lua/keymaps.lua | 6 +++--- 3 files changed, 12 insertions(+), 21 deletions(-) diff --git a/config/nvim/lua/config_plugins/config_aerial.lua b/config/nvim/lua/config_plugins/config_aerial.lua index cc8ccc59..3d38e9f9 100644 --- a/config/nvim/lua/config_plugins/config_aerial.lua +++ b/config/nvim/lua/config_plugins/config_aerial.lua @@ -1,27 +1,10 @@ local aerial = require('aerial') aerial.setup { - backends = { - ["_"] = { "lsp", "treesitter", "markdown", "man" }, - python = { "treesitter" }, - }, layout = { - default_direction = "right", placement = "edge", }, attach_mode = "global", highlight_mode = "none", - lazy_load = false, - on_attach = function(bufnr) - -- Toggle the aerial window with a - vim.api.nvim_buf_set_keymap(bufnr, 'n', 'a', 'AerialToggle!', {}) - -- Jump forwards/backwards with '{' and '}' - vim.api.nvim_buf_set_keymap(bufnr, 'n', '{', 'AerialPrev', {}) - vim.api.nvim_buf_set_keymap(bufnr, 'n', '}', 'AerialNext', {}) - -- Jump up the tree with '[[' or ']]' - vim.api.nvim_buf_set_keymap(bufnr, 'n', '[[', 'AerialPrevUp', {}) - vim.api.nvim_buf_set_keymap(bufnr, 'n', ']]', 'AerialNextUp', {}) - end, - open_automatic = false, - close_automatic_events = { "unsupported" }, + manage_folds = true, show_guides = true, } diff --git a/config/nvim/lua/config_plugins/config_telescope.lua b/config/nvim/lua/config_plugins/config_telescope.lua index 4d24b8ad..65827773 100644 --- a/config/nvim/lua/config_plugins/config_telescope.lua +++ b/config/nvim/lua/config_plugins/config_telescope.lua @@ -10,6 +10,14 @@ require('telescope').setup { case_mode = "smart_case", -- or "ignore_case" or "respect_case" -- the default case_mode is "smart_case" }, + aerial = { + show_nesting = { + ["_"] = false, + python = true, + json = true, + yaml = true, + }, + }, }, defaults = { mappings = { diff --git a/config/nvim/lua/keymaps.lua b/config/nvim/lua/keymaps.lua index bd914148..2fb5ec42 100644 --- a/config/nvim/lua/keymaps.lua +++ b/config/nvim/lua/keymaps.lua @@ -14,15 +14,16 @@ vim.g.mapleader = ' ' -- Misc imap('jk', '') nmap('hq', 'Gitsigns setqflist all') +nmap('aa', 'AerialToggle') -- Telescope nmap(';', 'Telescope builtin') nmap('ff', 'Telescope find_files') nmap('fp', 'Telescope projects') nmap('fa', 'Telescope aerial') -nmap('fd', 'Telescope lsp_document_symbols') +nmap('fl', 'Telescope lsp_document_symbols') nmap('fe', 'Telescope diagnostics') -nmap('ft', 'Telescope treesitter') +nmap('fs', 'Telescope treesitter') nmap('fz', 'Telescope current_buffer_fuzzy_find') -- Hop @@ -31,7 +32,6 @@ nmap('hw', 'HopWord') -- Nvim-tree nmap('n', 'NvimTreeToggle') -nmap('s', 'SidebarNvimToggle') -- Trouble nmap('xx', 'TroubleToggle')