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 +++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 26 deletions(-) (limited to 'modules/common/emacs/doom/config.el') 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 ;; -- cgit v1.2.3