From ffa0476f2d684659bcf0f1bccfc600020bd667a7 Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Wed, 9 Aug 2023 00:20:59 +0100 Subject: [PATCH] Switch to clang-tools from clang16 --- configuration.nix | 2 +- emacs.el | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/configuration.nix b/configuration.nix index e0f4a0c..24b9c59 100644 --- a/configuration.nix +++ b/configuration.nix @@ -147,7 +147,7 @@ in nheko mullvad-vpn mullvad - clang-tools # mainly for clang-format + (clang-tools.override { llvmPackages = llvmPackages_16; }) # mainly for clang-format (emacsWithPackagesFromUsePackage { config = ./emacs.el; defaultInitFile = true; diff --git a/emacs.el b/emacs.el index 6d63622..d6924cb 100755 --- a/emacs.el +++ b/emacs.el @@ -285,6 +285,10 @@ (evil-set-undo-system 'undo-redo) (evil-collection-init))) +(evil-set-leader 'normal " ") +(evil-define-key 'normal 'global (kbd "f") 'find-file) +(evil-define-key 'normal 'global (kbd "b") 'switch-to-buffer) + ;; -------- Tools and environment -------- ;; By default, Emacs doesn't add system path to its search places @@ -924,9 +928,16 @@ window, unless BACKGROUND (prefix-argument) is non-nil. (with-eval-after-load 'eglot (add-to-list 'eglot-server-programs - `(c++-mode . ("clangd")))) + `(c++-mode . ("clangd"))) + (add-to-list 'eglot-server-programs + `(c++-ts-mode . ("clangd"))) + (add-to-list 'eglot-server-programs + `(c-ts-mode . ("clangd")) + )) (add-hook 'c++-mode-hook 'eglot-ensure) +(add-hook 'c++-ts-mode-hook 'eglot-ensure) +(add-hook 'c-ts-mode-hook 'eglot-ensure) (use-package clang-format) (use-package clang-format+)