File tree Expand file tree Collapse file tree 1 file changed +15
-9
lines changed Expand file tree Collapse file tree 1 file changed +15
-9
lines changed Original file line number Diff line number Diff line change @@ -296,16 +296,22 @@ We don't extract the string that `lps-line' is already displaying."
296296 (when (and (bound-and-true-p lsp--cur-workspace)
297297 (not (bound-and-true-p lsp-ui-peek-mode))
298298 (lsp--capability " hoverProvider" ))
299- (if (symbol-at-point )
300- (let ((bounds (bounds-of-thing-at-point 'symbol )))
301- (unless (equal lsp-ui-doc--bounds bounds)
302- (lsp--send-request-async (lsp--make-request " textDocument/hover"
303- (lsp--text-document-position-params))
304- (lambda (hover )
305- (lsp-ui-doc--callback hover bounds (current-buffer ))
306- ))))
299+ (cond
300+ ((symbol-at-point )
301+ (let ((bounds (bounds-of-thing-at-point 'symbol )))
302+ (unless (equal lsp-ui-doc--bounds bounds)
303+ (lsp--send-request-async (lsp--make-request " textDocument/hover"
304+ (lsp--text-document-position-params))
305+ (lambda (hover )
306+ (lsp-ui-doc--callback hover bounds (current-buffer )))))))
307+ ((looking-at " [[:graph:]]" )
308+ (lsp--send-request-async (lsp--make-request " textDocument/hover"
309+ (lsp--text-document-position-params))
310+ (lambda (hover )
311+ (lsp-ui-doc--callback hover (cons (point ) (1+ (point ))) (current-buffer )))))
312+ (t
307313 (setq lsp-ui-doc--string-eldoc nil )
308- (lsp-ui-doc--hide-frame))))
314+ (lsp-ui-doc--hide-frame)))))
309315
310316(defun lsp-ui-doc--callback (hover bounds buffer )
311317 " Process the received documentation.
You can’t perform that action at this time.
0 commit comments