;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\302\303\304\305#\210\306\211\203,\211@\303N\203%\304N\204%\307\304\303N#\210A\266\202\202 \210\310\303\304\311#\210\312\304\313\314\315DD\316\317\320\321\301\322\323& \210\312\324\313\314\325DD\326\317\327\321\301\322\330& \210\312\331\313\314\332DD\333\317\327\321\301\322\334& \210\312\335\313\314\336DD\337\317\327\321\301&\210\312\340\313\314\341DD\342\317\327\321\301\322\343& \210\312\344\313\314\345DD\346\317\327\321\301\322\347& \207" [require lsp-mode defvaralias lsp-prefer-capf lsp-completion-provider nil (saved-value saved-variable-comment) put make-obsolete-variable "lsp-mode 7.0.1" custom-declare-variable funcall function #[0 "\300\207" [:capf] 1] "The completion backend provider." :type (choice (const :tag "Prefer company-capf" :capf) (const :tag "Prefer company-capf" t) (const :tag "None" nil) (const :tag "None" :none)) :group :package-version (lsp-mode . "7.0.1") lsp-completion-enable-additional-text-edit #[0 "\300\207" [t] 1] "Whether or not to apply additional text edit when performing completion.\n\nIf set to non-nil, `lsp-mode' will apply additional text edits\nfrom the server. Otherwise, the additional text edits are\nignored." boolean (lsp-mode . "6.3.2") lsp-completion-show-kind #[0 "\300\207" [t] 1] "Whether or not to show kind of completion candidates." (lsp-mode . "7.0.1") lsp-completion-show-detail #[0 "\300\207" [t] 1] "Whether or not to show detail of completion candidates." lsp-completion-no-cache #[0 "\300\207" [nil] 1] "Whether or not caching the returned completions from server." (lsp-mode . "7.0.1") lsp-completion-filter-on-incomplete #[0 "\300\207" [t] 1] "Whether or not filter incomplete results." (lsp-mode . "7.0.1")] 10) (defconst lsp-completion--item-kind [nil "Text" "Method" "Function" "Constructor" "Field" "Variable" "Class" "Interface" "Module" "Property" "Unit" "Value" "Enum" "Keyword" "Snippet" "Color" "File" "Reference" "Folder" "EnumMember" "Constant" "Struct" "Event" "Operator" "TypeParameter"]) #@59 Dont do client-side reordering completion items when set. (defvar lsp-completion--capf-no-reordering nil (#$ . 2097)) #@70 Make completion item from lsp ITEM and PLIST. (fn ITEM &rest PLIST) (defalias 'lsp-completion--make-item #[385 "\300\301\"\300\302\"\300\303\"\300\304\"\305\306\"\305\307\"\310\206#\311\f\312\313 \314\n\315 & \207" [gethash "label" "insertText" "sortText" "_emacsStartPoint" plist-get :markers :prefix propertize lsp-completion-item lsp-sort-text lsp-completion-start-point lsp-completion-markers lsp-completion-prefix] 22 (#$ . 2221)]) #@34 Annotate ITEM detail. (fn ITEM) (defalias 'lsp-completion--annotate #[257 "\303\304\305\"\306\"\307\310\"\307\311\"\205\205\312\313\314\315#P \2053\205)\nH\211\2051\316\317\"\262P\207" [lsp-completion-show-detail lsp-completion-show-kind lsp-completion--item-kind plist-get text-properties-at 0 lsp-completion-item gethash "detail" "kind" " " s-replace " " "" format " (%s)"] 9 (#$ . 2685)]) #@109 Return trigger character if text before point match any of the TRIGGER-CHARACTERS. (fn TRIGGER-CHARACTERS) (defalias 'lsp-completion--looking-back-trigger-characterp #[257 "`\300 U?\205\f\301\302\"\207" [point-at-bol seq-some #[257 "\300`GZ`\"\232\205 \211\207" [buffer-substring-no-properties] 4 "\n\n(fn TRIGGER-CHAR)"]] 4 (#$ . 3102)]) #@188 Cached candidates for completion at point function. In the form of list (prefix prefix-pos items :lsp-items ...). When the completion is incomplete, cache contains value of `incomplete'. (defvar lsp-completion--capf-cache nil (#$ . 3454)) #@40 Clear completion caches. (fn &rest _) (defalias 'lsp-completion--capf-clear-cache #[128 "<\205\211\205 \211AA\262\211\205\211A\262\211\205\301\302\"\262\211\205(\211A@\262\211\2033\211\303\211\223\210\210\303\211\207" [lsp-completion--capf-cache plist-get :markers nil] 5 (#$ . 3699)]) #@351 Guess ITEM's prefix start point according to following heuristics: - If `textEdit' exists, use insertion range start as prefix start point. - Else, find the point before current point is longest prefix match of `insertText' or `label'. And: - The character before prefix is not word constitute Return `nil' when fails to guess prefix. (fn INPUT0) (defalias 'lsp-completion--capf-guess-prefix #[257 "\211\300\301\"\211\203\302\303\304!!!\207\300\305\"\300\306\"\211\206`\307GZ]\211\206*`Sf\310W\203a\211\204a\203Bz\311=\204Q\312\313\"\"\203Q\262T\262\206Z`Sf\262\202-\207" [gethash "textEdit" lsp--position-to-point lsp:range-start lsp:text-edit-range "label" "insertText" 1 nil 119 string-prefix-p buffer-substring-no-properties] 14 (#$ . 4010)]) #@51 Convert ITEMS into client items form. (fn ITEMS) (defalias 'lsp-completion--capf-client-items #[257 "\211\300\301\"\207" [-map #[257 "\211\300\301\"\300\302\"\300\303\"\300\304\"\305\206\306\307\310&\207" [gethash "label" "filterText" "_emacsStartPoint" "score" propertize lsp-completion-item lsp-completion-start-point lsp-completion-score] 14 "\n\n(fn INPUT0)"]] 5 (#$ . 4800)]) #@267 List all possible completions in cached ITEMS with their prefixes. We can pass LSP-ITEMS, which will be used when there's no cache. Also, additional data to attached to each candidate can be passed via PLIST. (fn ITEMS &rest PLIST &key LSP-ITEMS &allow-other-keys) (defalias 'lsp-completion--capf-filter-candidates #[385 "\304\305\"A@\3061p\307\3102k\310\307\311 \206P\312\313\314\"\203N\307C\307C\315\313\316#\n\"\266\202\n\203;\211\202?\317\320\"\312\321\322\323\324#\"\262\262\202O\"\262 =\203^\307\325\202g \203f\307\202g\211)\266\2020)0\202v\210\325\326\327!\330!?\205~\211\207" [inhibit-quit throw-on-input lsp-completion--capf-no-reordering quit-flag plist-member :lsp-items (quit) nil #1=#:input input-pending-p -map make-closure #[257 "\301\302\300#\207" [V0 apply lsp-completion--make-item] 5 "\n\n(fn ITEM)"] -keep #[257 "\302\303\304#\305\300\242\"\206\306`\"\300\307\300\242#\240\210\211\262\305\301\242\"\2064\310!\301\307\301\242#\240\210\211\262\311\"\205c\312\303\313\314\211 %\210\312\303\313\315\316 \"\206S\317\302\303\320 #\206]\321_%\210\207" [V0 V1 get-text-property 0 lsp-completion-start-point plist-get buffer-substring-no-properties plist-put lsp-completion--regex-fuz string-match put-text-property 1 match-data sort-score lsp-completion--fuz-score 1e-05 lsp-completion-score 0.001] 13 "\n\n(fn CAND)"] sort #[514 "\300\301\302#\300\301\302#V\207" [get-text-property 0 sort-score] 7 "\n\n(fn O1 O2)"] -partial get-text-property 0 lsp-completion-item t eval (ignore nil) booleanp] 14 (#$ . 5205)]) (defconst lsp-completion--kind->symbol '((1 . text) (2 . method) (3 . function) (4 . constructor) (5 . field) (6 . variable) (7 . class) (8 . interface) (9 . module) (10 . property) (11 . unit) (12 . value) (13 . enum) (14 . keyword) (15 . snippet) (16 . color) (17 . file) (18 . reference) (19 . folder) (20 . enum-member) (21 . constant) (22 . struct) (23 . event) (24 . operator) (25 . type-parameter))) #@32 Return ITEM's kind. (fn ITEM) (defalias 'lsp-completion--candidate-kind #[257 "\301\302\303\304\305#!\"\207" [lsp-completion--kind->symbol alist-get lsp:completion-item-kind\? get-text-property 0 lsp-completion-item] 7 (#$ . 7209)]) #@68 Return highlight of typed prefix inside CANDIDATE. (fn CANDIDATE) (defalias 'lsp-completion--capf-company-match #[257 "\300\301\302\303\"\304\"`\"\227\211G\303\227\211G\303\305\211\204\201W\203\201W\203]W\203]HH\232\203G\211\204@\262T\262\202V\211\203VBC\244\262\305\262T\262\202 \211\203iBC\244\262W\203s\305\262\204T\262\303\262\202\207" [buffer-substring-no-properties plist-get text-properties-at 0 lsp-completion-start-point nil] 12 (#$ . 7451)]) #@49 Get doc comment for completion ITEM. (fn ITEM) (defalias 'lsp-completion--capf-get-documentation #[257 "\300\301\302#\2042\211\211\205\300\301\303#\262\211\205\304!\262G\305\301\303%\210\305\301\302\306%\266\211\211\205<\300\301\303#\262\211\205E\307!\262\211\205N\310!\207" [get-text-property 0 lsp-completion-resolved lsp-completion-item lsp-completion--resolve put-text-property t lsp:completion-item-documentation\? lsp--render-element] 9 (#$ . 7966)]) #@83 Get completion context with provided TRIGGER-CHARACTERS. (fn TRIGGER-CHARACTERS) (defalias 'lsp-completion--capf-get-context #[257 "\304\305!\211\262\203\202 \306=\203\n\202 \307\310\311D\205%\312D\244\"\207" [lsp/completion-trigger-kind-trigger-character lsp-completion--capf-cache lsp/completion-trigger-kind-trigger-for-incomplete-completions lsp/completion-trigger-kind-invoked nil lsp-completion--looking-back-trigger-characterp incomplete apply lsp-make-completion-context :trigger-kind :trigger-character\?] 8 (#$ . 8457)]) #@37 Sort COMPLETIONS. (fn COMPLETIONS) (defalias 'lsp-completion--sort-completions #[257 "\300\301\"\207" [sort #[514 "\300\301\"\300\302\"\300\301\"\300\302\"\232\203\231\207\231\207" [gethash "sortText" "label"] 8 "\n\n(fn INPUT0 INPUT1)"]] 4 (#$ . 9010)]) #@22 Get lsp completions. (defalias 'lsp-completion-at-point #[0 "\302\303 \304\302\211\211\203v\211A\262\242\262\262\211\262\203v\305\211!>\204-\306\307\310D\"\210\311H! >\204O\306\307\312\305!>\204I\306\307\310D\"\210\311HD\"\210\305!>\204^\306\307\310D\"\210\311H\313H\211\262\204v\262\262T\262\202\266\211\262\204\206\314\315 8?\205\362\316\317\320 !!\321\322!@\211\205\270\211\212\3231\263\211Tb\210\324!\203\256\211T\262\302u\210\202\236\2110\202\265\210\302)\262\262\206\276`\302C\302C\325\326%`\325\327\"\330\331\332\333\334\335\336\212 b\210\324!\205\343\337)\340\341\342\343\344\345\346\"\257\266\205\207" [cl-struct-lsp--workspace-tags cl-struct-lsp--client-tags nil lsp-workspaces 0 type-of signal wrong-type-argument lsp--workspace 5 lsp--client 23 4 syntax-ppss lsp:completion-options-trigger-characters\? lsp:server-capabilities-completion-provider\? lsp--server-capabilities bounds-of-thing-at-point symbol (error) lsp-completion--looking-back-trigger-characterp make-closure #[0 "\303\242\203\302\242\207\f\204/ \203/ <\203/ A@\301\232\203/\306 @\307\301`\"\"\203/\310\311 AA\"\207\312\313\314\315 \316\317\300!#\"\211\203E\320!?\206I\321!?\3221\254\323)\3242\247\324\323*\325 \206\210\320!\203j\326!\202k\204v\327\330\"\203|\331!\202}\211\332\333\334\301\"\"\262\262\262+*=\203\231\323+\335\202\243+\203\242\323\202\243\211)\266\2020)0\202\263\210\335+\336\337!\340!?\205\273\211\262\301\341`\335\"D\307\301`\"\335,\342 \210\303\240\210\303\242\203\361\343!\204\361\307\301`\"\301\344!\345\323\346\347\257 \202\370\303\242?\205\370\350\302\311\303\242\203 AA@\202-\205\344!\345\346\347&\240)\207" [V0 V1 V2 V3 lsp-completion-no-cache lsp-completion--capf-cache s-prefix\? buffer-substring-no-properties apply lsp-completion--capf-filter-candidates lsp-request-while-no-input "textDocument/completion" plist-put lsp--text-document-position-params :context lsp-completion--capf-get-context lsp-completion-list\? lsp:completion-list-is-incomplete (quit) nil #1=#:input input-pending-p lsp:completion-list-items seq-some lsp:completion-item-sort-text\? lsp-completion--sort-completions -map make-closure #[257 "\301\302\303!\206\n\300#\207" [V0 lsp-put :_emacsStartPoint lsp-completion--capf-guess-prefix] 6 "\n\n(fn ITEM)"] t eval (ignore nil) booleanp copy-marker lsp-completion--capf-clear-cache seq-empty-p lsp-completion--capf-client-items :lsp-items :markers :prefix incomplete inhibit-quit throw-on-input quit-flag lsp-completion--capf-no-reordering lsp-completion-filter-on-incomplete] 14] #[771 "\211\301=\203\302\207\211\242\303=\203\304\207\211\204\300 \235@\207\211\305=\203&\300 \235\207\300 \207" [V0 metadata (metadata (category . lsp-capf) (display-sort-function . identity)) boundaries nil lambda] 5 "\n\n(fn PROBE PRED ACTION)"] :annotation-function lsp-completion--annotate :company-candidate-kind lsp-completion--candidate-kind :company-require-match never :company-prefix-length t :company-match lsp-completion--capf-company-match :company-doc-buffer #[128 "\302\300\"\301\303\304\211\203#\211A\262\242\262\262T\262!\262\202\266\207" [lsp-completion--capf-get-documentation (company-doc-buffer) apply 0 nil] 8 "\n\n(fn &rest ARGS)"] :exit-function -rpartial lsp-completion--capf-exit-fn] 24 (#$ . 9285)]) #@153 Exit function of `completion-at-point'. CANDIDATE is the selected completion item. Others: TRIGGER-CHARS (fn CANDIDATE STATUS &optional TRIGGER-CHARS) (defalias 'lsp-completion--capf-exit-fn #[770 "\305\216\306\307\"\310\311\"\310\312\"\310\313\"\310\314\"\315\316\"\315\317\"\315\320\"\315\321\"\315\322 \"\315\323\n\"\203H\324\325 \"\210c\210\326!\210\202f\204P\203f\324\325 \"\210c\210`|\210\206dc\210\232\203x\327 `{\n`\330%\210 \203\245\331\307\332#\204\211\203\220\333!\210\202\245\334 \211A\262\242@\335 \336\337\"#\266\n\203\262\340\341!\203\262\342 \210\343\303!\210\330\344\f!\205\302\345\211\266\213)\207" [lsp/insert-text-format-snippet lsp-completion-enable-additional-text-edit lsp-signature-auto-activate lsp-inhibit-lsp-hooks this-command #[0 "\300 \207" [lsp-completion--capf-clear-cache] 1] text-properties-at 0 plist-get lsp-completion-item lsp-completion-start-point lsp-completion-markers lsp-completion-prefix gethash "label" "insertText" "textEdit" "insertTextFormat" "additionalTextEdits" "keepWhitespace" apply delete-region lsp--apply-text-edit lsp--expand-snippet nil get-text-property lsp-completion-resolved lsp--apply-text-edits lsp--create-apply-text-edits-handlers lsp-completion--resolve-async make-closure #[257 "\300\301!!\207" [V0 lsp:completion-item-additional-text-edits\?] 4 "\n\n(fn RESOLVED-ITEM)"] lsp-feature\? "textDocument/signatureHelp" lsp-signature-activate make-local-variable lsp-completion--looking-back-trigger-characterp self-insert-command] 22 (#$ . 12692)]) #@74 Build a regex sequence from STR. Insert .* between each char. (fn STR) (defalias 'lsp-completion--regex-fuz #[257 "\300\301\302\301\303\304\305\"AB\304\306\"#\"\207" [apply concat cl-mapcar "" seq-map #[257 "\300\301\"\207" [format "[^%c]*"] 4 "\n\n(fn C)"] #[257 "\300\301\302\303!!\"\207" [format "\\(%s\\)" regexp-quote char-to-string] 6 "\n\n(fn C)"]] 9 (#$ . 14273)]) #@50 Case sensitiveness, can be in range of [0, inf). (defvar lsp-completion--fuz-case-sensitiveness 20 (#$ . 14660)) #@65 Calculate fuzzy score for STR with query QUERY. (fn QUERY STR) (defalias 'lsp-completion--fuz-score #[514 "\300\301\302#\206\303!\304\"\205\302 \262AA\211\205\257\211A\262\242\211\205\255G\211\205\253\301C\211\242\205\251\301C\211\242\205\247\301C\211\242\205\245\301C\211\242\205\243\305\306\n\n&\211\205\241\211\211\"\210\203\210\211 @\"\210A\262\211A\262 \242\262\211\242T\240\210\202d\211\211\"\210\301U?\205\241\307\242\242T_\310#\262\262\262\262\262\262\262\207" [get-text-property 0 match-data lsp-completion--regex-fuz string-match make-closure #[514 "\303\211\242Z\\\240\210\302U\204O\304\211\242\305\242U\203\307\202:\305\242\307U\2031\307\310\311\305\242Z\"Z\2029\310\305\242ZS\312\"T\\\300\306\242H\301H\232\203J\307\202L \\\240\210\305\240\207" [V0 V1 V2 V3 V4 V5 V6 0 expt 0.8 0.25 lsp-completion--fuz-case-sensitiveness] 9 "Update score variables given match range (A B).\n\n(fn A B)"] / 1.0] 18 (#$ . 14779)]) #@37 Resolve completion ITEM. (fn ITEM) (defalias 'lsp-completion--resolve #[257 "\3001\301\302\303!!\205\304\305\"0\202\210\202\206\211\207" [(error) lsp:completion-options-resolve-provider\? lsp--capability :completionProvider lsp-request "completionItem/resolve"] 4 (#$ . 15795)]) #@138 Resolve completion ITEM asynchronously with CALLBACK. The CLEANUP-FN will be called to cleanup. (fn ITEM CALLBACK &optional CLEANUP-FN) (defalias 'lsp-completion--resolve-async #[770 "\30012\301\302\303!!\203&\304\305\306\307#\310\306\311\"\312\313\314& \2020!\210\211\2050\211 0\207\210\315\207" [(error) lsp:completion-options-resolve-provider\? lsp--capability :completionProvider lsp-request-async "completionItem/resolve" make-closure #[257 "\300!\210\301\205\n\301 \207" [V0 V1] 3 "\n\n(fn RESULT)"] :error-handler #[257 "\300\203\300 \210\301\302!!\207" [V0 error lsp:json-error-message] 4 "\n\n(fn ERR)"] :cancel-handler :mode alive nil] 13 (#$ . 16093)]) #@32 Enable LSP completion support. (defalias 'lsp-completion--enable #[0 "\205 \301\302!\205 \303\304!\207" [lsp-completion-enable lsp-feature\? "textDocument/completion" lsp-completion-mode 1] 2 (#$ . 16784)]) #@33 Disable LSP completion support. (defalias 'lsp-completion--disable #[0 "\300\301!\207" [lsp-completion-mode -1] 2 (#$ . 17000)]) #@107 Non-nil if Lsp-Completion mode is enabled. Use the command `lsp-completion-mode' to change this variable. (defvar lsp-completion-mode nil (#$ . 17136)) (make-variable-buffer-local 'lsp-completion-mode) #@594 Toggle LSP completion support. This is a minor mode. If called interactively, toggle the `Lsp-Completion 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-completion-mode'. The mode's hook is called both when the mode is enabled and when it is disabled. (fn &optional ARG) (defalias 'lsp-completion-mode #[256 "\306 \307=\203 ?\202\247\203\310W\203\311\202\312\313\301!\2031\314\300 \"\2031\300 B\203\243\315\302!\210\311\316\302\317\311\312$\210\315\303!\210\320\303\321\"\f\322=\204\200\f\323>\203|\324\325!\203|\325\310!\210\f\203k\326 >\203o\327\330!\210\331 >\204\200\331 B\202\200\327\332!\210\313\325!\203\231\203\231\316\333\334\311\312$\210\316\335\336\311\312$\210\316\337\340\311\312$\210\202\314\341\302\317\312#\210\315\303!\210\342\343 \344\345$\341\337\340\312#\210\346\347!\203\314\341\333\350\312#\210\341\335\351\312#\210\352\353\203\326\354\202\327\355\"\210\356\357!\203\371\306 \203\353\211\306 \232\203\371\360\361\203\365\362\202\366\363\364#\210\210\365 \210\207" [lsp-completion-mode local-minor-modes completion-at-point-functions completion-category-defaults lsp-completion-provider company-backends current-message toggle 1 nil t boundp delq make-local-variable add-hook lsp-completion-at-point add-to-list (lsp-capf (styles basic)) :none (:capf nil t) fboundp company-mode company-lsp lsp--warn "`company-lsp` is not supported anymore. Using `company-capf` as the `lsp-completion-provider`." company-capf "Unable to autoconfigure company-mode." company-completion-started-hook #[128 "\301\300!\210\302\211\207" [lsp-inhibit-lsp-hooks make-local-variable t] 3 "\n\n(fn &rest _)"] company-after-completion-hook #[128 "\301 \210\302\300!\210\303\211\207" [lsp-inhibit-lsp-hooks lsp-completion--capf-clear-cache make-local-variable nil] 3 "\n\n(fn &rest _)"] lsp-unconfigure-hook lsp-completion--disable remove-hook cl-remove lsp-capf :key car featurep company #[128 "\301\300!\210\302\211\207" [lsp-inhibit-lsp-hooks make-local-variable t] 3 "\n\n(fn &rest _)"] #[128 "\301 \210\302\300!\210\303\211\207" [lsp-inhibit-lsp-hooks lsp-completion--capf-clear-cache make-local-variable nil] 3 "\n\n(fn &rest _)"] run-hooks lsp-completion-mode-hook lsp-completion-mode-on-hook lsp-completion-mode-off-hook called-interactively-p any message "Lsp-Completion mode %sabled%s" "en" "dis" " in current buffer" force-mode-line-update] 7 (#$ . 17345) (byte-code "\203\n\301!\202 \302C\207" [current-prefix-arg prefix-numeric-value toggle] 2)]) (defvar lsp-completion-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\313\314\300!\205#\310\211%\210\315\316\317\"\210\320\321!\207" [lsp-completion-mode-map lsp-completion-mode-hook variable-documentation put "Hook run after entering or leaving `lsp-completion-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-completion-mode "" boundp add-hook lsp-configure-hook #[0 "\205\n \205\n\302 \207" [lsp-auto-configure lsp-completion-enable lsp-completion--enable] 1] provide lsp-completion] 6)