nvim: Track plugins/outline.lua

This commit is contained in:
hedy 2023-11-13 22:26:03 +08:00
parent c7be2982c1
commit b1e62e12c4
Signed by: hedy
GPG Key ID: B51B5A8D1B176372
2 changed files with 27 additions and 7 deletions

View File

@ -121,20 +121,16 @@ return {
}
},
},
{ dir = "~/projects/outline.nvim", -- See github.com/hedyhli/outline.nvim
{ dir = "~/projects/outline.nvim", -- See https://github.com/hedyhli/outline.nvim
-- Switched to this from tagbar because it does not require exctags, and it
-- lists the items in order as defined in source code.
enabled = vim.fn.has("nvim-0.7") == 1,
cmd = { "Outline", "OutlineOpen" },
keys = {
{ "<leader>tt", "<cmd>Outline<CR>", desc = "Toggle outline window" },
{ "<leader>tT", "<cmd>OutlineFollow<CR>", desc = "Focus & follow outline window" },
{ "<leader>tT", "<cmd>Outline!<CR>", desc = "Toggle outline window without focus" },
{ "<leader>tf", "<cmd>OutlineFollow<CR>", desc = "Focus & follow outline window" },
},
-- Unfortunately my plugins/outline.lua is not tracked in dotfiles, because
-- it is under active development and I tend to change the config quite
-- often. If you're looking for config options, you should definitely check
-- the readme and also see the sections for recipes, tips. My custom config
-- for this is not far off from the defaults.
config = function() require "plugins/outline" end,
},
-- "bling/vim-bufferline", -- I prefer this over taking over the tabline space thanks

View File

@ -0,0 +1,24 @@
require('outline').setup {
preview_window = {
border = 'rounded',
open_hover_on_preview = false,
},
symbol_folding = {
autofold_depth = 1,
auto_unfold_hover = true,
},
guides = {
enabled = true,
},
outline_window = {
show_cursorline = true,
hide_cursor = true,
winhl = "OutlineDetails:LineNr,OutlineLineno:LineNr,OutlineGuides:Comment",
},
keymaps = {
close = "q",
},
symbols = {
icon_source = "lspkind",
},
}