Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extra spacing around LSP Hover Buffer #29459

Closed
Juhan280 opened this issue Jun 23, 2024 · 1 comment
Closed

Extra spacing around LSP Hover Buffer #29459

Juhan280 opened this issue Jun 23, 2024 · 1 comment
Labels
bug issues reporting wrong behavior lsp

Comments

@Juhan280
Copy link

Problem

I have recently updated neovim from v0.9 to v0.10. Everything is fine except this one particular thing.

Whenever I call lsp hover, I see extra blank lines around the codeblock. I know that this isn't that big of a deal, but i like it being compact, especially because I also use neovim on my phone and those extra lines look ugly on the small screen.

Here is a screenshot from v0.10.0
2024-06-23-163913_hyprshot

I discovered that those extra lines come from the backtics of markdown codeblocks.
2024-06-23-163919_hyprshot
2024-06-23-163925_hyprshot

Steps to reproduce

-- Run this file as `nvim --clean -u minimal.lua`

for name, url in pairs {
    lspconfig = "https://github.com/neovim/nvim-lspconfig",
    treesitter = "https://github.com/nvim-treesitter/nvim-treesitter"
} do
  local install_path = vim.fn.fnamemodify('nvim_issue/' .. name, ':p')
  if vim.fn.isdirectory(install_path) == 0 then
    vim.fn.system { 'git', 'clone', '--depth=1', url, install_path }
  end
  vim.opt.runtimepath:append(install_path)
end

vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, {
    border = "rounded",
})

require("nvim-treesitter.configs").setup({
    ensure_installed = {"lua", "markdown"}
})
require("lspconfig").lua_ls.setup({})

Expected behavior

Like neovim v0.9.x
A screenshot from v0.9.5:
2024-06-23-163841_hyprshot

Neovim version (nvim -v)

NVIM v0.10.0; Build type: Release; LuaJIT 2.1.1716656478

Vim (not Nvim) behaves the same?

N/A

Operating system/version

Arch Linux

Terminal name/version

alacritty 0.13.2

$TERM environment variable

alacritty

Installation

pacman -S neovim

@Juhan280 Juhan280 added the bug issues reporting wrong behavior label Jun 23, 2024
@github-actions github-actions bot added the lsp label Jun 23, 2024
@clason
Copy link
Member

clason commented Jun 23, 2024

Duplicate of #25718

@clason clason marked this as a duplicate of #25718 Jun 23, 2024
@clason clason closed this as not planned Won't fix, can't repro, duplicate, stale Jun 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug issues reporting wrong behavior lsp
Projects
None yet
Development

No branches or pull requests

2 participants