Skip to content

Commit

Permalink
fix(view): ensure fold settings are correct for the trouble views. See
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Jun 3, 2024
1 parent 29d1bb8 commit b5181b6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lua/trouble/view/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function M.new(opts)
self._filters = {}
self.first_render = Promise.new(function() end)
self.first_update = Promise.new(function() end)
self.opts.win = self.opts.win or {}
self.opts.win = vim.tbl_deep_extend("force", self.opts.win or {}, Window.FOLDS)
self.opts.win.on_mount = function()
self:on_mount()
end
Expand Down
7 changes: 7 additions & 0 deletions lua/trouble/view/window.lua
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,13 @@ local defaults = {
},
}

M.FOLDS = {
foldcolumn = "0",
foldenable = false,
foldlevel = 99,
foldmethod = "manual",
}

---@type trouble.Window.opts
local minimal = {
wo = {
Expand Down

0 comments on commit b5181b6

Please sign in to comment.