Skip to main content
Module

x/denops_std/popup/mod.ts>config

📚 Standard module for denops.vim
Go to Latest
function config
import { config } from "https://deno.land/x/denops_std@v6.4.0/popup/mod.ts";

Config a popup window in Vim/Neovim compatible way.

import type { Denops } from "https://deno.land/x/denops_std@v6.4.0/mod.ts";
import * as popup from "https://deno.land/x/denops_std@v6.4.0/popup/mod.ts";

export async function main(denops: Denops): Promise<void> {
  // Open a popup window
  await using popupWindow = await popup.open(denops, {
    relative: "editor",
    width: 20,
    height: 20,
    row: 1,
    col: 1,
  });

  // Config a popup window
  await popup.config(denops, popupWindow.winid, {
    title: "Hello, world!",
  });
}

Note that this function does NOT work in batch.collect().

Parameters

denops: Denops
winid: number
options: Partial<Omit<OpenOptions, "bufnr">>

Returns

Promise<void>