summaryrefslogtreecommitdiff
path: root/modules/common
diff options
context:
space:
mode:
authorAzat Bahawi <azat@bahawi.net>2024-03-10 15:24:58 +0300
committerAzat Bahawi <azat@bahawi.net>2024-03-10 15:24:58 +0300
commitafa03e6f6ea66f5568805ebd73b8c38f008c3c8b (patch)
tree271471cb94b9cce6968492ac64e0c7f02ddda5ae /modules/common
parent04be52d7b75eb62203a3af8d85e36e3584123f90 (diff)
2024-03-10
Diffstat (limited to 'modules/common')
-rw-r--r--modules/common/common/stylix.nix3
-rw-r--r--modules/common/emacs/doom/config.el47
-rw-r--r--modules/common/emacs/doom/init.el10
-rw-r--r--modules/common/emacs/doom/packages.el13
-rw-r--r--modules/common/git.nix1
5 files changed, 32 insertions, 42 deletions
diff --git a/modules/common/common/stylix.nix b/modules/common/common/stylix.nix
index 27a9e35..6e61b54 100644
--- a/modules/common/common/stylix.nix
+++ b/modules/common/common/stylix.nix
@@ -26,6 +26,9 @@ with lib; {
readOnly = true;
};
+ # Styling and color binding can be sourced from here[1].
+ #
+ # [1]: https://github.com/tinted-theming/base24/blob/master/styling.md
config = {
stylix = {
image = pkgs.fetchurl {
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
;;
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)
diff --git a/modules/common/git.nix b/modules/common/git.nix
index f582f66..c6be614 100644
--- a/modules/common/git.nix
+++ b/modules/common/git.nix
@@ -103,6 +103,7 @@ in {
// mapAttrs'
(name: values: nameValuePair ''url "https://${values}/"'' {insteadOf = "${name}:";}) {
"alpine" = "gitlab.alpinelinux.org";
+ "debian" = "salsa.debian.org";
"freedesktop" = "gitlab.freedesktop.org";
"gnome" = "gitlab.gnome.org";
"haskell" = "gitlab.haskell.org";