Cleanup Eglot settings, remove pdf-tools

This commit is contained in:
Evie Litherland-Smith 2023-11-14 10:16:49 +00:00
parent 0fd91f55fd
commit 2260c14a8d
4 changed files with 9 additions and 73 deletions

View file

@ -23,14 +23,10 @@
url = "github:Kirottu/anyrun";
inputs.nixpkgs.follows = "nixpkgs";
};
# watershot = {
# url = "github:Kirottu/watershot";
# inputs.nixpkgs.follows = "nixpkgs";
# };
};
outputs = { self, nixpkgs, home-manager, nix-index-database, stylix, kmonad
, anyrun, ... }@inputs:
outputs =
{ nixpkgs, home-manager, nix-index-database, stylix, kmonad, anyrun, ... }:
let
default = {
hostName = "Atlas";
@ -269,8 +265,7 @@
./services/sshd/default.nix
./services/syncthing/default.nix
];
homeModules =
[ ./home/default.nix ./home/media.nix ./home/emacs/default.nix ];
homeModules = [ ./home/default.nix ];
};
Northstar = let

View file

@ -81,7 +81,6 @@
darkroom
# writing-packages
pdf-tools
markdown-mode
pandoc-mode
auctex

View file

@ -405,40 +405,11 @@
:ensure t
:config (direnv-mode +1))
(setq eglot-extend-to-xref t
eglot-autoshutdown t
eglot-autoreconnect nil)
(when (require 'eglot nil :noerror)
;; Currently just using prog-mode
;; Should probably use individual language modes
;; One day...
(add-hook 'prog-mode-hook #'eglot-ensure))
;;; Eglot
(defun crafted-ide--add-eglot-hooks (mode-list)
"Add `eglot-ensure' to modes in MODE-LIST.
The mode must be loaded, i.e. found with `fboundp'. A mode which
is not loaded will not have a hook added, in which case add it
manually with something like this:
`(add-hook 'some-mode-hook #'eglot-ensure)'"
(dolist (mode-def mode-list)
(let ((mode (if (listp mode-def) (car mode-def) mode-def)))
(cond
((listp mode) (crafted-ide--add-eglot-hooks mode))
(t
(when (and (fboundp mode)
(not (eq 'clojure-mode mode)) ; prefer cider
(not (eq 'lisp-mode mode)) ; prefer sly/slime
(not (eq 'scheme-mode mode)) ; prefer geiser
)
(let ((hook-name (format "%s-hook" (symbol-name mode))))
(message "adding eglot to %s" hook-name)
(add-hook (intern hook-name) #'eglot-ensure))))))))
;; add eglot to existing programming modes when eglot is loaded.
(with-eval-after-load "eglot"
(crafted-ide--add-eglot-hooks eglot-server-programs))
;; Shutdown server when last managed buffer is killed
(customize-set-variable 'eglot-autoshutdown t)
(setq project-switch-use-entire-map t
project-switch-commands

View file

@ -476,40 +476,11 @@ For reference information, see [[https://orgmode.com][Org-mode website]]
** Eglot LSP
#+BEGIN_SRC emacs-lisp
(setq eglot-extend-to-xref t
eglot-autoshutdown t
eglot-autoreconnect nil)
(when (require 'eglot nil :noerror)
;; Currently just using prog-mode
;; Should probably use individual language modes
;; One day...
(add-hook 'prog-mode-hook #'eglot-ensure))
;;; Eglot
(defun crafted-ide--add-eglot-hooks (mode-list)
"Add `eglot-ensure' to modes in MODE-LIST.
The mode must be loaded, i.e. found with `fboundp'. A mode which
is not loaded will not have a hook added, in which case add it
manually with something like this:
`(add-hook 'some-mode-hook #'eglot-ensure)'"
(dolist (mode-def mode-list)
(let ((mode (if (listp mode-def) (car mode-def) mode-def)))
(cond
((listp mode) (crafted-ide--add-eglot-hooks mode))
(t
(when (and (fboundp mode)
(not (eq 'clojure-mode mode)) ; prefer cider
(not (eq 'lisp-mode mode)) ; prefer sly/slime
(not (eq 'scheme-mode mode)) ; prefer geiser
)
(let ((hook-name (format "%s-hook" (symbol-name mode))))
(message "adding eglot to %s" hook-name)
(add-hook (intern hook-name) #'eglot-ensure))))))))
;; add eglot to existing programming modes when eglot is loaded.
(with-eval-after-load "eglot"
(crafted-ide--add-eglot-hooks eglot-server-programs))
;; Shutdown server when last managed buffer is killed
(customize-set-variable 'eglot-autoshutdown t)
#+END_SRC
** Project
#+BEGIN_SRC emacs-lisp