refactor(#2826): singleton View class, WIP
This commit is contained in:
parent
fa64574f16
commit
3c024975fd
@ -10,6 +10,12 @@ local Class = require("nvim-tree.classic")
|
|||||||
---@field resize boolean|nil default true
|
---@field resize boolean|nil default true
|
||||||
---@field winid number|nil 0 or nil for current
|
---@field winid number|nil 0 or nil for current
|
||||||
|
|
||||||
|
local M = {}
|
||||||
|
|
||||||
|
local DEFAULT_MIN_WIDTH = 30
|
||||||
|
local DEFAULT_MAX_WIDTH = -1
|
||||||
|
local DEFAULT_PADDING = 1
|
||||||
|
|
||||||
--TODO attempt to type the tables, at least the options ones
|
--TODO attempt to type the tables, at least the options ones
|
||||||
|
|
||||||
---@class (exact) View: Class
|
---@class (exact) View: Class
|
||||||
@ -100,12 +106,6 @@ function View:new(args)
|
|||||||
self.initial_width = self:get_width()
|
self.initial_width = self:get_width()
|
||||||
end
|
end
|
||||||
|
|
||||||
local M = {}
|
|
||||||
|
|
||||||
local DEFAULT_MIN_WIDTH = 30
|
|
||||||
local DEFAULT_MAX_WIDTH = -1
|
|
||||||
local DEFAULT_PADDING = 1
|
|
||||||
|
|
||||||
-- The initial state of a tab
|
-- The initial state of a tab
|
||||||
local tabinitial = {
|
local tabinitial = {
|
||||||
-- The position of the cursor { line, column }
|
-- The position of the cursor { line, column }
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user