
## Description
In `outline.nvim` we have `symbols.filter = LazyVim.config.kind_filter`.
`outline.nvim` adds an entry `exclude = false` by default when it's a
table. This entry propagates to `LazyVim.config.kind_filter` and when
using `LazyVim.config.get_kind_filter()` in Telescope `<leader>ss` that
entry is there as well and causes the error in
bfcc7d5c6f/lua/telescope/utils.lua (L143)
.
Use `vim.deepcopy` to create a new object for `symbols.filter` in
`outline.nvim`, so that the additional entries don't propagate to
default `LazyVim.config.kind_filter`.
<!-- Describe the big picture of your changes to communicate to the
maintainers
why we should accept this pull request. -->
## Related Issue(s)
Fixes #4003
<!--
If this PR fixes any issues, please link to the issue here.
- Fixes #<issue_number>
-->
## Screenshots
<!-- Add screenshots of the changes if applicable. -->
## Checklist
- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
62 lines
1.5 KiB
Lua
62 lines
1.5 KiB
Lua
return {
|
|
-- Disable `<leader>cs` keymap so it doesn't conflict with `outline.nvim`
|
|
{
|
|
"folke/trouble.nvim",
|
|
optional = true,
|
|
keys = {
|
|
{ "<leader>cs", false },
|
|
},
|
|
},
|
|
{
|
|
"hedyhli/outline.nvim",
|
|
keys = { { "<leader>cs", "<cmd>Outline<cr>", desc = "Toggle Outline" } },
|
|
cmd = "Outline",
|
|
opts = function()
|
|
local defaults = require("outline.config").defaults
|
|
local opts = {
|
|
symbols = {
|
|
icons = {},
|
|
filter = vim.deepcopy(LazyVim.config.kind_filter),
|
|
},
|
|
keymaps = {
|
|
up_and_jump = "<up>",
|
|
down_and_jump = "<down>",
|
|
},
|
|
}
|
|
|
|
for kind, symbol in pairs(defaults.symbols.icons) do
|
|
opts.symbols.icons[kind] = {
|
|
icon = LazyVim.config.icons.kinds[kind] or symbol.icon,
|
|
hl = symbol.hl,
|
|
}
|
|
end
|
|
return opts
|
|
end,
|
|
},
|
|
|
|
-- edgy integration
|
|
{
|
|
"folke/edgy.nvim",
|
|
optional = true,
|
|
opts = function(_, opts)
|
|
local edgy_idx = LazyVim.plugin.extra_idx("ui.edgy")
|
|
local symbols_idx = LazyVim.plugin.extra_idx("editor.outline")
|
|
|
|
if edgy_idx and edgy_idx > symbols_idx then
|
|
LazyVim.warn(
|
|
"The `edgy.nvim` extra must be **imported** before the `outline.nvim` extra to work properly.",
|
|
{ title = "LazyVim" }
|
|
)
|
|
end
|
|
|
|
opts.right = opts.right or {}
|
|
table.insert(opts.right, {
|
|
title = "Outline",
|
|
ft = "Outline",
|
|
pinned = true,
|
|
open = "Outline",
|
|
})
|
|
end,
|
|
},
|
|
}
|