Skip to content
This repository has been archived by the owner on Jul 30, 2020. It is now read-only.

Funny index result on string. #306

Closed
scturtle opened this issue Jan 18, 2018 · 2 comments
Closed

Funny index result on string. #306

scturtle opened this issue Jan 18, 2018 · 2 comments

Comments

@scturtle
Copy link
Contributor

screenshot from 2018-01-18 19-31-16

@MaskRay
Copy link
Contributor

MaskRay commented Jan 18, 2018

This is an issue of lsp-ui-sidebar.el

It iterates symbols on the line using (forward-symbol 1) and displays symbol info. What you see is actually an implicit constructor.

          (while (and (<= (point) eol) (< (point) eob))
            (let ((symbol (thing-at-point 'symbol t))
                  (bounds (bounds-of-thing-at-point 'symbol))
                  (column (lsp--cur-column)))
              (when symbol
                (lsp--send-request-async
                 (lsp--make-request
                  "textDocument/hover"
                  (list :textDocument doc-id
                        :position (lsp--position (1- line) (if (= column 0) 0 (1- column)))))
                 (lambda (info) (if info (lsp-ui-sideline--push-info symbol line bounds info)))))
              (forward-symbol 1))))))))

(forward-symbol 1) does not work well on this.

I do not find a way to make it look better. Regarding namespace/class scoped symbols, e.g. ns::foo Cls::foo, you may see what displays.

@MaskRay
Copy link
Contributor

MaskRay commented Jan 23, 2018

Close as this is a lsp-ui-peek artifact

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants