# TODO ## Barbar sidebar offset + alignment still broken **Symptoms:** - Oil sidebar label shows literal `Files` (static), not the expected fish-shortened cwd (`~/P/t/neovimrc`). - Sidebar width does not shrink to fit longest entry — stays at default ~35 cols even when the longest filename is much shorter. - Bar colors (`BufferCurrent*`, `BufferOffset`) visibly mismatch after darkbox edits and restart. **Context:** - `lua/timmypidashev/plugins/oil.lua` has `fish_cwd()` and `fit_width()` helpers wired to `bufferline.api.set_offset(width, text)`. Expected to be called on `BufWinEnter` / `BufReadPost` / `TextChanged` for oil buffers, plus retry loop `maybe_fit()` polling for buffer populate. - `lua/timmypidashev/plugins/barbar.lua` sets `sidebar_filetypes.oil` + `exclude_ft = { "oil" }`. - Darkbox `BufferOffset` was updated to `fg = foreground, bold = true` to match `BufferCurrent`; separator glyph changed from `▎` to `│`. **Hypotheses to verify:** 1. `task dev` was not run, so the copied `~/.config/nvim/lua/…` lacks the rtp prepend + oil changes. Check: `:lua =vim.api.nvim_get_runtime_file("colors/darkbox.lua", true)[1]` must show `~/Projects/timmypidashev/darkbox.nvim/…`. 2. Leftover pack clone of darkbox is winning over local rtp: `~/.local/share/nvim/site/pack/core/opt/darkbox.nvim` may need removal. 3. `fit_width` / `maybe_fit` never fire because the autocmd's buffer filter or pattern isn't matching oil buffers as expected. 4. `bufferline.api.set_offset` text arg is silently ignored or `api` module name differs across barbar versions. **Next steps:** - Instrument with `vim.notify` inside `maybe_fit`, `fit_width`, and `set_offset` to confirm they run and with what values. - Try `require("barbar").api` vs `require("bufferline.api")` — the module path has changed between barbar releases. - Consider dropping barbar's offset mechanism and rendering the label inline at the top of the oil buffer using extmarks instead. --- ## Opening markdown files has ~2s blank / freeze **Symptoms:** - Opening `README.md` (and likely other markdown files) shows a blank buffer for ~2 seconds before content/syntax renders. **Likely causes (to investigate in order):** 1. **marksman** LSP spawning and blocking initial render. Check `:LspLog` timestamps on attach. 2. **markdownlint-cli2** lint run on `BufReadPost` via `nvim-lint` — `lua/timmypidashev/plugins/lint.lua` triggers `try_lint` on `BufReadPost`. This can shell out synchronously if misconfigured. 3. **Treesitter** `markdown` + `markdown_inline` parsing both on the same buffer — our `FileType` autocmd starts treesitter; main branch install is async, but re-parse on large markdown can be slow first time. 4. **conform.nvim** format_on_save preload of `prettierd` binary (less likely on read, but worth eliminating). 5. **blink.cmp** Lua fuzzy impl cold-startup (we disabled rust fallback). **Diagnostic steps:** - `:lua vim.lsp.set_log_level("debug")` then `:LspLog` after opening the file. - Compare times: `nvim --clean README.md` vs current config. - Disable plugins one-by-one (`marksman`, `nvim-lint`, treesitter) to isolate. - `:Profile` (via `:h profile`) around `:e README.md`. **Likely fix candidates:** - Switch `nvim-lint` trigger from `BufReadPost` to `BufWritePost` only. - Detach marksman if no `.marksman.toml` / `.git` root — or remove it from the enabled LSP list entirely if unused. - Debounce treesitter highlight start for markdown.