refactor: Rename of most recent option

This commit is contained in:
hedy
2023-11-19 22:35:07 +08:00
parent 4bc6bfc0dd
commit ad6b15ee08
5 changed files with 10 additions and 11 deletions

View File

@@ -60,7 +60,7 @@ M.defaults = {
},
symbol_folding = {
autofold_depth = nil,
auto_unfold_nodes = {
auto_unfold = {
hovered = true,
---@type boolean|integer
only = true,
@@ -311,7 +311,7 @@ function M.resolve_config()
----- SYMBOLS FILTER -----
M.resolve_filter_config()
----- AUTO UNFOLD -----
local au = M.o.symbol_folding.auto_unfold_nodes
local au = M.o.symbol_folding.auto_unfold
if M.o.symbol_folding.auto_unfold_hover == nil then
if au.hovered ~= nil then
M.o.symbol_folding.auto_unfold_hover = au.hovered

View File

@@ -1,6 +1,5 @@
local Float = require('outline.float')
local cfg = require('outline.config')
local providers = require('outline.providers')
local utils = require('outline.utils')
local M = {}

View File

@@ -19,7 +19,7 @@ end
---@param node outline.SymbolNode|outline.FlatSymbolNode
function M.is_folded(node)
local hover = cfg.o.symbol_folding.auto_unfold_hover
local only = cfg.o.symbol_folding.auto_unfold_nodes.only
local only = cfg.o.symbol_folding.auto_unfold.only
if node.folded ~= nil then
return node.folded