Skip to content

Commit

Permalink
lsp-completion: dont use company's specific variable for checking aut…
Browse files Browse the repository at this point in the history
…o trigger char (emacs-lsp#4432)
  • Loading branch information
kiennq authored Apr 18, 2024
1 parent e379ae5 commit e47ea29
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lsp-completion.el
Original file line number Diff line number Diff line change
Expand Up @@ -525,8 +525,11 @@ The MARKERS and PREFIX value will be attached to each candidate."
:company-require-match 'never
:company-prefix-length
(save-excursion
(defvar company-minimum-prefix-length)
(let ((bounds-left (max (line-beginning-position) (- (point) company-minimum-prefix-length)))
(let (
;; 2 is a heuristic number to make sure we look futher back than
;; the bounds-start, which can be different from the actual start
;; of the symbol
(bounds-left (max (line-beginning-position) (- bounds-start 2)))
triggered-by-char?)
(while (and (> (point) bounds-left)
(not (equal (char-after) ?\s))
Expand Down

0 comments on commit e47ea29

Please sign in to comment.