File tree 3 files changed +4
-4
lines changed
3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -206,7 +206,7 @@ tokens legend."
206
206
:modifiers
207
207
,(lsp-erlang-elp--semantic-modifiers))
208
208
:server-id 'elp
209
- :custom-capabilities `((experimental . ((snippetTextEdit . ,(and lsp-enable-snippet (featurep 'yasnippet ))))))
209
+ :custom-capabilities `((experimental . ((snippetTextEdit . ,(and lsp-enable-snippet (fboundp 'yas-minor-mode ))))))
210
210
:download-server-fn (lambda (_client callback error-callback _update? )
211
211
(lsp-package-ensure 'erlang-language-platform callback error-callback))))
212
212
Original file line number Diff line number Diff line change @@ -1760,7 +1760,7 @@ https://github.com/rust-lang/rust-analyzer/blob/master/docs/dev/lsp-extensions.m
1760
1760
:semantic-tokens-faces-overrides `( :discard-default-modifiers t
1761
1761
:modifiers ,(lsp-rust-analyzer--semantic-modifiers))
1762
1762
:server-id 'rust-analyzer
1763
- :custom-capabilities `((experimental . ((snippetTextEdit . ,(and lsp-enable-snippet (featurep 'yasnippet ))))))
1763
+ :custom-capabilities `((experimental . ((snippetTextEdit . ,(and lsp-enable-snippet (fboundp 'yas-minor-mode ))))))
1764
1764
:download-server-fn (lambda (_client callback error-callback _update? )
1765
1765
(lsp-package-ensure 'rust-analyzer callback error-callback))))
1766
1766
Original file line number Diff line number Diff line change 56
56
(require 'xref)
57
57
(require 'minibuffer)
58
58
(require 'help-mode)
59
- (require 'yasnippet nil t)
60
59
(require 'lsp-protocol)
61
60
62
61
(defgroup lsp-mode nil
@@ -3680,7 +3679,7 @@ disappearing, unset all the variables related to it."
3680
3679
(resolveSupport . ((properties . ["edit" "command"])))
3681
3680
(dataSupport . t)))
3682
3681
(completion . ((completionItem . ((snippetSupport . ,(cond
3683
- ((and lsp-enable-snippet (not (featurep 'yasnippet)) t )
3682
+ ((and lsp-enable-snippet (not (fboundp 'yas-minor-mode)) )
3684
3683
(lsp--warn (concat
3685
3684
"Yasnippet is not installed, but `lsp-enable-snippet' is set to `t'. "
3686
3685
"You must either install yasnippet, or disable snippet support."))
@@ -4479,6 +4478,7 @@ from language server.")
4479
4478
"Wrapper of `yas-expand-snippet' with all of it arguments.
4480
4479
The snippet will be convert to LSP style and indent according to
4481
4480
LSP server result."
4481
+ (require 'yasnippet nil t)
4482
4482
(let* ((inhibit-field-text-motion t)
4483
4483
(yas-wrap-around-region nil)
4484
4484
(yas-indent-line 'none)
You can’t perform that action at this time.
0 commit comments