Skip to main content
Module

x/denops_std/function/mod.ts>sign_define

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

Define a new sign named {name} or modify the attributes of an existing sign. This is similar to the :sign-define command.

Prefix {name} with a unique text to avoid name collisions. There is no {group} like with placing signs.

The {name} can be a String or a Number. The optional {dict} argument specifies the sign attributes. The following values are supported: icon full path to the bitmap file for the sign. linehl highlight group used for the whole line the sign is placed in. numhl highlight group used for the line number where the sign is placed. text text that is displayed when there is no icon or the GUI is not being used. texthl highlight group used for the text item culhl highlight group used for the text item when the cursor is on the same line as the sign and 'cursorline' is enabled.

If the sign named {name} already exists, then the attributes of the sign are updated.

The one argument {list} can be used to define a list of signs. Each list item is a dictionary with the above items in {dict} and a "name" item for the sign name.

Returns 0 on success and -1 on failure. When the one argument {list} is used, then returns a List of values one for each defined sign.

Examples:

call sign_define("mySign", {
        \ "text" : "=>",
        \ "texthl" : "Error",
        \ "linehl" : "Search"})
call sign_define([
        \ {'name' : 'sign1',
        \  'text' : '=>'},
        \ {'name' : 'sign2',
        \  'text' : '!!'}
        \ ])

Can also be used as a method:

GetSignList()->sign_define()

Parameters

denops: Denops
name: unknown
optional
dict: unknown

Returns

Promise<unknown[]>

Parameters

denops: Denops
list: unknown

Returns

Promise<unknown[]>