From 9eda4906e9166bdffc5034424f38a7f4ac667536 Mon Sep 17 00:00:00 2001 From: Aaron Walker Date: Thu, 12 Mar 2026 23:15:21 -0400 Subject: [PATCH 1/2] [improvements]: ai use and testing --- .config/nvim/lua/debug-neotest-signs.lua | 82 +++++ .config/nvim/lua/plugins/appearance/alpha.lua | 10 +- .../lua/plugins/appearance/colorscheme.lua | 3 +- .../nvim/lua/plugins/appearance/lualine.lua | 28 ++ .../nvim/lua/plugins/appearance/status.lua | 21 +- .config/nvim/lua/plugins/code/ai.lua | 46 ++- .config/nvim/lua/plugins/code/conjure.lua | 3 + .config/nvim/lua/plugins/code/diagnostics.lua | 2 +- .config/nvim/lua/plugins/code/testing.lua | 291 ++++++++++++------ .config/nvim/lua/plugins/editor/init.lua | 5 +- .config/nvim/lua/plugins/editor/snacks.lua | 105 +++++++ .../nvim/lua/plugins/editor/treesitter.lua | 1 + .config/nvim/lua/statuscol.lua | 48 +-- 13 files changed, 512 insertions(+), 133 deletions(-) create mode 100644 .config/nvim/lua/debug-neotest-signs.lua create mode 100644 .config/nvim/lua/plugins/editor/snacks.lua diff --git a/.config/nvim/lua/debug-neotest-signs.lua b/.config/nvim/lua/debug-neotest-signs.lua new file mode 100644 index 0000000..979a2a8 --- /dev/null +++ b/.config/nvim/lua/debug-neotest-signs.lua @@ -0,0 +1,82 @@ +-- Neotest Signs Diagnostic Script +-- Run this with :luafile ~/.config/nvim/lua/debug-neotest-signs.lua + +local M = {} + +function M.check_sign_definitions() + print("\n=== Neotest Sign Definitions ===") + local signs = { "neotest_passed", "neotest_failed", "neotest_running", "neotest_skipped" } + for _, sign_name in ipairs(signs) do + local sign_def = vim.fn.sign_getdefined(sign_name) + if sign_def and #sign_def > 0 then + print(string.format("✓ %s: text='%s', texthl='%s'", sign_name, sign_def[1].text or "", sign_def[1].texthl or "")) + else + print(string.format("✗ %s: NOT DEFINED", sign_name)) + end + end +end + +function M.check_signs_in_buffer() + print("\n=== Signs in Current Buffer ===") + local bufnr = vim.api.nvim_get_current_buf() + local signs = vim.fn.sign_getplaced(bufnr, { group = "*" }) + + if signs and #signs > 0 and signs[1].signs then + for _, sign in ipairs(signs[1].signs) do + print(string.format("Line %d: %s (priority: %s)", sign.lnum, sign.name, sign.priority or "default")) + end + else + print("No signs found in current buffer") + end +end + +function M.check_neotest_status() + print("\n=== Neotest Status Configuration ===") + local ok, neotest = pcall(require, "neotest") + if not ok then + print("✗ Neotest not loaded") + return + end + + local config = require("neotest.config") + print(string.format("Status signs enabled: %s", config.status.signs)) + print(string.format("Status virtual_text enabled: %s", config.status.virtual_text)) + print("\nConfigured icons:") + print(string.format(" passed: '%s'", config.icons.passed)) + print(string.format(" failed: '%s'", config.icons.failed)) + print(string.format(" running: '%s'", config.icons.running)) + print(string.format(" skipped: '%s'", config.icons.skipped)) +end + +function M.check_highlight_groups() + print("\n=== Neotest Highlight Groups ===") + local groups = { "NeotestPassed", "NeotestFailed", "NeotestRunning", "NeotestSkipped" } + for _, group in ipairs(groups) do + local hl = vim.api.nvim_get_hl(0, { name = group, link = false }) + if next(hl) then + print(string.format("✓ %s: defined", group)) + else + print(string.format("✗ %s: NOT DEFINED", group)) + end + end +end + +function M.check_signcolumn() + print("\n=== Sign Column Configuration ===") + print(string.format("signcolumn: %s", vim.wo.signcolumn)) + print(string.format("statuscolumn: %s", vim.o.statuscolumn)) +end + +function M.run_all() + M.check_signcolumn() + M.check_sign_definitions() + M.check_highlight_groups() + M.check_neotest_status() + M.check_signs_in_buffer() + print("\n=== Diagnostic Complete ===\n") +end + +-- Auto-run if called directly +M.run_all() + +return M diff --git a/.config/nvim/lua/plugins/appearance/alpha.lua b/.config/nvim/lua/plugins/appearance/alpha.lua index 0f7e9bb..8fc22fb 100644 --- a/.config/nvim/lua/plugins/appearance/alpha.lua +++ b/.config/nvim/lua/plugins/appearance/alpha.lua @@ -61,9 +61,11 @@ local M = { "⠀⠀⠀⠀⠀⠈⠻⠿⠿⠓⠄⠤⠘⠉⠙⠤⢀⠾⠿⣿⠟⠋ ", } dashboard.section.buttons.val = { - button(ctrl .. " f", "󰍉 Find files", ctrl, "Telescope find_files"), - button(ldr .. " f", "󱎸 Live grep", ldr, "Telescope live_grep_args"), - button(ldr .. " g b", " Git branches", ldr, " Telescope git_branches"), + button(ctrl .. " f", "󰍉 Find files", ctrl, "Seeker find_files"), + button(ldr .. " f", "󱎸 Live grep", ldr, "Seeker grep"), + button(ldr .. " g b", " Git branches", ldr, function() + Snacks.picker.git_branches() + end), button(ldr .. " d b", " Database connections", ldr, "e ~/.local/share/db_ui/connections.json"), button(ldr .. " q", "󰗼 Quit", ldr, "qa"), button("e", " New file", ldr, "ene"), @@ -107,7 +109,7 @@ local M = { desc = "enable tabline after alpha", callback = function() vim.opt.showtabline = 2 - -- vim.opt.statuscolumn = [[%!v:lua.Status.statuscolumn()]] + vim.opt.statuscolumn = [[%!v:lua.Status.statuscolumn()]] end, }) alpha.setup(dashboard.opts) diff --git a/.config/nvim/lua/plugins/appearance/colorscheme.lua b/.config/nvim/lua/plugins/appearance/colorscheme.lua index 0644ccc..8d4c537 100644 --- a/.config/nvim/lua/plugins/appearance/colorscheme.lua +++ b/.config/nvim/lua/plugins/appearance/colorscheme.lua @@ -15,7 +15,8 @@ local M = { ["gitsigns.nvim"] = true, ["lazy.nvim"] = true, ["noice.nvim"] = true, - ["telescope.nvim"] = true, + -- ["telescope.nvim"] = true, + ["snacks.nvim"] = true, ["hop.nvim"] = true, ["bufferline.nvim"] = true, }, diff --git a/.config/nvim/lua/plugins/appearance/lualine.lua b/.config/nvim/lua/plugins/appearance/lualine.lua index 277e741..9d47876 100644 --- a/.config/nvim/lua/plugins/appearance/lualine.lua +++ b/.config/nvim/lua/plugins/appearance/lualine.lua @@ -188,6 +188,34 @@ local M = { color = { fg = "#ffffff", gui = "bold" }, }) -- Add components to right sections + ins_right(require("codecompanion._extensions.spinner.styles.lualine").get_lualine_component()) + + -- CodeCompanion token count + ins_right({ + function() + local bufnr = vim.api.nvim_get_current_buf() + if vim.bo[bufnr].filetype ~= "codecompanion" then + return "" + end + + if not _G.codecompanion_chat_metadata then + return "" + end + + local metadata = _G.codecompanion_chat_metadata[bufnr] + if not metadata then + return "" + end + + if metadata.tokens and metadata.tokens > 0 then + return " " .. metadata.tokens + end + + return "" + end, + color = { fg = colors.cyan, gui = "bold" }, + }) + ins_right({ "o:encoding", -- option component same as &encoding in viml fmt = string.upper, -- I'm not sure why it's upper case either ;) diff --git a/.config/nvim/lua/plugins/appearance/status.lua b/.config/nvim/lua/plugins/appearance/status.lua index 5044d6f..4f46f0f 100644 --- a/.config/nvim/lua/plugins/appearance/status.lua +++ b/.config/nvim/lua/plugins/appearance/status.lua @@ -1,3 +1,22 @@ -local M = {} +local M = { + { + "statuscol", + name = "statuscol", + dir = vim.fn.stdpath("config") .. "/lua", + lazy = false, + priority = 1000, + config = function() + -- Enable sign column + vim.opt.signcolumn = "yes" + + -- Set up the custom statuscolumn + vim.opt.statuscolumn = [[%!v:lua.Status.statuscolumn()]] + + -- Enable folding with treesitter + vim.opt.foldexpr = "v:lua.Status.foldexpr()" + vim.opt.foldtext = "" + end, + }, +} return M diff --git a/.config/nvim/lua/plugins/code/ai.lua b/.config/nvim/lua/plugins/code/ai.lua index 77a19c0..66d105b 100644 --- a/.config/nvim/lua/plugins/code/ai.lua +++ b/.config/nvim/lua/plugins/code/ai.lua @@ -8,7 +8,9 @@ local M = { -- Installs `mcp-hub` node binary globally. build = "npm install -g mcp-hub@4.2.0", config = function() - require("mcphub").setup() + local mcphub = require("mcphub") + + mcphub.setup({}) end, }, { @@ -43,7 +45,7 @@ local M = { ["file"] = { -- Use Telescope as the provider for the /file command opts = { - provider = "telescope", -- Can be "default", "telescope", "fzf_lua", "mini_pick" or "snacks" + provider = "snacks", -- Can be "default", "telescope", "fzf_lua", "mini_pick" or "snacks" }, }, }, @@ -93,11 +95,49 @@ local M = { }, }, spinner = { - style = "lualine", + opts = { + style = "lualine", + }, }, }, }) end, + init = function() + local function ghostty_notify(title, body) + -- Send OSC 9 escape sequence for Ghostty notification + -- Format: \033]9;title;body\007 + local notification = string.format("\027]9;%s;%s\007", title, body or "") + io.write(notification) + io.flush() + end + local last_autocmd = {} + + -- Helper to debounce notifications + local function should_notify(event_name) + local cur = os.time() + if not last_autocmd[event_name] or cur - last_autocmd[event_name] > 2 then + last_autocmd[event_name] = cur + return true + end + return false + end + + vim.api.nvim_create_autocmd("User", { + pattern = { "CodeCompanionChatDone", "CodeCompanionRequestFinished", "CodeCompanionToolApprovalRequested" }, + callback = function(args) + if should_notify(args.match) then + if args.match == "CodeCompanionChatDone" then + ghostty_notify("CodeCompanion", "Chat is ready for interaction") + elseif args.match == "CodeCompanionRequestFinished" then + ghostty_notify("CodeCompanion", "LLM has generated a response") + elseif args.match == "CodeCompanionToolApprovalRequested" then + local tool_name = args.data.tool.name or "Tool" + ghostty_notify("CodeCompanion", "Waiting for approval: " .. tool_name) + end + end + end, + }) + end, }, } diff --git a/.config/nvim/lua/plugins/code/conjure.lua b/.config/nvim/lua/plugins/code/conjure.lua index dbef159..e6727bf 100644 --- a/.config/nvim/lua/plugins/code/conjure.lua +++ b/.config/nvim/lua/plugins/code/conjure.lua @@ -20,6 +20,9 @@ local M = { vim.g["conjure#eval#gsubs"] = { ["comment"] = { "^%(comment[%s%c]", "(do " } } vim.g["conjure#client#clojure#nrepl#connection#auto_repl#cmd"] = "clj -M:repl/conjure" vim.g["conjure#client#clojure#nrepl#eval#raw_out"] = true + vim.g["conjure#client#clojure#nrepl#test#raw_out"] = true + vim.g["conjure#client#clojure#nrepl#test#runner"] = "kaocha" --"clojure" + vim.g["conjure#client#clojure#nrepl#test#call_suffix"] = '{:config-file "tests.edn"}' vim.g["conjure#client#clojure#nrepl#eval#print_function"] = "cider.nrepl.pprint/pprint" -- vim.g["conjure#log#hud#open_when"] = "log-win-not-visible" vim.g["conjure#filetype#fennel"] = "conjure.client.fennel.nfnl" diff --git a/.config/nvim/lua/plugins/code/diagnostics.lua b/.config/nvim/lua/plugins/code/diagnostics.lua index ba87ef0..b972a63 100644 --- a/.config/nvim/lua/plugins/code/diagnostics.lua +++ b/.config/nvim/lua/plugins/code/diagnostics.lua @@ -22,7 +22,7 @@ local config = { min = vim.diagnostic.severity.INFO, }, severity_sort = true, - priority = 10, + priority = 50, }, -- Enable lsp cursor word highlighting document_highlight = { diff --git a/.config/nvim/lua/plugins/code/testing.lua b/.config/nvim/lua/plugins/code/testing.lua index 31ce3c9..120c8b0 100644 --- a/.config/nvim/lua/plugins/code/testing.lua +++ b/.config/nvim/lua/plugins/code/testing.lua @@ -1,21 +1,58 @@ -local noremap = { noremap = true } local M = { { "nvim-neotest/neotest", - --commit = "52fca6717ef972113ddd6ca223e30ad0abb2800c", - ft = "typescript", + event = "VeryLazy", + branch = "master", + ft = { "javascript", "typescript", "tsx" }, keys = { { "tt", - " lua require('neotest').run.run({vim.fn.expand('%'), vitestCommand = 'turbo run test'})", + "lua require('neotest').run.run(vim.fn.expand('%'))", mode = "n", - noremap, + noremap = true, + desc = "Run test file", }, { "rt", - " lua require('neotest').run.run({vim.fn.expand('%'), vitestCommand = 'turbo run test'})", + "lua require('neotest').run.run(vim.fn.expand('%'))", mode = "n", - noremap, + noremap = true, + desc = "Run test file", + }, + { + "tn", + "lua require('neotest').run.run()", + mode = "n", + noremap = true, + desc = "Run nearest test", + }, + { + "to", + "lua require('neotest').output.open({ enter = true, auto_close = true })", + mode = "n", + noremap = true, + desc = "Show test output", + }, + { + "tp", + "lua require('neotest').output_panel.toggle()", + mode = "n", + noremap = true, + desc = "Toggle output panel", + }, + { + "ts", + "lua require('neotest').summary.toggle()", + mode = "n", + noremap = true, + desc = "Toggle test summary", + }, + { + "tw", + "lua require('neotest').watch.toggle(vim.fn.expand('%'))", + mode = "n", + noremap = true, + desc = "Toggle watch mode", }, }, dependencies = { @@ -25,112 +62,162 @@ local M = { "nvim-treesitter/nvim-treesitter", "marilari88/neotest-vitest", }, - opts = { - status = { virtual_text = true }, - output = { open_on_run = true }, - }, config = function() - local neotest_ns = vim.api.nvim_create_namespace("neotest") - vim.diagnostic.config({ - virtual_text = { - format = function(diagnostic) - -- Replace newline and tab characters with space for more compact diagnostics - local message = diagnostic.message:gsub("\n", " "):gsub("\t", " "):gsub("%s+", " "):gsub("^%s+", "") - return message - end, - }, - }, neotest_ns) - vim.api.nvim_set_keymap( - "n", - "rt", - " lua require('neotest').run.run({vim.fn.expand('%'), vitestCommand = 'turbo run test'})", - noremap - ) - vim.api.nvim_set_keymap( - "n", - "tt", - " lua require('neotest').run.run({vim.fn.expand('%'), vitestCommand = 'turbo run test'})", - noremap - ) - vim.api.nvim_set_keymap( - "n", - "to", - " lua require('neotest').output.open({ enter = true, auto_close = true })", - noremap - ) - vim.api.nvim_set_keymap("n", "ts", " lua require('neotest').summary.toggle()", noremap) + -- Define highlight groups BEFORE setup + vim.api.nvim_set_hl(0, "NeotestPassed", { fg = "#00ff00", bold = true }) + vim.api.nvim_set_hl(0, "NeotestFailed", { fg = "#ff0000", bold = true }) + vim.api.nvim_set_hl(0, "NeotestRunning", { fg = "#ffff00", bold = true }) + vim.api.nvim_set_hl(0, "NeotestSkipped", { fg = "#00ffff", bold = true }) + vim.api.nvim_create_autocmd("FileType", { + group = vim.api.nvim_create_augroup("NeotestSmartQ", { clear = true }), + pattern = "Neotest Summary", + command = "nmap q :q", + }) + require("neotest").setup({ adapters = { require("neotest-vitest")({ - cwd = function(testFilePath) - return vim.fs.root(testFilePath, "node_modules") + -- Set the vitest command - let the adapter find the local binary + -- The adapter will look for node_modules/.bin/vitest automatically + vitestCommand = function(path) + -- Find the workspace root by looking for vitest.config.js + local root = vim.fs.dirname(vim.fs.find({ "vitest.config.js", "vitest.config.ts" }, { + path = path, + upward = true, + })[1]) + + if root then + -- Use the local vitest binary from the workspace + local local_vitest = root .. "/node_modules/.bin/vitest" + if vim.fn.filereadable(local_vitest) == 1 then + return local_vitest + end + end + + -- Fallback to npx vitest + return "npx vitest" end, - filter_dir = function(name, rel_path, root) + + -- Set the config file path dynamically + vitestConfigFile = function(path) + local configs = vim.fs.find({ "vitest.config.js", "vitest.config.ts" }, { + path = path, + upward = true, + }) + return configs[1] + end, + + -- Set cwd to the workspace root + cwd = function(path) + local root = vim.fs.dirname(vim.fs.find({ "vitest.config.js", "vitest.config.ts" }, { + path = path, + upward = true, + })[1]) + return root + end, + + -- Filter test files + is_test_file = function(file_path) + return file_path:match("%.test%.ts$") + or file_path:match("%.test%.tsx$") + or file_path:match("%.spec%.ts$") + or file_path:match("%.spec%.tsx$") + end, + + -- Exclude node_modules + filter_dir = function(name) return name ~= "node_modules" end, }), }, + + -- Enable debug logging temporarily + log_level = vim.log.levels.DEBUG, + + -- Configure output + output = { + enabled = true, + open_on_run = true, + }, + + -- Configure output panel + output_panel = { + enabled = true, + open = "botright split | resize 15", + }, + + -- THIS IS THE KEY FIX - Configure status display properly + status = { + enabled = true, + virtual_text = true, -- Enable virtual text to show status inline + signs = true, -- Enable signs in sign column + }, + + -- Icons configuration + icons = { + passed = "✓", + running = "⟳", + failed = "✗", + skipped = "○", + unknown = "?", + child_prefix = "├", + child_indent = "│", + final_child_prefix = "└", + non_collapsible = "─", + collapsed = "─", + expanded = "╮", + final_child_indent = " ", + running_animated = { "/", "|", "\\", "-", "/", "|", "\\", "-" }, + }, + + -- Configure floating window + floating = { + border = "rounded", + max_height = 0.6, + max_width = 0.6, + }, + + -- Configure quickfix + quickfix = { + enabled = true, + open = false, + }, + + -- Configure summary window + summary = { + enabled = true, + animated = true, + follow = true, + expand_errors = true, + mappings = { + attach = "a", + clear_marked = "M", + clear_target = "T", + debug = "d", + debug_marked = "D", + expand = { "", "<2-LeftMouse>" }, + expand_all = "e", + jumpto = "i", + mark = "m", + next_failed = "J", + output = "o", + prev_failed = "K", + run = "r", + run_marked = "R", + short = "O", + stop = "u", + target = "t", + watch = "w", + }, + }, + + -- Diagnostic configuration - CRITICAL FOR SHOWING FAILURES + diagnostic = { + enabled = true, + severity = vim.diagnostic.severity.ERROR, + }, }) end, }, - - -- { - -- "tT", - -- function() - -- require("neotest").run.run(vim.uv.cwd()) - -- end, - -- desc = "Run All Test Files (Neotest)", - -- }, - -- { - -- "tr", - -- function() - -- require("neotest").run.run() - -- end, - -- desc = "Run Nearest (Neotest)", - -- }, - -- { - -- "tl", - -- function() - -- require("neotest").run.run_last() - -- end, - -- desc = "Run Last (Neotest)", - -- }, - -- { - -- "ts", - -- function() - -- require("neotest").summary.toggle() - -- end, - -- desc = "Toggle Summary (Neotest)", - -- }, - -- { - -- "to", - -- function() - -- require("neotest").output.open({ enter = true, auto_close = true }) - -- end, - -- desc = "Show Output (Neotest)", - -- }, - -- { - -- "tO", - -- function() - -- require("neotest").output_panel.toggle() - -- end, - -- desc = "Toggle Output Panel (Neotest)", - -- }, - -- { - -- "tS", - -- function() - -- require("neotest").run.stop() - -- end, - -- desc = "Stop (Neotest)", - -- }, - -- { - -- "tw", - -- function() - -- require("neotest").watch.toggle(vim.fn.expand("%")) - -- end, - -- desc = "Toggle Watch (Neotest)", - -- }, - -- }, } - return M diff --git a/.config/nvim/lua/plugins/editor/init.lua b/.config/nvim/lua/plugins/editor/init.lua index 8dbcf66..c68d30f 100644 --- a/.config/nvim/lua/plugins/editor/init.lua +++ b/.config/nvim/lua/plugins/editor/init.lua @@ -1,8 +1,9 @@ local M = { require("plugins.editor.treesitter"), require("plugins.editor.blink"), - require("plugins.editor.telescope"), - require("plugins.editor.fff"), + require("plugins.editor.snacks"), + --require("plugins.editor.telescope"), + --require("plugins.editor.fff"), require("plugins.editor.gitsigns"), require("plugins.editor.leap"), require("plugins.editor.neorg"), diff --git a/.config/nvim/lua/plugins/editor/snacks.lua b/.config/nvim/lua/plugins/editor/snacks.lua new file mode 100644 index 0000000..bfcf932 --- /dev/null +++ b/.config/nvim/lua/plugins/editor/snacks.lua @@ -0,0 +1,105 @@ +local M = { + { + "folke/snacks.nvim", + ---@type snacks.Config + opts = { + picker = { + layout = { + preset = "telescope", + }, + }, + }, + keys = { + { + "t", + function() + Snacks.explorer() + end, + desc = "Explorer", + }, + { + "", + function() + Snacks.picker.buffers({ + win = { + input = { + keys = { + [""] = { "bufdelete", mode = { "n", "i" } }, + }, + }, + }, + }) + end, + desc = "Buffers", + }, + { + "gb", + function() + Snacks.picker.git_branches({ + win = { + input = { + keys = { + [""] = { "git_branch_add", mode = { "n", "i" } }, + --[""] = { "git_branch_add", mode = { "n", "i" } }, + [""] = { "git_branch_del", mode = { "n", "i" } }, + }, + }, + }, + }) + end, + desc = "Git branches", + }, + { + "r", + function() + Snacks.picker.lsp_references() + end, + desc = "LSP references", + }, + { + "", + function() + Snacks.picker.marks({ + win = { + input = { + keys = { + [""] = { "mark_delete", mode = { "n", "i" } }, + }, + }, + }, + }) + end, + desc = "Marks", + }, + }, + }, + { + "2kabhishek/seeker.nvim", + dependencies = { "folke/snacks.nvim" }, + cmd = "Seeker", + setup = { + picker_provider = "snacks", + toggle_key = "", + }, + opts = {}, + keys = { + { + "", + " Seeker files", + desc = "Smart Find Files", + }, + { + "f", + " Seeker grep", + desc = "Grep", + }, + { + "", + " Seeker grep_word", + desc = "Visual selection or word", + }, + }, + }, +} + +return M diff --git a/.config/nvim/lua/plugins/editor/treesitter.lua b/.config/nvim/lua/plugins/editor/treesitter.lua index fd51bda..1ee4a0a 100644 --- a/.config/nvim/lua/plugins/editor/treesitter.lua +++ b/.config/nvim/lua/plugins/editor/treesitter.lua @@ -21,6 +21,7 @@ local M = { "java", "gitignore", "terraform", + "tsx", "norg", "vim", "typescript", diff --git a/.config/nvim/lua/statuscol.lua b/.config/nvim/lua/statuscol.lua index cf093ef..4615872 100644 --- a/.config/nvim/lua/statuscol.lua +++ b/.config/nvim/lua/statuscol.lua @@ -16,6 +16,24 @@ function M.get_signs(buf, lnum) ---@type Sign[] local signs = {} + -- Get regular signs (used by neotest and other plugins) + if vim.fn.has("nvim-0.10") == 1 then + local regular_signs = vim.fn.sign_getplaced(buf, { group = "*", lnum = lnum }) + if regular_signs and regular_signs[1] and regular_signs[1].signs then + for _, sign in ipairs(regular_signs[1].signs) do + local sign_def = vim.fn.sign_getdefined(sign.name)[1] + if sign_def then + signs[#signs + 1] = { + name = sign.name, + text = sign_def.text, + texthl = sign_def.texthl, + priority = sign.priority or 10, + } + end + end + end + end + -- Get extmark signs local extmarks = vim.api.nvim_buf_get_extmarks( buf, @@ -90,34 +108,26 @@ function M.statuscolumn() local is_file = vim.bo[buf].buftype == "" local show_signs = vim.wo[win].signcolumn ~= "no" - local components = { "", "", "" } -- left, middle, right - - local show_open_folds = true + local components = { "", "" } -- sign, number if show_signs then local signs = M.get_signs(buf, vim.v.lnum) - ---@type Sign?,Sign?,Sign? - local left, right, fold, githl + ---@type Sign?,Sign? + local sign, git for _, s in ipairs(signs) do if s.name and (s.name:find("GitSign") or s.name:find("MiniDiffSign")) then - right = s - else - left = s + git = s + elseif s.name and s.name:find("neotest") then + -- Prioritize neotest signs + sign = s + elseif not sign or not (sign.name and sign.name:find("neotest")) then + sign = s end end - vim.api.nvim_win_call(win, function() - if vim.fn.foldclosed(vim.v.lnum) >= 0 then - fold = { text = vim.opt.fillchars:get().foldclose or "", texthl = githl or "Folded" } - elseif show_open_folds and tostring(vim.treesitter.foldexpr(vim.v.lnum)):sub(1, 1) == ">" then -- fold start - fold = { text = vim.opt.fillchars:get().foldopen or "", texthl = githl } - end - end) - -- Left: mark or non-git sign - components[1] = M.icon(M.get_mark(buf, vim.v.lnum) or left) - -- Right: fold icon or git sign (only if file) - components[3] = is_file and M.icon(fold or right) or "" + -- Show mark, or diagnostic/neotest sign, or git sign + components[1] = M.icon(M.get_mark(buf, vim.v.lnum) or sign or git) end -- Numbers in Neovim are weird From b869d3bd8341b23295c68f90ae22eae59161ab2d Mon Sep 17 00:00:00 2001 From: Aaron Walker Date: Thu, 12 Mar 2026 23:16:05 -0400 Subject: [PATCH 2/2] [ghostty]: config update --- .config/ghostty/config | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.config/ghostty/config b/.config/ghostty/config index e7ec826..90a2ea1 100644 --- a/.config/ghostty/config +++ b/.config/ghostty/config @@ -16,3 +16,11 @@ working-directory = "home" # Shaders custom-shader = ./shaders/cursor_smear.glsl custom-shader = ./shaders/cursor_blaze_no_trail.glsl + +keybind = cmd+ctrl+t=toggle_window_float_on_top + +desktop-notifications = true +bell-features = system,attention +notify-on-command-finish = always +notify-on-command-finish-action = notify, bell +notify-on-command-finish-after = 0s