Skip to content

refactor(#2826): multi instance view #3109

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 27 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
fa64574
refactor(#2826): singleton View class, WIP
alex-courtis Apr 20, 2025
3c02497
refactor(#2826): singleton View class, WIP
alex-courtis Apr 20, 2025
a3fe0c9
refactor(#2826): singleton View class, WIP
alex-courtis Apr 20, 2025
9d3d0d2
refactor(#2826): singleton View class, WIP
alex-courtis Apr 20, 2025
b95b873
refactor(#2826): singleton View class, WIP
alex-courtis Apr 20, 2025
0a04e43
refactor(#2826): singleton View class, WIP
alex-courtis Apr 20, 2025
f098195
refactor(#2826): singleton View class, WIP
alex-courtis Apr 20, 2025
f309ca2
refactor(#2826): singleton View class
alex-courtis Apr 20, 2025
0eb21f6
Merge remote-tracking branch 'origin/master' into 2826-multi-instance…
alex-courtis Apr 20, 2025
44cb3d2
refactor(#2826): View is an Explorer member
alex-courtis Apr 21, 2025
3a82885
refactor(#2826): move autocmds to Explorer
alex-courtis Apr 21, 2025
9594528
refactor(#2826): API uses Explorer's View
alex-courtis Apr 21, 2025
b5e7406
Merge branch 'master' into 2826-multi-instance-view-amc
alex-courtis Apr 21, 2025
21d532f
refactor(#2826): move View into Explorer package
alex-courtis Apr 21, 2025
6218f9c
Merge branch 'master' into 2826-multi-instance-view-amc
alex-courtis May 2, 2025
e075988
refactor(#2826): retain necessary view globals
alex-courtis May 2, 2025
76186fa
Merge remote-tracking branch 'origin/master' into 2826-multi-instance…
alex-courtis Jun 16, 2025
5377a3f
refactor(#2826): move all winhl to appearance constants
alex-courtis Jun 16, 2025
fc81249
refactor(#2826): rename View to Window
alex-courtis Jun 16, 2025
5443944
refactor(#2826): add lifecycle logging to all Explorer members
alex-courtis Jun 16, 2025
8b9c9c1
refactor(#2826): split global View and instance Window
alex-courtis Jun 16, 2025
d24f959
refactor(#2826): remove unnecessary view setup and members
alex-courtis Jun 16, 2025
c7779d9
refactor(#2826): better enumerate_options function
alex-courtis Jun 17, 2025
0d975b4
refactor(#2826): add View.tab_line for debugging
alex-courtis Jun 17, 2025
1fe6ed8
refactor(#2826): add lib.target_win_id to tabline
alex-courtis Jun 17, 2025
b1a5cb5
Merge remote-tracking branch 'origin/master' into 2826-multi-instance…
alex-courtis Jun 17, 2025
9962193
refactor(#2826): default lifecycle log off
alex-courtis Jun 17, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
refactor(#2826): singleton View class, WIP
  • Loading branch information
alex-courtis committed Apr 20, 2025
commit 3c024975fd27eaf23ef60ff8deb578e686bc8f7f
12 changes: 6 additions & 6 deletions lua/nvim-tree/view.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ local Class = require("nvim-tree.classic")
---@field resize boolean|nil default true
---@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

---@class (exact) View: Class
Expand Down Expand Up @@ -100,12 +106,6 @@ function View:new(args)
self.initial_width = self:get_width()
end

local M = {}

local DEFAULT_MIN_WIDTH = 30
local DEFAULT_MAX_WIDTH = -1
local DEFAULT_PADDING = 1

-- The initial state of a tab
local tabinitial = {
-- The position of the cursor { line, column }
Expand Down