;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\302\303\304\305\306\307\310\301\311\312& \210\313\314\315\304#\210\316\211\2039\211@\314N\2032\315N\2042\317\315\314N#\210A\266\202\202\210\320\314\315\321#\210\322\315\323\324\325DD\326\310\303\327\330&\210\322\331\323\324\332DD\333\310\303\327\330&\210\322\334\323\324\335DD\336\310\303\327\330&\210\322\337\323\324\340DD\341\310\303\327\330&\210\322\342\323\324\343DD\344\310\303\327\330&\210\345\346\347\350\310\303%\210\345\351\352\353\310\303%\210\345\354\355\356\310\303%\210\345\357\360\361\310\303%\210\345\362\363\364\310\303%\210\345\365\366\367\310\303%\210\345\370\371\372\310\303%\210\345\373\374\372\310\303%\210\345\375\376\377\310\303%\210\345\201@\201A\201B\310\303%\210\345\201C\201D\201E\310\303%\210\345\362\201F\201G\310\303%\210\345\201H\201I\201J\310\303%\210\345\201K\201L\201M\310\303%\210\345\201N\201O\201P\310\303%\210\345\201Q\201R\201S\310\303%\210\345\201T\201U\201V\310\303%\210\345\201W\201X\201Y\310\303%\210\345\201Z\201[\201\\\310\303%\210\345\201]\201^\201_\310\303%\210\345\201`\201a\201b\310\303%\210\345\201c\201d\201e\310\303%\210\345\351\201f\201g\310\303%\210\345\201h\201i\201j\310\303%\210\345\201k\201l\201m\310\303%\210\345\201n\201o\350\310\303%\207" [require lsp-mode custom-declare-group lsp-semantic-tokens nil "LSP support for semantic-tokens." :prefix "lsp-semantic-tokens-" :group :tag "LSP Semantic tokens" defvaralias lsp-semantic-highlighting-warn-on-missing-face lsp-semantic-tokens-warn-on-missing-face (saved-value saved-variable-comment) put make-obsolete-variable "lsp-mode 7.1" custom-declare-variable funcall function #[0 "\300\207" [nil] 1] "Warning on missing face for token type/modifier.\nWhen non-nil, this option will emit a warning any time a token\nor modifier type returned by a language server has no face associated with it." :type boolean lsp-semantic-tokens-apply-modifiers #[0 "\300\207" [nil] 1] "Whether semantic tokens should take token modifiers into account." lsp-semantic-tokens-allow-ranged-requests #[0 "\300\207" [t] 1] "Whether to use ranged semantic token requests when available.\n\nNote that even when this is set to t, delta requests will\nbe preferred whenever possible, unless\n`lsp-semantic-tokens-allow-delta-requests' is false." lsp-semantic-tokens-allow-delta-requests #[0 "\300\207" [t] 1] "Whether to use semantic token delta requests when available.\n\nWhen supported by the language server, delta requests are always\npreferred over both full and ranged token requests." lsp-semantic-tokens-honor-refresh-requests #[0 "\300\207" [nil] 1] "Whether to honor semanticTokens/refresh requests.\n\nWhen set to nil, refresh requests will be silently discarded.\nWhen set to t, semantic tokens will be re-requested for all buffers\nassociated with the requesting language server." custom-declare-face lsp-face-semhl-constant ((t :inherit font-lock-constant-face)) "Face used for semantic highlighting scopes matching constant scopes." lsp-face-semhl-variable ((t :inherit font-lock-variable-name-face)) "Face used for semantic highlighting scopes matching variable.*.\nUnless overridden by a more specific face association." lsp-face-semhl-function ((t :inherit font-lock-function-name-face)) "Face used for semantic highlighting scopes matching entity.name.function.*.\nUnless overridden by a more specific face association." lsp-face-semhl-method ((t :inherit lsp-face-semhl-function)) "Face used for semantic highlighting scopes matching entity.name.method.*.\nUnless overridden by a more specific face association." lsp-face-semhl-namespace ((t :inherit font-lock-type-face :weight bold)) "Face used for semantic highlighting scopes matching entity.name.namespace.*.\nUnless overridden by a more specific face association." lsp-face-semhl-comment ((t (:inherit font-lock-comment-face))) "Face used for comments." lsp-face-semhl-keyword ((t (:inherit font-lock-keyword-face))) "Face used for keywords." lsp-face-semhl-string ((t (:inherit font-lock-string-face))) lsp-face-semhl-number ((t (:inherit font-lock-constant-face))) "Face used for numbers." lsp-face-semhl-regexp ((t (:inherit font-lock-string-face :slant italic))) "Face used for regexps." lsp-face-semhl-operator ((t (:inherit font-lock-function-name-face))) "Face used for operators." ((t (:inherit font-lock-keyword-face))) "Face used for namespaces." lsp-face-semhl-type ((t (:inherit font-lock-type-face))) "Face used for types." lsp-face-semhl-struct ((t (:inherit font-lock-type-face))) "Face used for structs." lsp-face-semhl-class ((t (:inherit font-lock-type-face))) "Face used for classes." lsp-face-semhl-interface ((t (:inherit font-lock-type-face))) "Face used for interfaces." lsp-face-semhl-enum ((t (:inherit font-lock-type-face))) "Face used for enums." lsp-face-semhl-type-parameter ((t (:inherit font-lock-type-face))) "Face used for type parameters." lsp-face-semhl-member ((t (:inherit font-lock-variable-name-face))) "Face used for members." lsp-face-semhl-property ((t (:inherit font-lock-variable-name-face))) "Face used for properties." lsp-face-semhl-event ((t (:inherit font-lock-variable-name-face))) "Face used for event properties." lsp-face-semhl-macro ((t (:inherit font-lock-preprocessor-face))) "Face used for macros." ((t (:inherit font-lock-variable-name-face))) "Face used for variables." lsp-face-semhl-parameter ((t (:inherit font-lock-variable-name-face))) "Face used for parameters." lsp-face-semhl-label ((t (:inherit font-lock-comment-face))) "Face used for labels." lsp-face-semhl-deprecated ((t :strike-through t))] 10) #@35 Faces to use for semantic tokens. (defvar lsp-semantic-token-faces '(("comment" . lsp-face-semhl-comment) ("keyword" . lsp-face-semhl-keyword) ("string" . lsp-face-semhl-string) ("number" . lsp-face-semhl-number) ("regexp" . lsp-face-semhl-regexp) ("operator" . lsp-face-semhl-operator) ("namespace" . lsp-face-semhl-namespace) ("type" . lsp-face-semhl-type) ("struct" . lsp-face-semhl-struct) ("class" . lsp-face-semhl-class) ("interface" . lsp-face-semhl-interface) ("enum" . lsp-face-semhl-enum) ("typeParameter" . lsp-face-semhl-type-parameter) ("function" . lsp-face-semhl-function) ("method" . lsp-face-semhl-method) ("member" . lsp-face-semhl-member) ("property" . lsp-face-semhl-property) ("event" . lsp-face-semhl-event) ("macro" . lsp-face-semhl-macro) ("variable" . lsp-face-semhl-variable) ("parameter" . lsp-face-semhl-parameter) ("label" . lsp-face-semhl-label) ("enumConstant" . lsp-face-semhl-constant) ("enumMember" . lsp-face-semhl-constant) ("dependent" . lsp-face-semhl-type) ("concept" . lsp-face-semhl-interface)) (#$ . 5702)) #@128 Semantic tokens modifier faces. Faces to use for semantic token modifiers if `lsp-semantic-tokens-apply-modifiers' is non-nil. (defvar lsp-semantic-token-modifier-faces '(("declaration" . lsp-face-semhl-interface) ("deprecated" . lsp-face-semhl-deprecated) ("readonly" . lsp-face-semhl-constant)) (#$ . 6758)) (defvar lsp-semantic-tokens-capabilities (byte-code "\303\304\305\306\203\307\310\311\312 \"\"\202\313B\314\307\310\311\312\n\"\"B\315BBBBBC\207" [lsp-semantic-tokens-apply-modifiers lsp-semantic-token-modifier-faces lsp-semantic-token-faces semanticTokens (dynamicRegistration . t) (requests (range . t) (full . t)) tokenModifiers apply vector mapcar car [] tokenTypes ((formats . ["relative"]))] 10)) (defvar lsp--semantic-tokens-idle-timer nil) #@202 Previously returned token set. When non-nil, `lsp--semantic-tokens-cache' should adhere to the following lsp-interface: `(_SemanticTokensCache (:_documentVersion :_ranged) (:response :_region))'. (defvar lsp--semantic-tokens-cache nil (#$ . 7528)) (make-variable-buffer-local 'lsp--semantic-tokens-cache) #@59 Set key K of `lsp--semantic-tokens-cache' to V. (fn K V) (defalias 'lsp--semantic-tokens-putcache #[514 "\301#\211\207" [lsp--semantic-tokens-cache plist-put] 6 (#$ . 7844)]) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put lsp--semantic-tokens-putcache speed -1 put byte-optimizer byte-compile-inline-expand] 5) (defvar lsp--semantic-tokens-teardown nil nil) (make-variable-buffer-local 'lsp--semantic-tokens-teardown) #@219 Request full token set after an idle timeout of `lsp-idle-delay'. If FONTIFY-IMMEDIATELY is non-nil, fontification will be performed immediately once the corresponding response is received. (fn FONTIFY-IMMEDIATELY) (defalias 'lsp--semantic-tokens-request-full-token-set-when-idle #[257 "\203\302!\210p\303 \304\305\306##\211\207" [lsp--semantic-tokens-idle-timer lsp-idle-delay cancel-timer run-with-idle-timer nil make-closure #[0 "\302\301!\205r\301q\210\303\304\300\")\207" [V0 V1 buffer-live-p lsp--semantic-tokens-request nil] 3]] 9 (#$ . 8293)]) #@65 Handle RESPONSE to semanticTokens/range request. (fn RESPONSE) (defalias 'lsp--semantic-tokens-ingest-range-response #[257 "\301\302#\211\266\303\304\302#\211\266\305\306!\207" [lsp--semantic-tokens-cache :response plist-put :_ranged t lsp--semantic-tokens-request-full-token-set-when-idle nil] 7 (#$ . 8865)]) #@64 Handle RESPONSE to semanticTokens/full request. (fn RESPONSE) (defalias 'lsp--semantic-tokens-ingest-full-response #[257 "\301\302#\211\266\303\304\302#\211\207" [lsp--semantic-tokens-cache :response plist-put :_ranged nil] 7 (#$ . 9194)]) #@80 Apply EDITS obtained from full/delta request to OLD-DATA. (fn OLD-DATA EDITS) (defalias 'lsp--semantic-tokens-apply-delta-edits #[514 "G\300\301\302\301T\211\262\203FGW\203FH\262\303\304\"W\203\303\304\"OB\262\303\305\"B\262\303\304\"\303\306\"\\\262\202OB\266\204\307\310\237\"\207" [0 nil -1 lsp-get :start :data :deleteCount apply vconcat] 13 (#$ . 9451)]) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put lsp--semantic-tokens-apply-delta-edits speed -1 put byte-optimizer byte-compile-inline-expand] 5) #@70 Handle RESPONSE to semanticTokens/full/delta request. (fn RESPONSE) (defalias 'lsp--semantic-tokens-ingest-full/delta-response #[257 "\301\302\"\203\217\303\304\"\301\305\"\262\262\211\205\216\304\306\305\301\302\"G\307\310\311\310T\211\262\203hGW\203hH\262\301\312\"W\203)\301\312\"OB\262\301\305\"B\262\301\312\"\301\313\"\\\262\202)OB\266\204\314\315\237\"\266\205#\316#\211\266\317\310\316#\211\266\202\207\320!\207" [lsp--semantic-tokens-cache lsp-get :edits plist-get :response :data lsp-put 0 nil -1 :start :deleteCount apply vconcat plist-put :_ranged lsp--semantic-tokens-ingest-full-response] 19 (#$ . 10018)]) #@647 Send semantic tokens request to the language server. A full/delta request will be sent if delta requests are supported by the language server, allowed via `lsp-semantic-tokens-allow-delta-requests', and if a full set of tokens had previously been received. Otherwise, a ranged request will be dispatched if REGION is non-nil, ranged requests are supported by the language server, and allowed via `lsp-semantic-tokens-allow-delta-requests'. In all other cases, a full tokens request will be dispatched. If FONTIFY-IMMEDIATELY is non-nil, fontification will be performed immediately upon receiving the response. (fn REGION FONTIFY-IMMEDIATELY) (defalias 'lsp--semantic-tokens-request #[514 "\304\305\306 D\307C\203G\310\311!\203G \312\313\"\314\315\"\205)\314\316\"\205)\314\317\"?\262\262\203G\320\262\211\321\240\210\322\323\314\312 \313\"\315\"#\262\202q\n\203m\203m\310\324!\203m\325\262\322\326\327@ A\"#\262\211\330\240\210\202q\211\331\240\210 \203y\332 !\210\333\334\335#\336\337\340\341\342\343\344\345 \"& \207" [lsp-semantic-tokens-allow-delta-requests lsp--semantic-tokens-cache lsp-semantic-tokens-allow-ranged-requests lsp--semantic-tokens-idle-timer "textDocument/semanticTokens/full" :textDocument lsp--text-document-identifier nil lsp-feature\? "textDocument/semanticTokensFull/Delta" plist-get :response lsp-get :resultId :data :_ranged "textDocument/semanticTokens/full/delta" lsp--semantic-tokens-ingest-full/delta-response plist-put :previousResultId "textDocument/semanticTokensRangeProvider" "textDocument/semanticTokens/range" :range lsp--region-to-range lsp--semantic-tokens-ingest-range-response lsp--semantic-tokens-ingest-full-response cancel-timer lsp-request-async make-closure #[257 "\304\n\305 #\211\266\301\242!\210\300\205\306 \207" [V0 V1 lsp--cur-version lsp--semantic-tokens-cache :_documentVersion plist-put font-lock-flush] 7 "\n\n(fn RESPONSE)"] :error-handler #[128 "\300\301!\207" [lsp--semantic-tokens-request-full-token-set-when-idle t] 3 "\n\n(fn &rest _)"] :mode tick :cancel-token format "semantic-tokens-%s" lsp--buffer-uri] 17 (#$ . 10703)]) #@369 Apply fonts to retrieved semantic tokens. OLD-FONTIFY-REGION is the underlying region fontification function, e.g., `font-lock-fontify-region'. BEG-ORIG and END-ORIG deliminate the requested fontification region and maybe modified by OLD-FONTIFY-REGION. LOUDLY will be forwarded to OLD-FONTIFY-REGION as-is. (fn OLD-FONTIFY-REGION BEG-ORIG END-ORIG &optional LOUDLY) (defalias 'lsp-semantic-tokens--fontify #[1027 "\306\307\" \205\f\306\310\"\311\211\211\311=\204$\n\311=\204$\312\n\313\"\311=\203.#\207 \312\n\314\"U\2049\315\207#\262A@^\262AA]\262\316\317\312\n\313\"\320\"\321GS\322\311\321\311\211\211\211\211\211\323 \324\325\"\216\212\214~\210b\210\326 b\210\327 \262\330 \316\211&\316'\324\331\"\216b\210\332 b\210\327 \262Zy\210S  X\203\307HW\203\307\211HZ\262 \333\\\262\202\243Z\262\f\210\nZy\210`\262\f\f\311\211X\203\216H\262 \321U\204 y\210`\262 \321\262 \\\262\fTH\\\262 \334\\HH\262\f\n \\\262\335\\H\\\262 \2038\336\337$\210\321GSX\203nH\203g\340\341\\H\342\322\"\"\321V\203g\343\n\nH#\210T\262\202=\266 V\203\202\311\262\311\211\262\202\203\316\203\216\333\\\262\202\336\266,\210+\210)\266\f\312\n\344\"\211\203\253\345@]A^BB\207\345BB\207" [lsp--buffer-workspaces lsp-semantic-tokens-apply-modifiers lsp--semantic-tokens-cache lsp--cur-version inhibit-field-text-motion buffer-undo-list seq-some lsp--workspace-semantic-tokens-faces lsp--workspace-semantic-tokens-modifier-faces nil plist-get :response :_documentVersion (jit-lock-bounds 0 . 0) t lsp-get :data 0 1 save-mark-and-excursion--save make-closure #[0 "\301\300!\207" [V0 save-mark-and-excursion--restore] 2] line-beginning-position line-number-at-pos buffer-modified-p #[0 "\300?\205\301\302!\207" [V0 restore-buffer-modified-p nil] 2] line-end-position 5 3 2 put-text-property face logand 4 lsh add-face-text-property :_region jit-lock-bounds inhibit-read-only inhibit-modification-hooks] 35 (#$ . 12844)]) #@33 Request semantic-tokens update. (defalias 'lsp-semantic-tokens--request-update #[0 "\300\301 \302 B\303\"\207" [lsp--semantic-tokens-request window-start window-end t] 3 (#$ . 14900)]) #@115 Return plist of token-types and token-modifiers defined by WORKSPACE, or nil if none are defined. (fn WORKSPACE) (defalias 'lsp--semantic-tokens-as-defined-by-workspace #[257 "\302\303!\211\205\304!>\204\305\306\302D\"\210\211\307H\262\2062\310\304! >\204.\305\306\311D\"\210\312H!\211\205E\313\314\"\315\316!\317\320!F\262\207" [cl-struct-lsp--registered-capability-tags cl-struct-lsp--workspace-tags lsp--registered-capability "textDocument/semanticTokens" type-of signal wrong-type-argument 3 lsp:server-capabilities-semantic-tokens-provider\? lsp--workspace 2 gethash "legend" :token-types lsp:semantic-tokens-legend-token-types :token-modifiers lsp:semantic-tokens-legend-token-modifiers] 8 (#$ . 15092)]) #@88 Suggest face overrides that best match the faces chosen by `font-lock-fontify-region'. (defalias 'lsp-semantic-tokens-suggest-overrides #[0 "\303\304\"\211\205B\305\306\"\211\205@\305\307\"\211\205>\310\311\312\313 D\"\314\315\316\"\317\211\n\317\211\214\212~\210\320ed\314#\210\321 \322\323\"\216\212\214~\210eb\210\324GSX\203\271H\262\324U\204]y\210THu\210\325`\326\"\262\203\261<\203w\202yC\324\317\211\203\257\211A\262\242\262\262T\262 \327\\HB\211\f\235\203\244 \202\250\211\fB\262\262 \202|\266\330\\\262\202H\266\331 \210+\210*\332\333\334!!\210\335c\210\336\337\"\324\317\211\2037\211A\262\242\262\262T\262\211\324U\203\360\335\202\361\340c\210\341\342 @H\"c\210\343\344A\"\324\317\211\2032\211A\262\242\262\262T\262\211\324U\203'\341\345\346!\"\202-\341\347\346!\"c\210\202\266\202\323\266\350c)\266\206\262\262\207" [lsp--buffer-workspaces inhibit-field-text-motion lsp--semantic-tokens-cache -some lsp--semantic-tokens-as-defined-by-workspace plist-get :token-types :token-modifiers lsp-request "textDocument/semanticTokens/full" :textDocument lsp--text-document-identifier t lsp-get :data nil font-lock-fontify-region save-mark-and-excursion--save make-closure #[0 "\301\300!\207" [V0 save-mark-and-excursion--restore] 2] 0 get-text-property face 3 5 font-lock-flush switch-to-buffer get-buffer-create "*Suggested Overrides*" "(" -group-by car "\n (" format "%s . " mapcar cdr "%s)" prin1-to-string " ; Alternative: %s" ")"] 21 (#$ . 15828) nil]) #@110 Initialize the buffer for semantic tokens. IS-RANGE-PROVIDER is non-nil when server supports range requests. (defalias 'lsp--semantic-tokens-initialize-buffer #[0 "\303>\203 \211\202\303B\304\211\305\306\307\310B\311\304$\210\312\313\314\304\315$\210\314 \210\316\317\"\211\207" [font-lock-extend-region-functions lsp--semantic-tokens-cache lsp--semantic-tokens-teardown font-lock-extend-region-wholelines nil advice--add-function :around #[0 "\300\301!\207" [advice--buffer-local font-lock-fontify-region-function] 2] #[257 "\300\301\"\207" [advice--set-buffer-local font-lock-fontify-region-function] 4 "\n\n(fn GV--VAL)"] lsp-semantic-tokens--fontify add-hook lsp-on-change-hook lsp-semantic-tokens--request-update t make-closure #[0 "\300\n\203\f\304\n!\210\305\305\306\307\310!\311\"\211\307\310!=\204!\312\310\"\210\210\313\314\315\316#\207" [V0 font-lock-extend-region-functions lsp--semantic-tokens-idle-timer lsp--semantic-tokens-cache cancel-timer nil advice--remove-function advice--buffer-local font-lock-fontify-region-function lsp-semantic-tokens--fontify advice--set-buffer-local remove-hook lsp-on-change-hook lsp-semantic-tokens--request-update t] 4]] 7 (#$ . 17389)]) #@105 Build map of FACES for IDENTIFIERS using CATEGORY and VARNAME. (fn IDENTIFIERS FACES CATEGORY VARNAME) (defalias 'lsp--semantic-tokens-build-face-map #[1028 "\300\301\302\303\304$\"\"\207" [apply vector mapcar make-closure #[257 "\304\300\"A \203\211\204\305\306\301\302$\210\207" [V0 V1 V2 lsp-semantic-tokens-warn-on-missing-face assoc lsp-warn "No face has been associated to the %s '%s': consider adding a corresponding definition to %s"] 7 "\n\n(fn ID)"]] 12 (#$ . 18599)]) #@63 Replace alist A values with B ones where available. (fn A B) (defalias 'lsp-semantic-tokens--replace-alist-values #[514 "\300\301\302\"\"\207" [-map make-closure #[257 "\211\211A\262\242\301\300\302\303%B\207" [V0 alist-get nil string=] 11 "\n\n(fn INPUT0)"]] 6 (#$ . 19099)]) #@63 Return the semantic token type faces for CLIENT. (fn CLIENT) (defalias 'lsp-semantic-tokens--type-faces-for #[257 "\302\303\304! >\204\305\306\307D\"\210\310H\311\"\"\207" [lsp-semantic-token-faces cl-struct-lsp--client-tags lsp-semantic-tokens--replace-alist-values plist-get type-of signal wrong-type-argument lsp--client 18 :types] 8 (#$ . 19391)]) #@63 Return the semantic token type faces for CLIENT. (fn CLIENT) (defalias 'lsp-semantic-tokens--modifier-faces-for #[257 "\302\303\304! >\204\305\306\307D\"\210\310H\311\"\"\207" [lsp-semantic-token-modifier-faces cl-struct-lsp--client-tags lsp-semantic-tokens--replace-alist-values plist-get type-of signal wrong-type-argument lsp--client 18 :modifiers] 8 (#$ . 19757)]) #@108 Clear semantic tokens within all buffers of WORKSPACE, refresh in currently active buffer. (fn WORKSPACE) (defalias 'lsp--semantic-tokens-on-refresh #[257 "\211\302=\203\n\303\304!\210\205B\305! >\204\306\307\310D\"\210\211\311H\302:\203?@\262p\232rq\210\312\302\"\210)\210A\262\202!\266\302\207" [lsp-semantic-tokens-honor-refresh-requests cl-struct-lsp--workspace-tags nil cl--assertion-failed (not (eq nil workspace)) type-of signal wrong-type-argument lsp--workspace 9 lsp--semantic-tokens-request] 7 (#$ . 20141)]) #@59 Initialize semantic tokens for WORKSPACE. (fn WORKSPACE) (defalias 'lsp--semantic-tokens-initialize-workspace #[257 "\211\204\301\302!\210\303!\304!>\204\305\306\307D\"\210\310H\311\312\"\311\313\"\304!>\2047\305\306\307D\"\210\211\314\315\316!\317\320$I\266\304!>\204X\305\306\307D\"\210\211\321\315\322!\323\324$I\207" [cl-struct-lsp--workspace-tags cl--assertion-failed workspace lsp--semantic-tokens-as-defined-by-workspace type-of signal wrong-type-argument lsp--workspace 5 plist-get :token-types :token-modifiers 10 lsp--semantic-tokens-build-face-map lsp-semantic-tokens--type-faces-for "semantic token" "lsp-semantic-token-faces" 11 lsp-semantic-tokens--modifier-faces-for "semantic token modifier" "lsp-semantic-token-modifier-faces"] 14 (#$ . 20686)]) #@55 Warn about deprecated semantic highlighting variable. (defalias 'lsp-semantic-tokens--warn-about-deprecated-setting #[0 "\302\300!\205\303\267\202\304\305!\210\306\211\207\304\307!\207\310\207" [lsp-semantic-highlighting lsp-semantic-tokens-enable boundp #s(hash-table size 3 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (:semantic-tokens 12 :deferred 20 :immediate 20)) lsp-warn "It seems you wish to use semanticTokens-based\n highlighting. To do so, please remove any references to the\n deprecated variable `lsp-semantic-highlighting' from your\n configuration and set `lsp-semantic-tokens-enable' to `t'\n instead." t "It seems you wish to use Theia-based semantic\n highlighting. This protocol has been superseded by the\n semanticTokens protocol specified by LSP v3.16 and is no longer\n supported by lsp-mode. If your language server provides\n semanticToken support, please set\n `lsp-semantic-tokens-enable' to `t' to use it." nil] 2 (#$ . 21490)]) #@30 Enable semantic tokens mode. (defalias 'lsp-semantic-tokens--enable #[0 "\205\301\302!\205\303 \210\304\305!\207" [lsp-semantic-tokens-enable lsp-feature\? "textDocument/semanticTokens" lsp-semantic-tokens--warn-about-deprecated-setting lsp-semantic-tokens-mode 1] 2 (#$ . 22480)]) #@31 Disable semantic tokens mode. (defalias 'lsp-semantic-tokens--disable #[0 "\300\301!\207" [lsp-semantic-tokens-mode -1] 2 (#$ . 22773)]) #@117 Non-nil if Lsp-Semantic-Tokens mode is enabled. Use the command `lsp-semantic-tokens-mode' to change this variable. (defvar lsp-semantic-tokens-mode nil (#$ . 22917)) (make-variable-buffer-local 'lsp-semantic-tokens-mode) #@605 Toggle semantic-tokens support. This is a minor mode. If called interactively, toggle the `Lsp-Semantic-Tokens mode' mode. If the prefix argument is positive, enable the mode, and if it is zero or negative, disable the mode. If called from Lisp, toggle the mode if ARG is `toggle'. Enable the mode if ARG is nil, omitted, or is a positive number. Disable the mode if ARG is a negative number. To check whether the minor mode is enabled in the current buffer, evaluate `lsp-semantic-tokens-mode'. The mode's hook is called both when the mode is enabled and when it is disabled. (fn &optional ARG) (defalias 'lsp-semantic-tokens-mode #[256 "\305 \306=\203 ?\202\247\203\307W\203\310\202\311\312\301!\2031\313\300 \"\2031\300 B\203P\314\315\316\310\311$\210\314\317\320\310\311$\210\321\322\323\324!\"\210\325 \210\202l\326\315\316\311#\210\326\317\320\311#\210\n\203c\n \210\327 \210\310\211\310\330\331\203v\332\202w\333\"\210\334\335!\203\231\305 \203\213\211\305 \232\203\231\336\337\203\225\340\202\226\341\342#\210\210\343 \210\207" [lsp-semantic-tokens-mode local-minor-modes lsp--semantic-tokens-teardown lsp--semantic-tokens-idle-timer lsp--semantic-tokens-cache current-message toggle 1 nil t boundp delq add-hook lsp-configure-hook lsp-semantic-tokens--enable lsp-unconfigure-hook lsp-semantic-tokens--disable mapc lsp--semantic-tokens-initialize-workspace lsp--find-workspaces-for "textDocument/semanticTokens" lsp--semantic-tokens-initialize-buffer remove-hook lsp-semantic-tokens--request-update run-hooks lsp-semantic-tokens-mode-hook lsp-semantic-tokens-mode-on-hook lsp-semantic-tokens-mode-off-hook called-interactively-p any message "Lsp-Semantic-Tokens mode %sabled%s" "en" "dis" " in current buffer" force-mode-line-update] 8 (#$ . 23146) (byte-code "\203\n\301!\202 \302C\207" [current-prefix-arg prefix-numeric-value toggle] 2)]) (defvar lsp-semantic-tokens-mode-hook nil) (byte-code "\301\302N\204\f\303\301\302\304#\210\303\301\305\306#\210\303\301\307\310C#\210\311\312\310\313\300!\205#\310\211%\207" [lsp-semantic-tokens-mode-map lsp-semantic-tokens-mode-hook variable-documentation put "Hook run after entering or leaving `lsp-semantic-tokens-mode'.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" custom-type hook standard-value nil add-minor-mode lsp-semantic-tokens-mode boundp] 6) #@80 Store current token set and compare with the response to a full token request. (defalias 'lsp--semantic-tokens-verify #[0 "\302\303\"\304\305\"\262\262\302\306\"\262 \232\204 \307\310 #\207\311\312\313\314 D\315\316\"\317\320\321\322\323\324 \"&\207" [lsp--semantic-tokens-cache lsp--cur-version plist-get :response lsp-get :data :_documentVersion message "Stored documentVersion %d differs from current version %d" lsp-request-async "textDocument/semanticTokens/full" :textDocument lsp--text-document-identifier make-closure #[257 "\301\302\"\300\232\203\303\304G\"\207\303\305!\210\306\300!\210\306!\207" [V0 lsp-get :data message "New tokens (total count %d) are identical to previously held token set" "Newly returned tokens differ from old token set" print] 5 "\n\n(fn RESPONSE)"] :mode tick :cancel-token format "semantic-tokens-%s" lsp--buffer-uri] 12 (#$ . 25594) nil]) (defvar lsp-semantic-tokens--log nil nil) (make-variable-buffer-local 'lsp-semantic-tokens--log) (defvar lsp-semantic-tokens--prev-response nil nil) (make-variable-buffer-local 'lsp-semantic-tokens--prev-response) #@40 Log buffer contents for TAG. (fn TAG) (defalias 'lsp-semantic-tokens--log-buffer-contents #[257 "\214\212~\210\302\303ed{\304\257 B\211*\207" [lsp-semantic-tokens--prev-response lsp-semantic-tokens--log :tag :buffer-contents :prev-response] 7 (#$ . 26712)]) #@130 Enable logging of intermediate fontification states. This is a debugging tool, and may incur significant performance penalties. (defalias 'lsp-semantic-tokens-enable-log #[0 "\301\302\303\304\305\301$\210\306\303\301\"\210\302\307\310\311\301$\210\306\307\301\"\210\302\312\313\311\301$\210\306\312\301\"\210\302\314\315\311\301$\210\306\314\301\"\210\314\207" [lsp-semantic-tokens--log nil ad-add-advice lsp-semantic-tokens--fontify (advice-tokens-fontify nil t (advice lambda nil (lsp-semantic-tokens--log-buffer-contents 'before) (let ((result ad-do-it)) (lsp-semantic-tokens--log-buffer-contents 'after) result))) around ad-activate lsp--semantic-tokens-ingest-full/delta-response (log-delta-response nil t (advice lambda (response) (setq lsp-semantic-tokens--prev-response `(:request-type "delta" :response ,response :version ,lsp--cur-version)))) before lsp--semantic-tokens-ingest-full-response (log-full-response nil t (advice lambda (response) (setq lsp-semantic-tokens--prev-response `(:request-type "full" :response ,response :version ,lsp--cur-version)))) lsp--semantic-tokens-ingest-range-response (log-range-response nil t (advice lambda (response) (setq lsp-semantic-tokens--prev-response `(:request-type "range" :response ,response :version ,lsp--cur-version))))] 5 (#$ . 26982)]) #@55 Disable logging of intermediate fontification states. (defalias 'lsp-semantic-tokens-disable-log #[0 "\300\301!\210\300\302!\210\300\303!\210\300\304!\207" [ad-unadvise lsp-semantic-tokens--fontify lsp--semantic-tokens-ingest-full/delta-response lsp--semantic-tokens-ingest-full-response lsp--semantic-tokens-ingest-range-response] 2 (#$ . 28287)]) #@75 Write HTML-formatted snapshots of previous fontification results to /tmp. (defalias 'lsp-semantic-tokens-export-log #[0 "\301\302!\210\303\304\305\"\306\307\310\"\311G#\312!\210\313!\311\314\211\203\273\211A\262\242\262\262T\262\315\316\"\315\317\"\315\320\"\314\321\246\311U\203^\314\247\203S@Y\205X\322#\266\323\324!\210\325!\203\206\326\327\330\"r\211q\210\331\332\"\216\333!c\210\334\303\f\307\335\n\336\245\"\"!\210*\210\326\327\330\"r\211q\210\331\337\"\216c\210\340 \262rq\210\341 \210\334\303\f\307\342\n\336\245\n#\"!\210+\210\343!\266\202\266\344!\207" [lsp-semantic-tokens--log require htmlize f-join "/tmp" "semantic-token-snapshots" make-progress-reporter format "Writing buffer snapshots to %s..." 0 f-mkdir reverse nil plist-get :tag :buffer-contents :prev-response 5 progress-reporter-do-update sit-for 0.01 cl-evenp generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] prin1-to-string write-file "parameters_%d.el" 2 #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] htmlize-buffer fundamental-mode "buffer_%d_%s.html" kill-buffer progress-reporter-done] 18 (#$ . 28642)]) (defconst lsp-semantic-tokens-plist-value-when-compiled nil) (provide 'lsp-semantic-tokens)