Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/ddc_vim/deps.ts>fn.getloclist

Dark deno-powered completion framework for neovim/Vim
Go to Latest
function fn.getloclist
import { fn } from "https://deno.land/x/ddc_vim@v4.1.0/deps.ts";
const { getloclist } = fn;

Returns a List with all the entries in the location list for window {nr}. {nr} can be the window number or the window-ID. When {nr} is zero the current window is used.

For a location list window, the displayed location list is returned. For an invalid window number {nr}, an empty list is returned. Otherwise, same as getqflist().

If the optional {what} dictionary argument is supplied, then returns the items listed in {what} as a dictionary. Refer to getqflist() for the supported items in {what}.

In addition to the items supported by getqflist() in {what}, the following item is supported by getloclist():

    filewinid       id of the window used to display files
                    from the location list. This field is
                    applicable only when called from a
                    location list window. See
                    `location-list-file-window` for more
                    details.

Returns a Dictionary with default values if there is no location list for the window {nr}. Returns an empty Dictionary if window {nr} does not exist.

Examples (See also getqflist-examples):

:echo getloclist(3, {'all': 0})
:echo getloclist(5, {'filewinid': 0})

Parameters

denops: Denops
nr: unknown
optional
what: unknown

Returns

Promise<Record<string, unknown>>