;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\207" [require company cl-lib] 2) (defvar company-tng--overlay nil nil) (make-variable-buffer-local 'company-tng--overlay) #@230 When the user changes the selection at least once, this frontend will display the candidate in the buffer as if it's already there and any key outside of `company-active-map' will confirm the selection and finish the completion. (defalias 'company-tng-frontend #[(command) "\306\267\202w\307``\"\211\310 \311\312#\210)\313\314\315\316#\210\313\317\320\321#\207\n \f8 G\322 `Z`#\210\310 \323U\203A\324\202B\325 \205I#+\207\n\203X\326\n!\210\327\302!\210\330\314\316\"\210\330\317\321\"\207 \205v\331\332 !?\205x\333 \210\334\211!\207\335\207" [command ov company-tng--overlay company-selection company-candidates company-prefix #s(hash-table size 4 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (show 6 update 32 hide 76 pre-command 98)) make-overlay overlay-put priority 2 advice-add company-select-next :before-until company-tng--allow-unselected company-fill-propertize :filter-args company-tng--adjust-tooltip-highlight move-overlay 0 after-string display delete-overlay kill-local-variable advice-remove company--company-command-p this-command-keys company--unread-this-command-keys company-complete-selection nil prefix selected company-selection-changed this-command] 5 (#$ . 245)]) #@58 Applies the default configuration to enable company-tng. (defalias 'company-tng-configure-default #[nil "\306\307\306\211\306\211\310\311\312\313#\210\314\315\306#\210\314\316\306#\210\314\317\320#\210\314\321\320#\210\314\322\323#\210\314\324\323#)\207" [company-require-match company-frontends company-clang-insert-arguments company-semantic-insert-arguments company-rtags-insert-arguments lsp-enable-snippet nil (company-tng-frontend company-pseudo-tooltip-frontend company-echo-metadata-frontend) advice-add eglot--snippet-expansion-fn :override ignore define-key [return] " " [tab] company-select-next " " [backtab] company-select-previous [33554441] company-active-map keymap] 5 (#$ . 1482)]) #@679 Advice `company-select-next' to allow for an 'unselected' state. Unselected means that no user interaction took place on the completion candidates and it's marked by setting `company-selection-changed' to nil. This advice will call the underlying `company-select-next' unless we need to transition to or from an unselected state. Possible state transitions: - (arg > 0) unselected -> first candidate selected - (arg < 0) first candidate selected -> unselected - (arg < 0 wrap-round) unselected -> last candidate selected - (arg < 0 no wrap-round) unselected -> unselected There is no need to advice `company-select-previous' because it calls `company-select-next' internally. (defalias 'company-tng--allow-unselected #[(&optional arg) "\203\n\303V\203 ?\2058\304\206\305S\306\"\210\307\207\303W\2058 \2058\n\\\303W\2058\304\303!\210\310\311\312!\210\307\207" [arg company-selection-changed company-selection 0 company-set-selection 1 force-update t nil company-call-frontends update] 3 (#$ . 2210)]) #@133 Prevent the tooltip from highlighting the current selection if it wasn't made explicitly (i.e. `company-selection-changed' is true) (defalias 'company-tng--adjust-tooltip-highlight #[(args) "\204 \303 \233\211\304\240\210) \207" [company-selection-changed args #1=#:c 3 nil] 3 (#$ . 3234)]) (provide 'company-tng)