From afa03e6f6ea66f5568805ebd73b8c38f008c3c8b Mon Sep 17 00:00:00 2001 From: Azat Bahawi Date: Sun, 10 Mar 2024 15:24:58 +0300 Subject: 2024-03-10 --- modules/common/emacs/doom/config.el | 47 ++++++++++++++++------------------- modules/common/emacs/doom/init.el | 10 ++++---- modules/common/emacs/doom/packages.el | 13 ++-------- 3 files changed, 28 insertions(+), 42 deletions(-) (limited to 'modules/common/emacs') diff --git a/modules/common/emacs/doom/config.el b/modules/common/emacs/doom/config.el index 15bcdff..79b33fc 100644 --- a/modules/common/emacs/doom/config.el +++ b/modules/common/emacs/doom/config.el @@ -23,32 +23,42 @@ doom-modeline-total-line-number t doom-modeline-height 30) +;; +;;; Editorconfig +;; + +(setq +editorconfig-mode-alist '((sh-mode . "sh")) + editorconfig-exclude-modes '(lisp-mode + common-lisp-mode + emacs-lisp-mode + org-mode)) + ;; ;;; LSP ;; (setq lsp-enable-suggest-server-download nil - lsp-enable-file-watchers t - lsp-file-watch-threshold 4096 lsp-modeline-code-actions-enable nil) ;; ;;; Go ;; -(setq lsp-go-analyses '((shadow . t) - (unsedvariable . t) - (unusedparams . t) - (unusedwrite . t) - (useany . t))) +(setq lsp-go-analyses + '((unsedvariable . t) + (unusedparams . t) + (unusedwrite . t))) ;; ;;; Org ;; +(setq org-directory "~/doc/org") + +;; For some reason only using `after!' work here. `setq-hook!' and etc doesn't +;; produce expected results. (after! org - (setq org-directory "~/doc/org/" - org-todo-keywords '((sequence + (setq org-todo-keywords '((sequence "TODO(t)" "LOOP(r)" "STRT(s@)" @@ -140,17 +150,14 @@ ;;; YAML ;; -;; There's no optimal solution to properly deal with Go templates inside YAML. I -;; have to turn this off to save myself the headache of dealing with syntax -;; errors up my ass. +;; Turn off `flycheck-mode' and `lsp-mode' for Helm templates. (add-hook! 'yaml-mode-hook (defun nixfiles/disable-flycheck-for-helm-templates-h () (when (and buffer-file-name (string-match-p "/templates/" buffer-file-name) (or (string-suffix-p ".yaml" buffer-file-name) (string-suffix-p ".yml" buffer-file-name))) - (remove-hook! 'yaml-mode-local-vars-hook #'lsp!) - (pushnew! flycheck-disabled-checkers 'yaml-jsyaml 'yaml-ruby 'yaml-yamllint)))) + (remove-hook! 'yaml-mode-local-vars-hook #'lsp!)))) (setq-hook! 'yaml-mode-hook +format-with-lsp nil) @@ -194,18 +201,6 @@ (+pass-get-secret "server/soju.shire.net/azahi")))) '("libera" "oftc" "hackint" "rizon"))) -;; -;;; Fcitx -;; - -(use-package! fcitx - :after evil - :config - (when (setq fcitx-remote-command - (or (executable-find "fcitx5-remote") - (executable-find "fcitx-remote"))) - (fcitx-evil-turn-on))) - ;; ;;; Hledger ;; diff --git a/modules/common/emacs/doom/init.el b/modules/common/emacs/doom/init.el index 705f0ef..571993b 100644 --- a/modules/common/emacs/doom/init.el +++ b/modules/common/emacs/doom/init.el @@ -53,7 +53,7 @@ (eval +overlay) (lookup +dictionary +offline) (lsp +peek) - (magit +forge) + magit make (pass +auth) pdf @@ -62,7 +62,7 @@ upload :os - (:if IS-MAC macos) + (:if (featurep :system 'macos) macos) :lang (cc +lsp +tree-sitter) @@ -71,8 +71,8 @@ emacs-lisp (go +lsp +tree-sitter) (haskell +lsp +tree-sitter) - (java +lsp +tree-sitter) - (javascript +lsp +tree-sitter) + java + javascript (json +lsp +tree-sitter) kotlin (latex +latexmk +cdlatex +lsp) @@ -83,7 +83,7 @@ (python +poetry +lsp +tree-sitter) (rust +lsp +tree-sitter) (sh +lsp +tree-sitter) - (web +lsp +tree-sitter) + web (yaml +lsp +tree-sitter) (zig +lsp +tree-sitter) diff --git a/modules/common/emacs/doom/packages.el b/modules/common/emacs/doom/packages.el index cbd90ea..80490de 100644 --- a/modules/common/emacs/doom/packages.el +++ b/modules/common/emacs/doom/packages.el @@ -1,16 +1,7 @@ (disable-packages! writegood-mode) -(package! org-roam - :recipe (:host github - :repo "org-roam/org-roam" - :branch "main")) -(package! org-roam-ui - :recipe (:host github - :repo "org-roam/org-roam-ui" - :branch "main")) - -(package! hledger-mode) +(package! org-roam-ui) (package! nickel-mode) -(package! fcitx) +(package! hledger-mode) -- cgit 1.4.1