1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-24 06:10:05 +08:00
SpaceVim/bundle/trouble.nvim/lua/trouble/folds.lua

25 lines
430 B
Lua
Raw Normal View History

2023-07-01 20:30:44 +08:00
local config = require("trouble.config")
local M = {}
M.folded = {}
function M.is_folded(filename)
local fold = M.folded[filename]
return (fold == nil and config.options.auto_fold == true) or (fold == true)
end
function M.toggle(filename)
M.folded[filename] = not M.is_folded(filename)
end
function M.close(filename)
M.folded[filename] = true
end
function M.open(filename)
M.folded[filename] = false
end
return M