diff --git a/clients/lsp-rust.el b/clients/lsp-rust.el index 53c2e61830..2e127d09c9 100644 --- a/clients/lsp-rust.el +++ b/clients/lsp-rust.el @@ -724,6 +724,13 @@ available on a nightly build." :group 'lsp-rust-analyzer :package-version '(lsp-mode . "9.0.0")) +(defcustom lsp-rust-analyzer-assist-prefer-self nil + "Prefer to use `Self` over the type name when inserting a type (e.g. in “fill +match arms” assist)." + :type 'boolean + :group 'lsp-rust-analyzer + :package-version '(lsp-mode . "9.0.1")) + (defcustom lsp-rust-analyzer-completion-add-call-parenthesis t "Whether to add parenthesis when completing functions." :type 'boolean @@ -809,6 +816,12 @@ and field accesses with self prefixed to them when inside a method." :group 'lsp-rust-analyzer :package-version '(lsp-mode . "8.0.0")) +(defcustom lsp-rust-analyzer-completion-term-search-enable nil + "Enable term search based snippets like `Some(foo.bar().baz())`." + :type 'boolean + :group 'lsp-rust-analyzer + :package-version '(lsp-mode . "9.0.1")) + (defcustom lsp-rust-analyzer-import-enforce-granularity nil "Whether to enforce the import granularity setting for all files. If set to nil rust-analyzer will try to keep import styles consistent per file." @@ -1783,11 +1796,13 @@ https://github.com/rust-lang/rust-analyzer/blob/master/docs/dev/lsp-extensions.m :typeHints ( :enable ,(lsp-json-bool lsp-inlay-hint-enable) :hideClosureInitialization ,(lsp-json-bool lsp-rust-analyzer-hide-closure-initialization) :hideNamedConstructor ,(lsp-json-bool lsp-rust-analyzer-hide-named-constructor))) + :assist ( :preferSelf ,(lsp-json-bool lsp-rust-analyzer-assist-prefer-self)) :completion ( :addCallParenthesis ,(lsp-json-bool lsp-rust-analyzer-completion-add-call-parenthesis) :addCallArgumentSnippets ,(lsp-json-bool lsp-rust-analyzer-completion-add-call-argument-snippets) :postfix (:enable ,(lsp-json-bool lsp-rust-analyzer-completion-postfix-enable)) :autoimport (:enable ,(lsp-json-bool lsp-rust-analyzer-completion-auto-import-enable)) - :autoself (:enable ,(lsp-json-bool lsp-rust-analyzer-completion-auto-self-enable))) + :autoself (:enable ,(lsp-json-bool lsp-rust-analyzer-completion-auto-self-enable)) + :termSearch (:enable ,(lsp-json-bool lsp-rust-analyzer-completion-term-search-enable))) :callInfo (:full ,(lsp-json-bool lsp-rust-analyzer-call-info-full)) :procMacro (:enable ,(lsp-json-bool lsp-rust-analyzer-proc-macro-enable)) :rustcSource ,lsp-rust-analyzer-rustc-source