summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcashmere <cashmere@autistici.org>2025-11-10 21:21:00 +0100
committercashmere <cashmere@autistici.org>2025-11-10 21:21:00 +0100
commit192315d31242186adf96db0e6d76ac683009d46d (patch)
tree72064948c086783d87a8c8425fb7c7ccf89087aa
parentf0077f5ffc306fc7d02a141fc3eea49bb8cd7f88 (diff)
downloademacs-192315d31242186adf96db0e6d76ac683009d46d.tar.gz
sync
-rw-r--r--config.el148
-rw-r--r--config.org178
2 files changed, 248 insertions, 78 deletions
diff --git a/config.el b/config.el
index 082363c..e69f0df 100644
--- a/config.el
+++ b/config.el
@@ -272,19 +272,6 @@
("C-c ^ n" . smerge-next) ;; Move to the next conflict.
("C-c ^ p" . smerge-previous))) ;; Move to the previous conflict.
-(use-package auth-source
- :straight nil
- :ensure nil ;; This is built-in, no need to fetch it.
- :defer t
- :config
- ;; Enable password-store integration for secure API key retrieval.
- (when (require 'auth-source-pass nil t)
- (auth-source-pass-enable)
- ;; Add password-store explicitly to auth-sources for compatibility.
- (add-to-list 'auth-sources 'password-store)
- ;; Optional: Cache expires after 5 minutes for security.
- (setq auth-source-cache-expiry 300)))
-
(use-package gptel
:ensure t ;; Install from MELPA if not present.
:defer t
@@ -440,6 +427,14 @@
;; ...
(nushell . t))))
+(use-package org-noter
+ :ensure t
+ :defer t)
+
+(use-package nov
+ :ensure t
+ :mode ("\\.epub\\'" . nov-mode))
+
(use-package yequake
:custom
(yequake-frames
@@ -574,29 +569,40 @@
(setq org-download-timestamp "%Y%m%d-%H%M%S_")
(setq org-download-heading-lvl nil))
+;; (setq org-publish-project-alist
+;; '(("wiki"
+;; :author "cashmere"
+;; :email "cashmere@cashmere.rs"
+;; :preserve-breaks t
+;; :preserve-indent t
+;; :with-title t
+;; :base-directory "/home/cashmere/wiki/"
+;; :base-extension "org"
+;; :publishing-directory "/home/cashmere/wiki/html/"
+;; :recursive t
+;; :publishing-function org-html-publish-to-html
+;; :with-toc nil
+;; :section-numbers nil
+;; :html-head "<link rel=\"stylesheet\" href=\"/style.css\" type=\"text/css\"/>"
+;; :preparation-function (lambda (_)
+;; (require 'denote-org)
+;; (dolist (file (directory-files-recursively
+;; "/home/cashmere/wiki/" "\\.org$"))
+;; (with-current-buffer (find-file-noselect file)
+;; (ignore-errors
+;; (denote-org-extras-convert-links-to-file-type))
+;; (save-buffer)))))))
+
(setq org-publish-project-alist
'(("wiki"
- :author "cashmere"
- :email "cashmere@cashmere.rs"
- :preserve-breaks t
- :preserve-indent t
- :with-title t
- :base-directory "/home/cashmere/wiki/"
- :base-extension "org"
- :publishing-directory "/home/cashmere/wiki/html/"
- :recursive t
- :publishing-function org-html-publish-to-html
- :with-toc nil
+ :base-directory "~/wiki"
+ :publishing-directory "~/blog/content/wiki"
+ :publishing-function denote-publish-to-md
+ :recursive nil
+ :exclude-tags ("noexport" "draft")
:section-numbers nil
- :html-head "<link rel=\"stylesheet\" href=\"/style.css\" type=\"text/css\"/>"
- :preparation-function (lambda (_)
- (require 'denote-org)
- (dolist (file (directory-files-recursively
- "/home/cashmere/wiki/" "\\.org$"))
- (with-current-buffer (find-file-noselect file)
- (ignore-errors
- (denote-org-extras-convert-links-to-file-type))
- (save-buffer)))))))
+ :with-creator nil
+ :with-toc nil)))
(setq org-export-with-broken-links t)
@@ -758,6 +764,20 @@ Works on the base filename (without extension), e.g. matches \"-task\", \":task:
:ensure t
)
+(use-package denote-publish
+ :ensure t
+ :straight ( denote-publish :type git :host nil :repo "https://github.com/vedang/denote-publish"))
+
+(setq denote-publish-default-base-dir "~/wiki")
+(setq denote-publish-default-output-dir "~/blog/wiki")
+
+(setq denote-publish-link-class "internal-link")
+
+(setq denote-publish-front-matter-fields
+ '(title subtitle identifier date last_updated_at
+ aliases tags category skip_archive has_code
+ og_image og_description og_video_id))
+
(use-package which-key
:ensure t
:defer t
@@ -832,11 +852,10 @@ Works on the base filename (without extension), e.g. matches \"-task\", \":task:
(use-package markdown-mode
:defer t
- :straight t
:ensure t
- :mode ("README\\.md\\'" . gfm-mode) ;; Use gfm-mode for README.md files.
+ :mode ("README\\.md\\'" . gfm-mode)
:init
- (setq markdown-command "multimarkdown")) ;; Set the Markdown processing command.
+ (setq markdown-command "multimarkdown"))
;; (use-package treesit-auto
;; :ensure t
@@ -1015,6 +1034,37 @@ completion-category-overrides '((file (styles partial-completion))))) ;; Customi
(append org-babel-load-languages
'((nushell . t)))))
+(use-package go-mode
+ :ensure t
+ :mode "\\.go\\'"
+ :hook (go-mode . eglot-ensure)
+ :config
+ (with-eval-after-load 'eglot
+ (add-to-list 'eglot-server-programs
+ '(go-mode . ("gopls" :initializationOptions
+ (:staticcheck t
+ :matcher "CaseSensitive"
+ :usePlaceholders t)))))
+
+ (defun go-mode-setup ()
+ (add-hook 'before-save-hook #'eglot-format-buffer -10 t)
+ (add-hook 'before-save-hook
+ (lambda ()
+ (when (eglot-managed-p)
+ (eglot-code-action-organize-imports nil t)))
+ nil t))
+
+ (add-hook 'go-mode-hook #'go-mode-setup))
+
+(use-package json-mode
+ :ensure t
+ :mode "\\.json\\'"
+ :hook (json-mode . eglot-ensure)
+ :config
+ (with-eval-after-load 'eglot
+ (add-to-list 'eglot-server-programs
+ '(json-mode . ("vscode-json-language-server" "--stdio")))))
+
(use-package vterm
:ensure t
:defer t)
@@ -1814,9 +1864,33 @@ completion-category-overrides '((file (styles partial-completion))))) ;; Customi
:config
(setq consult-project-function #'projectile-project-root))
+(use-package hidepw
+ :ensure t
+ :custom
+ (hidepw-hide-first-line t)
+ :hook (pass-view-mode . hidepw-mode))
+
(use-package pass
:ensure t
- :defer t)
+ :defer t
+ :mode ("\\.gpg\\'" . pass-mode)
+ :config
+ (add-to-list 'display-buffer-alist
+ '("\\*Pass.*\\*"
+ (display-buffer-full-frame))))
+
+(use-package auth-source
+ :straight nil
+ :ensure nil ;; This is built-in, no need to fetch it.
+ :defer t
+ :config
+ ;; Enable password-store integration for secure API key retrieval.
+ (when (require 'auth-source-pass nil t)
+ (auth-source-pass-enable)
+ ;; Add password-store explicitly to auth-sources for compatibility.
+ (add-to-list 'auth-sources 'password-store)
+ ;; Optional: Cache expires after 5 minutes for security.
+ (setq auth-source-cache-expiry 300)))
(use-package zoom
:ensure t)
diff --git a/config.org b/config.org
index a785c3a..4b5c281 100644
--- a/config.org
+++ b/config.org
@@ -318,23 +318,6 @@
("C-c ^ p" . smerge-previous))) ;; Move to the previous conflict.
#+end_src
-* auth-source
-
-#+begin_src emacs-lisp
-(use-package auth-source
- :straight nil
- :ensure nil ;; This is built-in, no need to fetch it.
- :defer t
- :config
- ;; Enable password-store integration for secure API key retrieval.
- (when (require 'auth-source-pass nil t)
- (auth-source-pass-enable)
- ;; Add password-store explicitly to auth-sources for compatibility.
- (add-to-list 'auth-sources 'password-store)
- ;; Optional: Cache expires after 5 minutes for security.
- (setq auth-source-cache-expiry 300)))
-#+end_src
-
* gptel
#+begin_src emacs-lisp
@@ -576,6 +559,24 @@ Old config
(nushell . t))))
#+end_src
+** notation
+
+*** org-noter
+
+#+begin_src emacs-lisp
+(use-package org-noter
+ :ensure t
+ :defer t)
+#+end_src
+
+*** nov.el
+
+#+begin_src emacs-lisp
+(use-package nov
+ :ensure t
+ :mode ("\\.epub\\'" . nov-mode))
+#+end_src
+
* org-capture
*** yequake
@@ -759,29 +760,40 @@ Org Backend exporter for typst templates written and configured in org mode.
#+begin_src emacs-lisp
+;; (setq org-publish-project-alist
+;; '(("wiki"
+;; :author "cashmere"
+;; :email "cashmere@cashmere.rs"
+;; :preserve-breaks t
+;; :preserve-indent t
+;; :with-title t
+;; :base-directory "/home/cashmere/wiki/"
+;; :base-extension "org"
+;; :publishing-directory "/home/cashmere/wiki/html/"
+;; :recursive t
+;; :publishing-function org-html-publish-to-html
+;; :with-toc nil
+;; :section-numbers nil
+;; :html-head "<link rel=\"stylesheet\" href=\"/style.css\" type=\"text/css\"/>"
+;; :preparation-function (lambda (_)
+;; (require 'denote-org)
+;; (dolist (file (directory-files-recursively
+;; "/home/cashmere/wiki/" "\\.org$"))
+;; (with-current-buffer (find-file-noselect file)
+;; (ignore-errors
+;; (denote-org-extras-convert-links-to-file-type))
+;; (save-buffer)))))))
+
(setq org-publish-project-alist
'(("wiki"
- :author "cashmere"
- :email "cashmere@cashmere.rs"
- :preserve-breaks t
- :preserve-indent t
- :with-title t
- :base-directory "/home/cashmere/wiki/"
- :base-extension "org"
- :publishing-directory "/home/cashmere/wiki/html/"
- :recursive t
- :publishing-function org-html-publish-to-html
- :with-toc nil
+ :base-directory "~/wiki"
+ :publishing-directory "~/blog/content/wiki"
+ :publishing-function denote-publish-to-md
+ :recursive nil
+ :exclude-tags ("noexport" "draft")
:section-numbers nil
- :html-head "<link rel=\"stylesheet\" href=\"/style.css\" type=\"text/css\"/>"
- :preparation-function (lambda (_)
- (require 'denote-org)
- (dolist (file (directory-files-recursively
- "/home/cashmere/wiki/" "\\.org$"))
- (with-current-buffer (find-file-noselect file)
- (ignore-errors
- (denote-org-extras-convert-links-to-file-type))
- (save-buffer)))))))
+ :with-creator nil
+ :with-toc nil)))
(setq org-export-with-broken-links t)
#+end_src
@@ -993,6 +1005,24 @@ Some goodies for better integration with org files.
)
#+end_src
+** denote-publish
+
+#+begin_src emacs-lisp
+(use-package denote-publish
+ :ensure t
+ :straight ( denote-publish :type git :host nil :repo "https://github.com/vedang/denote-publish"))
+
+(setq denote-publish-default-base-dir "~/wiki")
+(setq denote-publish-default-output-dir "~/blog/wiki")
+
+(setq denote-publish-link-class "internal-link")
+
+(setq denote-publish-front-matter-fields
+ '(title subtitle identifier date last_updated_at
+ aliases tags category skip_archive has_code
+ og_image og_description og_video_id))
+#+end_src
+
* which-key
#+begin_src emacs-lisp
@@ -1086,11 +1116,10 @@ Some goodies for better integration with org files.
#+begin_src emacs-lisp
(use-package markdown-mode
:defer t
- :straight t
:ensure t
- :mode ("README\\.md\\'" . gfm-mode) ;; Use gfm-mode for README.md files.
+ :mode ("README\\.md\\'" . gfm-mode)
:init
- (setq markdown-command "multimarkdown")) ;; Set the Markdown processing command.
+ (setq markdown-command "multimarkdown"))
#+end_src
* treesit-auto
@@ -1357,6 +1386,45 @@ ily <3.
'((nushell . t)))))
#+end_src
+** Go mode
+
+#+begin_src emacs-lisp
+(use-package go-mode
+ :ensure t
+ :mode "\\.go\\'"
+ :hook (go-mode . eglot-ensure)
+ :config
+ (with-eval-after-load 'eglot
+ (add-to-list 'eglot-server-programs
+ '(go-mode . ("gopls" :initializationOptions
+ (:staticcheck t
+ :matcher "CaseSensitive"
+ :usePlaceholders t)))))
+
+ (defun go-mode-setup ()
+ (add-hook 'before-save-hook #'eglot-format-buffer -10 t)
+ (add-hook 'before-save-hook
+ (lambda ()
+ (when (eglot-managed-p)
+ (eglot-code-action-organize-imports nil t)))
+ nil t))
+
+ (add-hook 'go-mode-hook #'go-mode-setup))
+#+end_src
+
+** json-mode
+
+#+begin_src emacs-lisp
+(use-package json-mode
+ :ensure t
+ :mode "\\.json\\'"
+ :hook (json-mode . eglot-ensure)
+ :config
+ (with-eval-after-load 'eglot
+ (add-to-list 'eglot-server-programs
+ '(json-mode . ("vscode-json-language-server" "--stdio")))))
+#+end_src
+
* vterm
#+begin_src emacs-lisp
@@ -2319,9 +2387,37 @@ ily <3.
* pass
#+begin_src emacs-lisp
+(use-package hidepw
+ :ensure t
+ :custom
+ (hidepw-hide-first-line t)
+ :hook (pass-view-mode . hidepw-mode))
+
(use-package pass
:ensure t
- :defer t)
+ :defer t
+ :mode ("\\.gpg\\'" . pass-mode)
+ :config
+ (add-to-list 'display-buffer-alist
+ '("\\*Pass.*\\*"
+ (display-buffer-full-frame))))
+#+end_src
+
+** auth-source
+
+#+begin_src emacs-lisp
+(use-package auth-source
+ :straight nil
+ :ensure nil ;; This is built-in, no need to fetch it.
+ :defer t
+ :config
+ ;; Enable password-store integration for secure API key retrieval.
+ (when (require 'auth-source-pass nil t)
+ (auth-source-pass-enable)
+ ;; Add password-store explicitly to auth-sources for compatibility.
+ (add-to-list 'auth-sources 'password-store)
+ ;; Optional: Cache expires after 5 minutes for security.
+ (setq auth-source-cache-expiry 300)))
#+end_src
* zoom