0

我正在尝试编写一个脚本来获取给定缓冲区的符号列中的符号,我在帮助中看到:

sign_getplaced([{expr} [, {dict}]])                     sign_getplaced()
                Return a list of signs placed in a buffer or all the buffers.
                This is similar to the :sign-place-list command.

                If the optional buffer name {expr} is specified, then only the
                list of signs placed in that buffer is returned.  For the use
                of {expr}, see bufname(). The optional {dict} can contain
                the following entries:
                   group        select only signs in this group
                   id           select sign with this identifier
                   lnum         select signs placed in this line. For the use
                                of {lnum}, see line().
                If {group} is '*', then signs in all the groups including the
                global group are returned. If {group} is not supplied or is an
                empty string, then only signs in the global group are
                returned.  If no arguments are supplied, then signs in the
                global group placed in all the buffers are returned.
                See sign-group.

获取给定缓冲区中的所有标志(我现在想要 lspconfig,但我们只是说它们现在都还可以)。

:echo sign_getplaced(bufname())

显示:[{'signs': [], 'bufnr': 1}]这无济于事

:echo sign_getplaced(bufname(), '*')

不起作用,说“需要字典”,明智的

:echo sign_getplaced(bufname(), {"group":'*'})

显示:[{'signs': [], 'bufnr': 1}]这也无济于事

我需要帮助来了解如何在给定缓冲区中获取当前放置的标志。

4

0 回答 0