Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Open
glepnir wants to merge1 commit intoneovim:master
base:master
Choose a base branch
Loading
fromglepnir:completion_info

Conversation

@glepnir
Copy link
Member

@glepnirglepnir commentedMar 10, 2025
edited
Loading

support completeitem/resolve request to get documentation and show it in popup floating window when cot include popup, the actual application ofnvim__complete_set. It may still need some refinement. If there are any issues, I can adjust the implementation on the C side.

test2

SebasF1349, deathbeam, dietrichm, lithammer, rmuir, crwebb85, etrnal70, zoriya, nomutin, bruno-digitbio, and 16 more reacted with hooray emojimiroshQa, roland-5, lithammer, marcuscaisey, zoriya, ebkalderon, bruno-digitbio, zlogic, mpal9000, adiSuper94, and 12 more reacted with heart emojixiaoshihou514, lithammer, besserwisser, jacksonludwig, and amedoeyes reacted with eyes emoji
@glepnirglepnir marked this pull request as draftMarch 10, 2025 10:00
@justinmkjustinmk changed the titlefeat(lsp): completion support completitem/resolve when popup existfeat(lsp): vim.lsp.completion completitem/resolve when popup existsMar 10, 2025
@glepnirglepnir mentioned this pull requestMar 10, 2025
@glepnirglepnirforce-pushed thecompletion_info branch 2 times, most recently from153498a to2856dabCompareMarch 11, 2025 10:44
@przepompownia
Copy link
Contributor

Please addFixes #29225 tag to the description.

justinmk reacted with thumbs up emoji

@glepnirglepnirforce-pushed thecompletion_info branch 5 times, most recently fromd61437a to994ff56CompareMarch 12, 2025 06:20
@przepompownia
Copy link
Contributor

image
Any thoughts about the default background highlight (not necessary to set here)?

@justinmk
Copy link
Member

Any thoughts about the default background highlight (not necessary to set here)?

Hopefully soon we'll have a default 1px border for popupmenu + the doc floatwin, so that will be less urgent.

@glepnirglepnirforce-pushed thecompletion_info branch 2 times, most recently from27872c0 to817a28fCompareMarch 15, 2025 23:49
@glepnirglepnirforce-pushed thecompletion_info branch 2 times, most recently fromd28777f tob532b8fCompareMarch 16, 2025 00:14
return
end

localwindata=api.nvim__complete_set(cmp_info.selected, {
Copy link
Member

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.

@glepnirglepnirforce-pushed thecompletion_info branch 2 times, most recently from655f89d to554f03bCompareApril 25, 2025 13:15
@glepnirglepnirforce-pushed thecompletion_info branch 9 times, most recently frome5de627 to01b79b4CompareApril 27, 2025 02:41
@przepompownia
Copy link
Contributor

przepompownia commentedAug 4, 2025
edited
Loading

Is there any other (than reported by CI) block preventing this PR from being merged?

flexagoon, skewb1k, comfysage, rmuir, igorlfs, r4v3n6101, besserwisser, jacksonludwig, sondr3, and ymich9963 reacted with heart emoji

@rmuir

This comment was marked as resolved.

end
end
localall=api.nvim_win_text_height(winid, {}).all
api.nvim_win_set_height(winid,all)

This comment was marked as resolved.

Copy link
MemberAuthor

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.

przepompownia reacted with thumbs up emoji
@glepnirglepnirforce-pushed thecompletion_info branch 3 times, most recently fromab6d69e to389eb69CompareNovember 11, 2025 03:58
support completeitem/resolve request to get documentation and showit in popup floating window when cot include popupFixesneovim#29225
@sakithb
Copy link

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})
r4v3n6101 and mthnglac reacted with thumbs up emoji

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@justinmkjustinmkjustinmk left review comments

@MariaSolOsMariaSolOsAwaiting requested review from MariaSolOs

+4 more reviewers

@rmuirrmuirrmuir left review comments

@somnamsomnamsomnam left review comments

@przepompowniaprzepompowniaprzepompownia left review comments

@ribru17ribru17ribru17 left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

0.12

Development

Successfully merging this pull request may close these issues.

9 participants

@glepnir@przepompownia@justinmk@rmuir@Cih2001@sakithb@somnam@ribru17@clason

[8]ページ先頭

©2009-2025 Movatter.jp