hrsh7th / nvim-cmp

A completion plugin for neovim coded in Lua.
MIT License
7.86k stars 393 forks source link

feature request: documentation treesitter syntax highlight like `vim.lsp.buf.signature_help()` in nvim 0.10 #1938

Open wenjinnn opened 4 months ago

wenjinnn commented 4 months ago

FAQ

Announcement

Minimal reproducible full config

None, no need for this issue.

Description

Since nvim 0.10 released, the signature_help floating window got syntax highlight powered by treesitter, like this: image and cmp documentation highlight looks like: image I guess the red bracket in documentation window is related on this issue, which is fixed at nvim 0.10 Maybe cmp could highlight documentation window like vim.lsp.buf.signature_help()? And I think noice.nvim is already do some hack that we can reference to: https://github.com/folke/noice.nvim/blob/9f6f6ba74f8bfbf7e43d6302cf86b070362f6203/lua/noice/lsp/override.lua#L12-L34

Steps to reproduce

Select some lsp completion item to make cmp show documentation window

Expected behavior

Syntax highlight like vim.lsp.buf.signature_help()

Actual behavior

documentation window only have basic highlight

Additional context

No response