Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork6.5k
feat(lsp): vim.lsp.completion completionItem/resolve when completeopt=popup#32820
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Conversation
Uh oh!
There was an error while loading.Please reload this page.
153498a to2856dabCompareprzepompownia commentedMar 11, 2025
Please add |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
d61437a to994ff56CompareUh oh!
There was an error while loading.Please reload this page.
przepompownia commentedMar 15, 2025
justinmk commentedMar 15, 2025
Hopefully soon we'll have a default 1px border for popupmenu + the doc floatwin, so that will be less urgent. |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
27872c0 to817a28fCompareUh oh!
There was an error while loading.Please reload this page.
d28777f tob532b8fCompareUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
runtime/lua/vim/lsp/completion.lua Outdated
| return | ||
| end | ||
| localwindata=api.nvim__complete_set(cmp_info.selected, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
really need to decide what we're going to do with this api function.
655f89d to554f03bCompareUh oh!
There was an error while loading.Please reload this page.
e5de627 to01b79b4Compareprzepompownia commentedAug 4, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Is there any other (than reported by CI) block preventing this PR from being merged? |
This comment was marked as resolved.
This comment was marked as resolved.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
| end | ||
| end | ||
| localall=api.nvim_win_text_height(winid, {}).all | ||
| api.nvim_win_set_height(winid,all) |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
border of the info window is not affected by winborder. In Vim, it’s controlled by completepopup. My plan is to first merge previewpopup and then implement completepopup to avoid duplicate code.
ab6d69e to389eb69CompareUh oh!
There was an error while loading.Please reload this page.
support completeitem/resolve request to get documentation and showit in popup floating window when cot include popupFixesneovim#29225
sakithb commentedNov 24, 2025
For anyone wanting to have the docs popup until this pr is merged vim.api.nvim_create_autocmd("CompleteChanged", {callback=function()localevent=vim.v.eventifnoteventornotevent.completed_itemthenreturnendlocalcy=event.rowlocalcx=event.collocalcw=event.widthlocalch=event.heightlocalitem=event.completed_itemlocallsp_item=item.user_dataanditem.user_data.nvimanditem.user_data.nvim.lsp.completion_itemlocalclient=vim.lsp.get_clients({bufnr=0 })[1]ifnotclientornotlsp_itemthenreturnendclient:request('completionItem/resolve',lsp_item,function(_,result)vim.cmd("pclose")ifresultandresult.documentationthenlocaldocs=result.documentation.valueorresult.documentationiftype(docs)=="table"thendocs=table.concat(docs,"\n")endifnotdocsordocs==""thenreturnendlocalbuf=vim.api.nvim_create_buf(false,true)vim.bo[buf].bufhidden='wipe'localcontents=vim.lsp.util.convert_input_to_markdown_lines(docs)vim.api.nvim_buf_set_lines(buf,0,-1,false,contents)vim.treesitter.start(buf,"markdown")localdx=cx+cw+1localdw=60localanchor="NW"ifdx+dw>vim.o.columnsthendw=vim.o.columns-dxanchor="NE"endlocalwin=vim.api.nvim_open_win(buf,false, {relative="editor",row=cy,col=dx,width=dw,height=ch,anchor=anchor,border="none",style="minimal",zindex=60,})vim.wo[win].conceallevel=2vim.wo[win].wrap=truevim.wo[win].previewwindow=trueendend)end,})vim.api.nvim_create_autocmd("CompleteDone", {callback=function()vim.cmd("pclose")end}) |

Uh oh!
There was an error while loading.Please reload this page.
support completeitem/resolve request to get documentation and show it in popup floating window when cot include popup, the actual application of
nvim__complete_set. It may still need some refinement. If there are any issues, I can adjust the implementation on the C side.