-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
args-out-of-range in function lsp-ivy--format-symbol-match #19
Comments
thanks, that seems reasonable. If symbol kinds that large are in use, maybe |
It is "C" language, use ccls as the language server . The souce code is in 'openresty', file name is ngx_http_lua_common.h at line 127, the correspond souce code is When I use command |
thanks. I see that ccls defines 4 symbol kinds > 26 that users will probably want to be shown; still unsure as to whether I should change |
I tested the new version in the openresty souce code project with CCLS. It works very well. Although some symbol type shows [ ] (I found they are all in #define code), but I think it is acceptable. Thank you. |
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))
""))
The text was updated successfully, but these errors were encountered: