Skip to content

bug: html tag not removed in treesitter lsp markdown hover #424

@seblyng

Description

@seblyng

Did you check docs and existing issues?

  • I have read all the noice.nvim docs
  • I have searched the existing issues of noice.nvim
  • I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

0.9.0-dev-1324+ge30cc8be1

Operating system/version

MacOs 13.1

Describe the bug

It doesn't properly remove all html tags for the markdown render of lsp docs

Neovim:

image

VsCode:
image

Note the <code>Option\<String\></code> in the neovim popup. I would expect something like in vscode where the tags are not included

Steps To Reproduce

Use this Rust file:

fn main() {
    let foo = Some("foo");
    foo.map(|_| "bar");
}

Try to hover the docs on map and notice the tags being there

Expected Behavior

I would expect something like this where the ` is gone:

image

Note I just set modifiable and removed the tags to make it look like it ideally should.

Repro

-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
  vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath, })
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
  "folke/tokyonight.nvim",
  "folke/noice.nvim",
  -- add any other plugins here
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

vim.cmd.colorscheme("tokyonight")
-- add anything else here

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions