Skip to content

args-out-of-range in function lsp-ivy--format-symbol-match #19

@a1406

Description

@a1406

because the args kind may be 255, and it is args-out-of-range of lsp-ivy-symbol-kind-to-face.
Mybe it should check the args kind like this:

(lsp-defun lsp-ivy--format-symbol-match
((&SymbolInformation :name :kind :container-name? :location (&Location :uri))
project-root)
"Convert the match returned by lsp-mode into a candidate string."
(let* ((type (if (>= kind (length lsp-ivy-symbol-kind-to-face))
nil
(elt lsp-ivy-symbol-kind-to-face kind)))
(typestr (if lsp-ivy-show-symbol-kind
(propertize (format "[%s] " (car type)) 'face (cdr type))
""))

     (pathstr (if lsp-ivy-show-symbol-filename
                  (propertize (format " · %s" (file-relative-name (lsp--uri-to-path uri) project-root))
                              'face font-lock-comment-face) "")))
(concat typestr (if (or (null container-name?) (string-empty-p container-name?))
                    (format "%s" name)
                  (format "%s.%s" container-name? name)) pathstr)))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions