about summary refs log tree commit diff
path: root/modules/common/emacs/doom/config.el
diff options
context:
space:
mode:
Diffstat (limited to 'modules/common/emacs/doom/config.el')
-rw-r--r--modules/common/emacs/doom/config.el47
1 files changed, 21 insertions, 26 deletions
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
@@ -24,31 +24,41 @@
       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)
 
@@ -195,18 +202,6 @@
               '("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
 ;;
 

Consider giving Nix/NixOS a try! <3