diff --git a/.understand-anything/.understandignore b/.understand-anything/.understandignore deleted file mode 100644 index 92a06fc..0000000 --- a/.understand-anything/.understandignore +++ /dev/null @@ -1,46 +0,0 @@ -# .understandignore — patterns for files/dirs to exclude from analysis -# Syntax: same as .gitignore (globs, # comments, ! negation, trailing / for dirs) -# Lines below are suggestions — uncomment to activate. -# Use ! prefix to force-include something excluded by defaults. -# -# Built-in defaults (always excluded unless negated): -# node_modules/, .git/, dist/, build/, obj/, *.lock, *.min.js, etc. -# - -# --- From .gitignore (uncomment to exclude) --- - -/.omc -/.omc/state - -# Generated plugin lockfile — pinned versions only, no architecture signal -lazy-lock.json - -# --- Test file patterns (uncomment to exclude) --- - -# JS / TS -# *.test.* -# *.spec.* -# *.snap -# C# / .NET -# **/*Tests.cs -# **/*Test.cs -# **/*Fixture.cs -# **/*.Tests.csproj -# Java / Kotlin -# **/src/test/** -# **/*Test.java -# **/*IT.java -# **/*Spec.kt -# Go -# **/*_test.go -# C++ -# **/*_test.cc -# **/*_test.cpp -# **/*_test.cxx -# **/*Test.cc -# **/*Test.cpp -# **/*_unittest.cc -# **/*_unittest.cpp -# **/*_browsertest.cc -# **/*_benchmark.cc -# **/*Benchmark.cpp diff --git a/.understand-anything/config.json b/.understand-anything/config.json deleted file mode 100644 index 1e862e0..0000000 --- a/.understand-anything/config.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "outputLanguage": "en" -} diff --git a/lua/config/session.lua b/lua/config/session.lua index 9db2dd0..712f7f1 100644 --- a/lua/config/session.lua +++ b/lua/config/session.lua @@ -73,20 +73,21 @@ local function pick_files() end end ---- VimEnter entry point: restore this worktree/branch session, or fall back to ---- the file picker when none has been saved yet. +--- VimEnter entry point: show neo-tree, then restore this worktree/branch +--- session, or fall back to the file picker when none has been saved yet. --- --- Exception: when nvim was started with file arguments (`nvim foo.lua`, a --- directory, or `-`) the requested buffer is what the user asked for, so ---- neither the session nor the picker may take the screen. +--- neither the tree, the session nor the picker may take the screen. function M.restore() if vim.fn.argc(-1) > 0 then return end - if M.exists(M.name()) then - M.load { silence_errors = true } - else - -- defer so the picker opens after startup finished drawing the UI - vim.schedule(pick_files) - end + local restored = M.exists(M.name()) + if restored then M.load { silence_errors = true } end + -- defer so the tree and picker open after startup finished drawing the UI + vim.schedule(function() + vim.cmd "Neotree show" -- no focus: the restored buffer / picker keeps it + if not restored then pick_files() end + end) end return M