From 0aa14b5918650d3d890031c8ef4e6639306f1330 Mon Sep 17 00:00:00 2001 From: Przemek Kryger Date: Wed, 6 Sep 2023 15:56:42 +0100 Subject: [PATCH 01/12] Don't depend on lsp-mode for treesit --- modules/init-treesit.el | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/modules/init-treesit.el b/modules/init-treesit.el index 5e926858..0c6b7acb 100644 --- a/modules/init-treesit.el +++ b/modules/init-treesit.el @@ -5,10 +5,10 @@ (defun exordium--add-forward-ts-hook (mode) (when-let ((ts-hook (intern (concat (symbol-name mode) "-ts-mode-hook"))) (hook (intern (concat (symbol-name mode) "-mode-hook"))) - (_ (and (symbolp ts-hook) (symbolp hook)))) + ((and (symbolp ts-hook) (symbolp hook)))) (add-hook ts-hook - #'(lambda () - (run-hooks hook))))) + #'(lambda () + (run-hooks hook))))) (when exordium-treesit-modes-enable (unless (getenv "ci_tests") @@ -17,7 +17,6 @@ (message "Enabling treesit-auto and builtin treesit") (use-package treesit-auto :requires treesit - :after lsp-mode :config (setq treesit-auto-install 'prompt) (global-treesit-auto-mode)) @@ -25,7 +24,6 @@ (use-package treesit :requires treesit :ensure nil - :after lsp-mode :config (mapc #'exordium--add-forward-ts-hook '( From fb02f71d645fe4d23df8e767436ed05efd8b596a Mon Sep 17 00:00:00 2001 From: Przemek Kryger Date: Tue, 26 Sep 2023 07:32:08 +0100 Subject: [PATCH 02/12] Add python-ts-mode to exordium-python-ruff flycheck checker --- modules/init-flycheck.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/init-flycheck.el b/modules/init-flycheck.el index 1d55abcf..377f6e16 100644 --- a/modules/init-flycheck.el +++ b/modules/init-flycheck.el @@ -167,7 +167,7 @@ See URL `http://pypi.python.org/pypi/ruff'." (markdown-view-mode) (font-lock-flush) (font-lock-ensure)))))) - :modes python-mode) + :modes (python-mode python-ts-mode)) (add-to-list 'flycheck-checkers 'exordium-python-ruff) (flycheck-add-next-checker 'exordium-python-ruff '(warning . exordium-python-mypy))) From cb4cfa5a3fdbd7ed06ca602a272b27977e7f755c Mon Sep 17 00:00:00 2001 From: Przemek Kryger Date: Tue, 26 Sep 2023 13:16:33 +0100 Subject: [PATCH 03/12] Use view-mode in exordium-python-mypy explainer --- modules/init-flycheck.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/init-flycheck.el b/modules/init-flycheck.el index 377f6e16..81c07539 100644 --- a/modules/init-flycheck.el +++ b/modules/init-flycheck.el @@ -115,8 +115,7 @@ See URL `http://mypy-lang.org/'." (with-current-buffer standard-output (insert explanation) (poly-rst-mode) - (use-local-map (copy-keymap poly-rst-mode-map)) - (local-set-key "q" #'bury-buffer) + (view-mode) (font-lock-flush) (font-lock-ensure)))))) From acfe93402a830b1cc57e942df91b971ad0f241a8 Mon Sep 17 00:00:00 2001 From: Steve Downey Date: Sat, 10 Feb 2024 11:53:43 -0500 Subject: [PATCH 04/12] Attach dead-code to ts hook Add the highlight dead code hook to treesit as well as plan c-mode-common-hook. --- modules/init-cpp.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/init-cpp.el b/modules/init-cpp.el index 7513e8ab..420f8231 100644 --- a/modules/init-cpp.el +++ b/modules/init-cpp.el @@ -49,7 +49,8 @@ ;;; Highlight dead code between "#if 0" and "#endif" (add-hook 'c-mode-common-hook 'cpp-highlight-dead-code-hook) - +(when exordium-treesit-modes-enable + (add-hook 'c-ts--mode-common-hook 'cpp-highlight-dead-code-hook)) ;;; Switch between .h <--> .cpp <--> t.cpp From 46f89ccac39c509baad7c6120d8c996fe922fe71 Mon Sep 17 00:00:00 2001 From: Steve Downey Date: Sat, 10 Feb 2024 12:18:44 -0500 Subject: [PATCH 05/12] Update list of clangd binaries Add through 18 and drop earlier that 13. --- modules/init-prefs.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/init-prefs.el b/modules/init-prefs.el index 7cc9e222..9ae2cb1a 100644 --- a/modules/init-prefs.el +++ b/modules/init-prefs.el @@ -581,7 +581,7 @@ serialize as a JSON array of strings." :type '(restricted-sexp :match-alternatives (exordium--string-vector-p))) -(defcustom exordium-lsp-clangd-executable ["clangd-15" "clangd-14" "clangd-13" "clangd-12" "clangd-11" "clangd-10" "clangd-9" "clangd"] +(defcustom exordium-lsp-clangd-executable ["clangd-18" "clangd-17" "clangd-16" "clangd-15" "clangd-14" "clangd-13" "clangd"] "List of executable names to search for to run clangd. Default is to choose the first that is found via `executable-find'." :group 'exordium From 148d5ac1eae46fe93cc84598d4b50148e395c415 Mon Sep 17 00:00:00 2001 From: Steve Downey Date: Sat, 10 Feb 2024 12:19:51 -0500 Subject: [PATCH 06/12] Enable upgrade from built-in version of org By default emacs doesn't upgrade built-in packages. Org moves faster than emacs. Pull the released version from elpa. --- init.el | 6 ++++++ modules/init-org.el | 1 + 2 files changed, 7 insertions(+) diff --git a/init.el b/init.el index 9597ef0b..bd0b5ce2 100644 --- a/init.el +++ b/init.el @@ -209,6 +209,12 @@ Each element of the list is in the same form as in `package-pinned-packages'." (require 'use-package-ensure) (setq use-package-always-ensure t) (setq use-package-compute-statistics t) + +;;; remove a package from the builtin list so it can be upgraded +(defun exordium-ignore-builtin (pkg) + (assq-delete-all pkg package--builtins) + (assq-delete-all pkg package--builtin-versions)) + ;;; Load Modules (use-package bytecomp :ensure nil) diff --git a/modules/init-org.el b/modules/init-org.el index 03f073f2..b4e4e353 100644 --- a/modules/init-org.el +++ b/modules/init-org.el @@ -12,6 +12,7 @@ "Face for STOP keywords." :group 'exordium) +(exordium-ignore-builtin 'org) (use-package org :commands (org-mode) From 1748c05bb4b3b25c6cdb59dc1a4ed40ad4386e40 Mon Sep 17 00:00:00 2001 From: nickdevp Date: Thu, 9 May 2024 11:00:02 -0400 Subject: [PATCH 07/12] Fix warning for '#' missing in lambda (#220) --- modules/init-yasnippet.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/init-yasnippet.el b/modules/init-yasnippet.el index d1611b17..34a5928c 100644 --- a/modules/init-yasnippet.el +++ b/modules/init-yasnippet.el @@ -22,7 +22,7 @@ ;;; Enable YAS only for C++ (add-hook 'c-mode-common-hook - '(lambda () + #'(lambda () (yas-minor-mode))) ;;; Trigger key From 2476effe5364e4f95ecea6cf03fce94f36a2a226 Mon Sep 17 00:00:00 2001 From: Steve Downey Date: Thu, 9 May 2024 16:46:01 -0400 Subject: [PATCH 08/12] Make elpa dir based on running user dir Hardcoding ~/.emacs.d/ is incorrect, particularly with recent emacs versions that have a commandline option to set it. --- init.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/init.el b/init.el index bd0b5ce2..48ff8513 100644 --- a/init.el +++ b/init.el @@ -147,7 +147,8 @@ Each element of the list is in the same form as in `package-pinned-packages'." (add-to-list 'package-archives (cons "gnu" exordium-gnu-package-repo) t)) -(setq package-user-dir (concat "~/.emacs.d/elpa-" emacs-version)) +(setq package-user-dir + (locate-user-emacs-file (concat "elpa-" emacs-version))) (when (fboundp 'native-comp-available-p) (setq package-native-compile (native-comp-available-p))) From 29ef0a56d95540af040ee05629f6d862b390685b Mon Sep 17 00:00:00 2001 From: Steve Downey Date: Fri, 17 May 2024 15:39:13 -0400 Subject: [PATCH 09/12] Improve TS-mode integration for C and C++ Major mode remaps and adding the c-mode-common hook to the ts hooks. --- modules/init-cpp.el | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/init-cpp.el b/modules/init-cpp.el index 420f8231..5fe590f0 100644 --- a/modules/init-cpp.el +++ b/modules/init-cpp.el @@ -50,7 +50,14 @@ ;;; Highlight dead code between "#if 0" and "#endif" (add-hook 'c-mode-common-hook 'cpp-highlight-dead-code-hook) (when exordium-treesit-modes-enable - (add-hook 'c-ts--mode-common-hook 'cpp-highlight-dead-code-hook)) + (progn + (add-hook 'c-ts-mode-hook #'(lambda () (run-hooks 'c-mode-common-hook))) + (add-hook 'c++-ts-mode-hook #'(lambda () (run-hooks 'c-mode-common-hook))) + (add-to-list 'major-mode-remap-alist '(c-mode . c-ts-mode)) + (add-to-list 'major-mode-remap-alist '(c++-mode . c++-ts-mode)) + (add-to-list 'major-mode-remap-alist + '(c-or-c++-mode . c-or-c++-ts-mode)))) + ;;; Switch between .h <--> .cpp <--> t.cpp From cb549af48b7462ad51b63087108dc711a17a0f30 Mon Sep 17 00:00:00 2001 From: Steve Downey Date: Sun, 9 Jun 2024 12:44:01 -0400 Subject: [PATCH 10/12] Add the taps to load path Add all taps to load path, to make requires work a little bit better. --- init.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/init.el b/init.el index bd0b5ce2..aa62a6c3 100644 --- a/init.el +++ b/init.el @@ -196,6 +196,8 @@ Each element of the list is in the same form as in `package-pinned-packages'." (add-directory-tree-to-load-path exordium-themes-dir) (add-directory-tree-to-load-path exordium-local-dir t) +(add-directory-tree-to-load-path exordium-taps-root) + (setq custom-theme-directory exordium-themes-dir) From c778540c355a0af3bfe743d65cbfbc8b530699fa Mon Sep 17 00:00:00 2001 From: Steve Downey Date: Sun, 15 Sep 2024 11:32:52 -0400 Subject: [PATCH 11/12] seq was updated in emacs-29.2 Avoid attempts to update seq in more recemt emacs. In particular this avoids requirimg elpa connectivity to start emacs. --- init.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/init.el b/init.el index 7a6ce4c9..e8690ada 100644 --- a/init.el +++ b/init.el @@ -179,15 +179,16 @@ Each element of the list is in the same form as in `package-pinned-packages'." (update-package pkg has-refreshed))) ;; - Some packages (i.e., magit, forge) require seq-2.24. -;; - Emacs-29 is delivered with seq-2.23. +;; - Emacs-29.1 is delivered with seq-2.23. ;; - Other packages (i.e., compat) require seq-2.23. ;; - When only magit is installed it requires compat which requires seq-2.23 -> seq is not upgraded ;; - When only forge is installed is requires magit and compat which requires seq-2.23 -> seq is not upgraded ;; - When magit is installed followed by installation of forge seq is upgraded to seq-2.24 -> this fails ;; Force installing the freshest version of seq with errors suppressed: -(let (debug-on-error) - ;; this assumes `package-refresh-contents has been called' - (package-install (car (alist-get 'seq package-archive-contents)))) +(when (version< emacs-version "29.2") + (let (debug-on-error) + ;; this assumes `package-refresh-contents has been called' + (package-install (car (alist-get 'seq package-archive-contents))))) ;;; Path for "require" From a7c02eba0fb0644982c19bad6f1cd80f46e328b3 Mon Sep 17 00:00:00 2001 From: Steve Downey Date: Mon, 16 Sep 2024 12:46:36 -0400 Subject: [PATCH 12/12] Update tests.yml Add on: workflow_dispatch --- .github/workflows/tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 36e9cd7f..2da100d2 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,6 +1,7 @@ name: CI Tests on: + workflow_dispatch: pull_request: paths-ignore: - '**.md'