MAJOR: Refactor configuration structure

The details of the change is documented in the readme.

If your config stops working, I'm fully responsible :)
This commit is contained in:
hedy
2023-11-08 13:56:09 +08:00
parent 04f9d4ad26
commit 29ed132f07
11 changed files with 388 additions and 277 deletions

View File

@@ -1,12 +1,12 @@
local M = {}
local config = require 'symbols-outline.config'
local cfg = require 'symbols-outline.config'
M.is_foldable = function(node)
return node.children and #node.children > 0
end
local get_default_folded = function(depth)
local fold_past = config.options.autofold_depth
local fold_past = cfg.o.symbol_folding.autofold_depth
if not fold_past then
return false
else
@@ -17,7 +17,7 @@ end
M.is_folded = function(node)
if node.folded ~= nil then
return node.folded
elseif node.hovered and config.options.auto_unfold_hover then
elseif node.hovered and cfg.o.symbol_folding.auto_unfold_hover then
return false
else
return get_default_folded(node.depth)