From f31f60061d69f2df1a536ab0252148c7d19e0a35 Mon Sep 17 00:00:00 2001 From: gered Date: Tue, 3 Sep 2024 18:50:49 -0400 Subject: [PATCH] add outline --- lazy-lock.json | 1 + lua/plugins/outline.lua | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 lua/plugins/outline.lua diff --git a/lazy-lock.json b/lazy-lock.json index 0f7b0bb..4cce4a7 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -31,6 +31,7 @@ "nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" }, "nvim-treesitter": { "branch": "master", "commit": "749df308870381979dc098063973f6ace9968ef6" }, "nvim-web-devicons": { "branch": "master", "commit": "3722e3d1fb5fe1896a104eb489e8f8651260b520" }, + "outline.nvim": { "branch": "main", "commit": "e2fc8d8e10205a65f13581504674f4d305c1abe8" }, "plenary.nvim": { "branch": "master", "commit": "ec289423a1693aeae6cd0d503bac2856af74edaa" }, "rustaceanvim": { "branch": "master", "commit": "d3a8b145f0b3db4de9a08fcbc604659f52ee4fbc" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" }, diff --git a/lua/plugins/outline.lua b/lua/plugins/outline.lua new file mode 100644 index 0000000..274a5b6 --- /dev/null +++ b/lua/plugins/outline.lua @@ -0,0 +1,18 @@ +return { + { + 'hedyhli/outline.nvim', + lazy = false, -- TODO: figure out why keymappings break when `lazy = true` and using `opts` and `keys` instead of `config` function ... + cmd = { 'Outline' }, + config = function() + require('outline').setup { + outline_window = { + auto_jump = false, + focus_on_open = false, + }, + } + + vim.keymap.set('n', 'to', 'Outline', { desc = 'Toggle [O]utline' }) + vim.keymap.set('n', '', 'Outline', { desc = 'Toggle Outline', noremap = true }) + end, + }, +}