Skip to main content

Questions tagged [popup-menu]

Filter by
Sorted by
Tagged with
0 votes
1 answer
22 views

Usual navigation motions in a popup window?

I'd like to write a file-tree/file-browsing plugin that uses popup windows. In popup_create I can set a filter to capture keys. For instance, popup_create('hello world', {filter: 'popup_filter_menu'}) ...
user54579's user avatar
2 votes
2 answers
111 views

Search within Popup menu

When I use the completion menu (<C-n>, <C-x><C-i>), sometimes the popup menu gives me a lot of options to choose from. Sometimes I know parts of what I'm looking for at the end of ...
user22476690's user avatar
0 votes
1 answer
29 views

Popup menu highlight issues when it is called for the second time

Consider the following snippet: vim9script var colors = getcompletion('', 'color', true) def PopupFilterColor(id: number, key: string): bool if index(['j', "\<down>", "\<c-...
Barzi2001's user avatar
  • 808
0 votes
1 answer
25 views

Is it possible to get the index of the highlighted selection of a popup_menu before confirming?

Typically, in a popup_menu you select a line and once you confirm it a callback function that takes popup window ID and index of the selection is invoked. I am wondering if it is possible to get the ...
Barzi2001's user avatar
  • 808
0 votes
2 answers
77 views

Creation of a short document description for programming languages in a pop-up window like vscode?

How can we have a short summary about documents of programming languages (Python and Javascript is important for me) or frameworks in Neovim? I want to see a short description of APIs and keywords in ...
mohamadi_arch's user avatar
0 votes
0 answers
17 views

pum#map#inser_relative(+1) command remap which worked forever recently stopped working

I have a pum command which does tab autocomplete on a completion list and it recently stopped working and I do not know why. The command... inoremap <silent><expr> <TAB> \ pum#...
Joff's user avatar
  • 165
0 votes
0 answers
300 views

How to automatically close a terminal popup window if a python script run in it didn't return any error?

I am wondering if there is a way to automatically close a popup window running a terminal if the execution of the last program didn't report any error and to keep it open if the execution of the last ...
Barzi2001's user avatar
  • 808
1 vote
1 answer
57 views

Help in positioning a popup menu in the screen

I am using MacVim and I wish a popup menu to always appear in the lower right corner of the screen (not the current window). I am using the following command: popup_create(items, { title: " ...
Barzi2001's user avatar
  • 808
0 votes
0 answers
37 views

Popup to show number of matches of a given string while in insert mode, and while completion popup is being shown

This is a follow up to a previous question. Thanks to that, I could come up with this augroup: augroup Foo autocmd! autocmd TextChangedI,TextChangedP * call <SID>foo() fun s:foo() let ...
Enlico's user avatar
  • 2,276
0 votes
0 answers
87 views

How to limit number of Vim-LSP suggestions from Vim-LSP itself

Even though Vim has its pum stuff, more specifically pumheight for this problem, I would expect Vim-LSP (prabirshrestha/vim-lsp) to have something similar for itself as well, after all a language ...
psygo's user avatar
  • 135
0 votes
1 answer
119 views

Can a popup_menu's callback access its popup_menu's first argument?

For now I have the feeling the answer is no, but I'm asking to make sure that's the case, and to know if people has found workarounds or can suggest good approaches. From :help popup_menu I've found ...
Enlico's user avatar
  • 2,276
0 votes
1 answer
72 views

How to map <C-z> to act like <C-y> in completion menu?

My keyboard has z and y switched compared to US keyboards, which makes pressing C-y for completions pretty awkward. I tried adding imap <expr> <C-z> pumvisible() ? "<C-y>" :...
fbence's user avatar
  • 707
0 votes
1 answer
618 views

Disable coc diagnostic popups

How do I disable coc diagnostic popups (such as unused variable)? I have suggestions disabled with "suggest.autoTrigger": "none" but I'm struggling to figure out how to disable on-...
Aaron Parisi's user avatar
0 votes
0 answers
75 views

forced inserted ^Z in coc

I'm using the plugin coc for autocompletion. My problem is that when coc opens the pop up menu with the completion items and I continue typing then a ^Z character is inserted in the buffer as shown in ...
JangLuna's user avatar
-1 votes
1 answer
67 views

how to disable the new popup file-picker on :w

If I try to write a file under a new name, instead of being able to edit an existing name provided by file-completion, I get a pop-up that only lets me select an existing one. I saw a description of ...
n952162's user avatar
0 votes
1 answer
300 views

Signature popup has unreadable colors in YCM for Rust

I'm using Vim 8.2 with rust highlighter and YCM plugin for auto-completion and signature help. Everything works except method signature: It has same color for both color text and bg in parts like ...
d9ngle's user avatar
  • 163
0 votes
1 answer
934 views

Insert mode's CTRL-E and CTRL-Y vs popup menu

I was wandering that sometimes I'd like CTRL-E and CTRL-Y to work even while I'm in insert mode. Before setting up any mapping I thought I should see if I'm shadowing some important functionality, so ...
Enlico's user avatar
  • 2,276
0 votes
1 answer
199 views

Popup menu: Set a selected item on creation

I have a popup_menu. I want to have the second, for example, option chosen when it opens, rather than the first. Is this possible? I've looked in various threads on the internet and :help popup and ...
mmm111mmm's user avatar
  • 147
1 vote
0 answers
85 views

Show popup menu of files which call a specific function vim

In normal mode, I'll hover over a function declaration and I want to open a file which calls this function. How can I open up the popup menu in normal mode and have it just open the file I select ...
libby's user avatar
  • 111
1 vote
0 answers
110 views

How can I overlap windows, use non-rectangular windows, or dock a window in the corner?

I'm working on a text file (my notes/todo document), and I want to have the to-do list part of the document open in one Vim window (to check things off), with another to look at the rest of the ...
interfect's user avatar
  • 163
1 vote
0 answers
361 views

How to display additional info for a completion option in second popup menu

The coc.nvim plugin has a really cool feature where the completion, or at least the python completion, will have additional information about the option in a second popup menu. I have looked through a ...
Prismavoid's user avatar
1 vote
0 answers
637 views

How to fix/customise coloring for the autocompletion popup menu?

I'm not really happy with the syntax coloring of the auto-completion menu. Probably the pink-ish background color is the least unpleasant thing, but the grey foreground text is really not as readable ...
Enlico's user avatar
  • 2,276
2 votes
1 answer
945 views

Display file contents in a popup window upon pressing a key?

I am having a text file where I have a cheat sheet of commands I learned. When pressing some key ,it should be displayed in popup window. In Kakoune editor they display a help using Alt+i , like that ...
Samselvaprabu's user avatar
1 vote
1 answer
307 views

How to gF (go to file Particular line) to popup window?

In vim8 there is a popup window feature which seems like vscode peek definition. Often I use gF to go to file with particular line number. Is there a way to open a file in popup window?
Samselvaprabu's user avatar
3 votes
1 answer
644 views

Disabling hint popup

Whenever my cursor is over a function for a few seconds, this hint for the function pops up. Doesn't go away by hitting Esc and I need to move my cursor to get rid of it. No other plugins except ...
digital_revenant's user avatar
0 votes
0 answers
69 views

How to store entries of complete menu and omnicomplete menu in variables without triggering the popup menu?

Is there a way to store the results of <C-N> or <C-X><C-O> from the insert mode in a string or list variable without triggering the respective popup menus to display onscreen? For ...
Terry's user avatar
  • 81
1 vote
2 answers
253 views

Sync cursors of popup window and current window

I'm trying to sync the cursors movement of a popup window, and the current window. call range(50) \ ->map({_, i -> string(i)}) \ ->popup_create(#{ \ line: 1, \ col: 1, ...
Nordine Lotfi's user avatar
2 votes
1 answer
310 views

Scrolling down in popup window not working as intended

I have the following code: let text = range(50)->map({_,i -> string(i)}) let winid = popup_create(text, { \ 'line': 1, \ 'col': 1, \ 'minwidth': 1, \ 'minheight': 1, \ '...
Nordine Lotfi's user avatar
0 votes
1 answer
687 views

How to display popup window on the left or right side

I looked into the :h popup.txt and unless i missed something, did not see any mention for setting a popup window on the left or right side. PS: I'm on Vim 8.2 (latest compiled as of now) Any example ...
Nordine Lotfi's user avatar
4 votes
2 answers
360 views

How to open folds in a pedit-preview popup window?

I'm displaying a file contents by using :pedit …the-file-path…, to then call popup_setoptions(…the-ID…,#{firstline:anumber}) in order to scroll the popup and highlight/show the desired part of the ...
Mooncer's user avatar
  • 173
0 votes
0 answers
158 views

Auto-completion pop-up no clean up - how to debug

I'm trying to solve this issue for some time now. Quite often auto-suggestion pop-up leaves a text on the screen: even after being closed sometimes covering newer suggestion that was displayed after ...
Mishaszu's user avatar
1 vote
1 answer
1k views

How to set cursor position in a popup buffer?

I'm tinkering with popups and trying to open one, select a line (namely set the cursor line by pressing mapped keys (Ctrln / Ctrlp)), then close it. The problem is that I cannot select a line, despite ...
d.k's user avatar
  • 774
2 votes
1 answer
3k views

Popup border is ugly, how can I make it look nice?

This is the default border, it looks ugly This is the FZF preview window. It looks pretty nice. How can I make Vim's popups look rounded like FZF's window? Update: thanks @ralf ! it works ! I ...
Zheng Kai's user avatar
  • 123
2 votes
1 answer
529 views

Highlight group for signature help

I'm using Vim (v. 8.2) with YouCompleteMe as a code completion engine. I welcome the addition of signature help, but I'm not happy with the default colors: Does anyone know what highlight group is ...
Lorah Attkins's user avatar
1 vote
1 answer
1k views

Unmap <c-n> / <c-p> in completion menu to use as previous / next snippet placeholder with Coc

My completion mappings scheme with coc is the following: <c-@> (ctrl-space): trigger the menu / use the selected item (or the first one) <c-j> and <c-k>: navigate the list (or also ...
Biggybi's user avatar
  • 2,770
40 votes
1 answer
14k views

What are the new "popup windows" in Vim 8.2?

The latest version of Vim, 8.2, has a new feature called "popups" or "popup windows". They sound interesting but I'm not quite sure what they're good for. Can you enlighten me...preferably with some ...
B Layer's user avatar
  • 20.1k