Skip to content

Commit

Permalink
chore: do not use make-variable-buffer-local
Browse files Browse the repository at this point in the history
  • Loading branch information
kassick committed Nov 27, 2024
1 parent 79dd07c commit e20df27
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lsp-inline-completion.el
Original file line number Diff line number Diff line change
Expand Up @@ -469,12 +469,12 @@ lsp-inline-completion-mode is active"
(add-hook 'lsp-inline-completion-before-show-hook #'lsp-inline-completion--company-save-state-and-hide nil t)
(add-hook 'lsp-inline-completion-cancelled-hook #'lsp-inline-completion--company-restore-state nil t)
(unless (memq #'lsp-inline-completion-display company--begin-inhibit-commands)
(make-variable-buffer-local 'company--begin-inhibit-commands)
(push #'lsp-inline-completion-display company--begin-inhibit-commands))
(setq-local company--begin-inhibit-commands
(cons #'lsp-inline-completion-display company--begin-inhibit-commands)))
(when (and lsp-inline-completion-mode-inhibit-when-company-active
(not (memq #'lsp-inline-completion--company-active-p lsp-inline-completion-inhibit-predicates)))
(make-variable-buffer-local 'lsp-inline-completion-inhibit-predicates)
(push #'lsp-inline-completion--company-active-p lsp-inline-completion-inhibit-predicates)))
(setq-local lsp-inline-completion-inhibit-predicates
(cons #'lsp-inline-completion--company-active-p lsp-inline-completion-inhibit-predicates))))

(t
(remove-hook 'lsp-inline-completion-before-show-hook #'lsp-inline-completion--company-save-state-and-hide t)
Expand Down

0 comments on commit e20df27

Please sign in to comment.