emacs: remove lsp-booster
1 file changed, 0 insertions(+), 37 deletions(-)
changed files
M user/settings/emacs/init.el → user/settings/emacs/init.el
@@ -1224,12 +1224,6 @@ #'tempel-expand #'cape-file)))) (add-hook 'eglot-managed-mode-hook #'my/eglot-capf))) -(use-package eglot-booster - :after eglot - :config (progn - (eglot-booster-mode +1) - (setq eglot-booster-io-only t))) - (use-package eglot-tempel :after eglot :config (progn@@ -1257,37 +1251,6 @@ lsp-modeline-diagnostics-enable nil lsp-completion-provider :none ; value `:capf' is actually for company :( lsp-diagnostics-provider t ; this means prefer flymake over flycheck, why‽ ) - - (defun lsp-booster--advice-json-parse (old-fn &rest args) - "Try to parse bytecode instead of json." - (or - (when (equal (following-char) ?#) - (let ((bytecode (read (current-buffer)))) - (when (byte-code-function-p bytecode) - (funcall bytecode)))) - (apply old-fn args))) - (advice-add (if (progn (require 'json) - (fboundp 'json-parse-buffer)) - 'json-parse-buffer - 'json-read) - :around - #'lsp-booster--advice-json-parse) - - (defun lsp-booster--advice-final-command (old-fn cmd &optional test?) - "Prepend emacs-lsp-booster command to lsp CMD." - (let ((orig-result (funcall old-fn cmd test?))) - (if (and (not test?) ;; for check lsp-server-present? - (not (file-remote-p default-directory)) ;; see lsp-resolve-final-command, it would add extra shell wrapper - lsp-use-plists - (not (functionp 'json-rpc-connection)) ;; native json-rpc - (executable-find "emacs-lsp-booster")) - (progn - (when-let ((command-from-exec-path (executable-find (car orig-result)))) ;; resolve command from exec-path (in case not found in $PATH) - (setcar orig-result command-from-exec-path)) - (message "Using emacs-lsp-booster for %s!" orig-result) - (cons "emacs-lsp-booster" (cons "--disable-bytecode" (cons "--" orig-result)))) - orig-result))) - (advice-add 'lsp-resolve-final-command :around #'lsp-booster--advice-final-command) (defun my/lsp-mode-setup-completion () (setf (alist-get 'styles (alist-get 'lsp-capf completion-category-defaults))