diff options
| author | Thomas Vanbesien <tvanbesi@proton.me> | 2026-05-22 11:07:11 +0200 |
|---|---|---|
| committer | Thomas Vanbesien <tvanbesi@proton.me> | 2026-05-22 11:07:11 +0200 |
| commit | f7df2e3d5627e00e87525131cd98da49abc57c5b (patch) | |
| tree | 4d2574cf660b1b4559f28f3e13edb8dfcc4e1d54 | |
| parent | fcc77a343ff2d76cab837e5af60e555753ddf75f (diff) | |
| download | dotfiles-f7df2e3d5627e00e87525131cd98da49abc57c5b.tar.gz dotfiles-f7df2e3d5627e00e87525131cd98da49abc57c5b.zip | |
Revert "fix(nvim): correct popup rendering for bullets and LSP docs"
This reverts commit 601bdd23a87c71dac8e4c59474c5915db676190f.
| -rw-r--r-- | .config/nvim/plugin/40-colors.lua | 7 | ||||
| -rw-r--r-- | .config/nvim/plugin/50-lsp.lua | 19 |
2 files changed, 0 insertions, 26 deletions
diff --git a/.config/nvim/plugin/40-colors.lua b/.config/nvim/plugin/40-colors.lua index 6e3e59d..21c93e7 100644 --- a/.config/nvim/plugin/40-colors.lua +++ b/.config/nvim/plugin/40-colors.lua @@ -58,17 +58,10 @@ local function adjust_highlight() vim.api.nvim_set_hl(0, "TabLineSel", { bg = "#edffd5" }) vim.api.nvim_set_hl(0, "Cursorline", { bg = "#edffd5" }) vim.api.nvim_set_hl(0, "NormalFloat", { bg = solarized_colors.base2 }) - -- render-markdown links Bullet -> Normal (an explicit bg). The custom - -- NormalFloat bg above then differs from that, so bullets show a - -- mismatched box in popups. Give the glyph Normal's fg but NO bg so it - -- stays transparent and adopts whatever window backs it (Normal in - -- buffers, NormalFloat in popups). - vim.api.nvim_set_hl(0, "RenderMarkdownBullet", { fg = solarized_colors.base00 }) elseif vim.o.background == "dark" then vim.api.nvim_set_hl(0, "TabLineSel", { bg = "#043624" }) vim.api.nvim_set_hl(0, "Cursorline", { bg = "#043624" }) vim.api.nvim_set_hl(0, "NormalFloat", { bg = solarized_colors.base02 }) - vim.api.nvim_set_hl(0, "RenderMarkdownBullet", { fg = solarized_colors.base0 }) end end end diff --git a/.config/nvim/plugin/50-lsp.lua b/.config/nvim/plugin/50-lsp.lua index 3b3fd4f..938cc64 100644 --- a/.config/nvim/plugin/50-lsp.lua +++ b/.config/nvim/plugin/50-lsp.lua @@ -15,25 +15,6 @@ vim.pack.add({ "https://github.com/neovim/nvim-lspconfig" }) vim.api.nvim_create_user_command("LspInspect", inspect_lsp, { desc = "Inspect LSP client" }) --- Widen hover / signature-help popups so long signatures don't wrap as much. --- Both go through the single built-in `vim.lsp.util.open_floating_preview`, --- so we wrap that one function instead of every call site: --- 1. Save the original into a local (the only remaining reference to it). --- 2. Overwrite the table field with our function; Neovim resolves the call --- through that field, so it now reaches ours transparently. --- 3. Inject `max_width` only when the caller didn't set one (the 120-col --- Lua/Markdown line-length convention), then forward every argument --- unchanged to the original and return its results. --- The float is still clamped to the available screen space, so a signature --- longer than the popup can fit will still wrap (just less often). -local open_floating_preview = vim.lsp.util.open_floating_preview ----@diagnostic disable-next-line: duplicate-set-field -- intentional monkey-patch -function vim.lsp.util.open_floating_preview(contents, syntax, opts, ...) - opts = opts or {} - opts.max_width = opts.max_width or 120 - return open_floating_preview(contents, syntax, opts, ...) -end - -- Enable LSP server capabilities if available when attaching, see `:help lsp-attach` vim.api.nvim_create_autocmd("LspAttach", { desc = "Enable LSP capabilities", |
