From 8865197b2f362fc5d5d449a3f312d6794016689e Mon Sep 17 00:00:00 2001 From: Tim McCarthy Date: Wed, 9 Sep 2026 13:42:24 -0700 Subject: [PATCH] Remove emacs-lsp-booster --- emacs/init.el | 30 ------------------------------ nix/flake.lock | 21 --------------------- nix/flake.nix | 6 ------ nix/modules/emacs.nix | 1 - 4 files changed, 58 deletions(-) diff --git a/emacs/init.el b/emacs/init.el index 352cc7f..e4dccac 100644 --- a/emacs/init.el +++ b/emacs/init.el @@ -916,36 +916,6 @@ EMACS-ALTERNATIVE is the Emacs equivalent (e.g., 'C-s')." (setf (alist-get 'styles (alist-get 'lsp-capf completion-category-defaults)) '(orderless))) - (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" orig-result)) - orig-result))) - (advice-add 'lsp-resolve-final-command :around #'lsp-booster--advice-final-command) :hook ((rust-ts-mode . lsp-deferred) (python-ts-mode . lsp-deferred) (lsp-mode . lsp-enable-which-key-integration) diff --git a/nix/flake.lock b/nix/flake.lock index e625957..f44ed34 100644 --- a/nix/flake.lock +++ b/nix/flake.lock @@ -1,25 +1,5 @@ { "nodes": { - "emacs-lsp-booster": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1744007427, - "narHash": "sha256-eccCwW7GQVSk/WOCxt5izY5VdVknheI3oAXa0Xg9k9U=", - "owner": "slotThe", - "repo": "emacs-lsp-booster-flake", - "rev": "8229947cf6d2f565a9aa882b7946c643099e1ef0", - "type": "github" - }, - "original": { - "owner": "slotThe", - "repo": "emacs-lsp-booster-flake", - "type": "github" - } - }, "home-manager": { "inputs": { "nixpkgs": [ @@ -58,7 +38,6 @@ }, "root": { "inputs": { - "emacs-lsp-booster": "emacs-lsp-booster", "home-manager": "home-manager", "nixpkgs": "nixpkgs", "utils": "utils" diff --git a/nix/flake.nix b/nix/flake.nix index 9b2246c..9519889 100644 --- a/nix/flake.nix +++ b/nix/flake.nix @@ -2,11 +2,9 @@ inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; utils.url = "github:numtide/flake-utils"; - emacs-lsp-booster.url = "github:slotThe/emacs-lsp-booster-flake"; home-manager.url = "github:nix-community/home-manager"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; - emacs-lsp-booster.inputs.nixpkgs.follows = "nixpkgs"; }; outputs = { @@ -14,13 +12,9 @@ nixpkgs, utils, home-manager, - emacs-lsp-booster, ...}: let pkgsForSystem = (system: import nixpkgs { inherit system; - overlays = [ - emacs-lsp-booster.overlays.default - ]; config.allowUnfree = true; }); diff --git a/nix/modules/emacs.nix b/nix/modules/emacs.nix index ca2f2d8..40a6aa4 100644 --- a/nix/modules/emacs.nix +++ b/nix/modules/emacs.nix @@ -13,7 +13,6 @@ in epkgs.melpaPackages.jinx ])) zstd - emacs-lsp-booster aspell ]; # Macs need coreutils for dired to work