Open SrWither opened 2 years ago
It's not only the first line.
To me it seems the signature help is rendered as plain Markdown.
I think it is not the bug of this plugin.
And also I don't think nvim-cmp's bug because nvim-cmp uses vim.lsp.util.stylize_markdown
as render.
So, it may be the LSP server sending different docstrings depending on completion or not?
Sorry. It's maybe an improvements point at the nvim-cmp side, I think.
But it's difficult. I can't think of a solution for it at the moment. So take a long time to improve this.
I'm trying to add <cmp-annotate>...</ cmp-annotate>
to a native lsp syntax rule.
However, I cannot manage nested syn-region
rules at the moment. If someone has a solution. I want help.
The following code is not work correctly...
-- lua/view/docs_view.lua
...
vim.api.nvim_buf_call(self.window:get_buffer(), function()
vim.cmd([[syntax clear]])
end)
vim.lsp.util.stylize_markdown(self.window:get_buffer(), documents, {
max_width = maxwidth,
max_height = documentation.maxheight,
})
vim.api.nvim_buf_call(self.window:get_buffer(), function()
vim.cmd(([[syntax region %s matchgroup=Conceal start=+<cmp-annotate>+ end=+</cmp-annotate>+ contained containedin=ALL concealends keepend oneline]]):format('CmpMarkdownAnnotate'))
end)
...
should MDN Reference display as a link here?
any update or workaround on this?
when the signature help appears, the colors of the first line are not visible![image](https://user-images.githubusercontent.com/59105868/152703157-017eb0ad-d8bb-4ae5-87f2-4e8455336584.png)
in theory it should look like this:![image](https://user-images.githubusercontent.com/59105868/152703186-784b05f9-d8af-429a-a7f2-43260986072a.png)