Skip to content

Commit

Permalink
do not look back on the first position in the line
Browse files Browse the repository at this point in the history
  • Loading branch information
yyoncho committed Apr 29, 2020
1 parent d230f9c commit 87ea1df
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions lsp-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -4176,12 +4176,13 @@ and the position respectively."

(defun lsp--looking-back-trigger-characters-p (trigger-characters)
"Return trigger character if text before point matches any of the TRIGGER-CHARACTERS."
(seq-some
(lambda (trigger-char)
(and (equal (buffer-substring-no-properties (- (point) (length trigger-char)) (point))
trigger-char)
trigger-char))
trigger-characters))
(unless (= (point) (point-at-bol))
(seq-some
(lambda (trigger-char)
(and (equal (buffer-substring-no-properties (- (point) (length trigger-char)) (point))
trigger-char)
trigger-char))
trigger-characters)))

(defvar lsp--capf-cache nil
"Cached candidates for completion at point function.
Expand Down

0 comments on commit 87ea1df

Please sign in to comment.