Skip to main content
Latest
function fn.sign_getdefined
import { fn } from "https://deno.land/x/denops_lsputil@v0.9.4/deps.ts";
const { sign_getdefined } = fn;

Get a list of defined signs and their attributes. This is similar to the :sign-list command.

If the {name} is not supplied, then a list of all the defined signs is returned. Otherwise the attribute of the specified sign is returned.

Each list item in the returned value is a dictionary with the following entries: icon full path to the bitmap file of the sign linehl highlight group used for the whole line the sign is placed in; not present if not set name name of the sign numhl highlight group used for the line number where the sign is placed; not present if not set 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; not present if not set culhl highlight group used for the text item when the cursor is on the same line as the sign and 'cursorline' is enabled; not present if not set

Returns an empty List if there are no signs and when {name} is not found.

Examples:

" Get a list of all the defined signs
echo sign_getdefined()

" Get the attribute of the sign named mySign
echo sign_getdefined("mySign")

Can also be used as a method:

GetSignList()->sign_getdefined()

Parameters

denops: Denops
optional
name: unknown

Returns

Promise<unknown[]>