vim-jp / vim-jp/vital.vim

add support for floating window and popup

Open
#747 6 comments 7 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Vim Script
Stars
587
Forks
64
Avg merge
2d 8h
Merged PRs (30d)
1

Description

It would be good if vital.vim has a popup api that works in both vim and neovim. There has been some PRs related to this in vim-lsp at https://github.com/prabirshrestha/vim-lsp/pull/510 and https://github.com/prabirshrestha/vim-lsp/pull/567. Another one i found was this https://github.com/ZSaberLv0/ZFVimPopup. Lot of other plugins also has to keep creating wrappers to solve this issue.

Besides just a wrapper around vim and neovim apis there are other high level apis that would be necessary for the popup such as controlling direction and zindex. For example I might want to show LSP hover information above the cursor but diagnostics below the cursor. If autocomplete popup menu is open I might want to show the popup at the right of the complete menu but if it is to the end of the screen i might want to show it to the left instead or if at the bottom of the screen i might want to show at the top. Or might even want to dock it similar as https://github.com/ncm2/float-preview.nvim. Might also want to listen to buffer/window resizes and resize accordingly.

Since some of these are quite complicated specially when dealing with multiple popup at the same time my thought was to have 2 modules.

  1. Popup : This is a simple wrapper that is just bridges vim popup and neovim floating window apis.
  2. PopupManager: This is the bigger one which does the management of multiple popups.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing Vim's popup API with Neovim's floating-window API and review the linked vim-lsp and ZFVimPopup implementations. Define the scope of the proposed Popup and PopupManager modules, including positioning, z-index, multiple popups, and resize handling. Done should mean a documented cross-editor API with tests covering the agreed behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
vim
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.