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 /.config/nvim/plugin/50-lsp.lua | |
| 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.
Diffstat (limited to '.config/nvim/plugin/50-lsp.lua')
| -rw-r--r-- | .config/nvim/plugin/50-lsp.lua | 19 |
1 files changed, 0 insertions, 19 deletions
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", |
