diff --git a/lsp-mode.el b/lsp-mode.el index b4d951b3b6..73eaca3588 100644 --- a/lsp-mode.el +++ b/lsp-mode.el @@ -547,7 +547,12 @@ If this is set to nil, `eldoc' will show only the symbol information." :type 'boolean :group 'lsp-mode) -(defcustom lsp-references-exclude-definition nil +(define-obsolete-variable-alias + 'lsp-references-exclude-definition + 'lsp-references-exclude-declaration + "9.0.1") + +(defcustom lsp-references-exclude-declaration nil "If non-nil, exclude declarations when finding references." :type 'boolean :group 'lsp-mode) @@ -6472,7 +6477,7 @@ perform the request synchronously." (goto-char (cl-rest (or (assoc identifier lsp--symbols-cache) (user-error "Unable to find symbol %s" identifier))))) (lsp--locations-to-xref-items (lsp-request "textDocument/references" - (lsp--make-reference-params nil lsp-references-exclude-definition))))) + (lsp--make-reference-params nil lsp-references-exclude-declaration))))) (cl-defmethod xref-backend-apropos ((_backend (eql xref-lsp)) pattern) (seq-map #'lsp--symbol-information-to-xref @@ -6653,7 +6658,7 @@ REFERENCES? t when METHOD returns references." "Find references of the symbol under point." (interactive "P") (lsp-find-locations "textDocument/references" - (list :context `(:includeDeclaration ,(lsp-json-bool (not (or exclude-declaration lsp-references-exclude-definition))))) + (list :context `(:includeDeclaration ,(lsp-json-bool (not (or exclude-declaration lsp-references-exclude-declaration))))) :display-action display-action :references? t))