diff options
author | Adrian Kummerlaender | 2020-06-11 14:56:14 +0200 |
---|---|---|
committer | Adrian Kummerlaender | 2020-06-11 14:56:14 +0200 |
commit | 109495e3ab2adb474cb0b6538ec318034b39f02c (patch) | |
tree | 5ceb583f5d7ff7f08eff45246e5757ca83a56718 | |
parent | 4dca44efcab0bfed1854fb8b55b7d7e2fc7fd214 (diff) | |
download | nixos_home-109495e3ab2adb474cb0b6538ec318034b39f02c.tar nixos_home-109495e3ab2adb474cb0b6538ec318034b39f02c.tar.gz nixos_home-109495e3ab2adb474cb0b6538ec318034b39f02c.tar.bz2 nixos_home-109495e3ab2adb474cb0b6538ec318034b39f02c.tar.lz nixos_home-109495e3ab2adb474cb0b6538ec318034b39f02c.tar.xz nixos_home-109495e3ab2adb474cb0b6538ec318034b39f02c.tar.zst nixos_home-109495e3ab2adb474cb0b6538ec318034b39f02c.zip |
Setup automatic tag updating in Emacs
Sadly counsel-etags did not find universal-ctags in my PATH so some
custom setup in Nix home-manager was required.
-rw-r--r-- | gui/conf/init.el | 6 | ||||
-rw-r--r-- | gui/emacs.nix | 5 |
2 files changed, 10 insertions, 1 deletions
diff --git a/gui/conf/init.el b/gui/conf/init.el index 4dbaba5..f7f7916 100644 --- a/gui/conf/init.el +++ b/gui/conf/init.el @@ -236,6 +236,12 @@ (use-package counsel-etags :ensure t :config + (setq tags-revert-without-query t) + (setq large-file-warning-threshold nil) + (add-hook 'prog-mode-hook + (lambda () + (add-hook 'after-save-hook + 'counsel-etags-virtual-update-tags 'append 'local))) (evil-leader/set-key "d" 'counsel-etags-find-tag-at-point)) diff --git a/gui/emacs.nix b/gui/emacs.nix index 008f6a7..8b9749f 100644 --- a/gui/emacs.nix +++ b/gui/emacs.nix @@ -22,8 +22,11 @@ in pkgs.writeTextFile { name = "custom-runtime-env.el"; text = '' - (setenv "PATH" (concat (getenv "PATH") ":${tex}/bin")) + (setenv "PATH" (concat (getenv "PATH") + ":${tex}/bin")) (add-to-list 'exec-path "${tex}/bin") + + (setq counsel-etags-update-tags-backend (lambda (src-dir) (shell-command "${pkgs.universal-ctags}/bin/ctags -e -R"))) ''; }; |