From d2bc5b711510f879b80ab3cfa4811091ef1848a2 Mon Sep 17 00:00:00 2001 From: fz0x1 Date: Tue, 3 Dec 2024 22:43:50 +0100 Subject: [PATCH] 20241203 --- global/.spacemacs | 59 +++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 50 insertions(+), 9 deletions(-) diff --git a/global/.spacemacs b/global/.spacemacs index 8a49839..1d8fc32 100644 --- a/global/.spacemacs +++ b/global/.spacemacs @@ -18,6 +18,7 @@ This function should only modify configuration layer settings." ;; lazy install any layer that support lazy installation even the layers ;; listed in `dotspacemacs-configuration-layers'. `nil' disable the lazy ;; installation feature and you have to explicitly list a layer in the + ;; variable `dotspacemacs-configuration-layers' to install it. ;; (default 'unused) dotspacemacs-enable-lazy-installation 'unused @@ -38,14 +39,14 @@ This function should only modify configuration layer settings." ;; Uncomment some layer names and press `SPC f e R' (Vim style) or ;; `M-m f e R' (Emacs style) to install them. ;; ---------------------------------------------------------------- - ;; auto-completion - ;; better-defaults + auto-completion + better-defaults org emacs-lisp ;; git helm ;; lsp - ;; markdown + markdown multiple-cursors ;; org ;; (shell :variables @@ -54,6 +55,8 @@ This function should only modify configuration layer settings." spell-checking ;; syntax-checking ;; version-control + (org :variables + org-enable-roam-support t) treemacs) @@ -598,20 +601,58 @@ This function is called at the very end of Spacemacs startup, after layer configuration. Put your configuration code here, except for variables that should be set before packages are loaded." + (with-eval-after-load "ispell" + (setq ispell-program-name "hunspell") + ;; ispell-set-spellchecker-params has to be called + ;; before ispell-hunspell-add-multi-dic will work + (ispell-set-spellchecker-params) + (ispell-hunspell-add-multi-dic "en_US,ru_RU") + (setq ispell-dictionary "en_US,ru_RU")) -(defun transform-square-brackets-to-round-ones(string-to-transform) - "Transforms [ into ( and ] into ), other chars left unchanged." - (concat - (mapcar #'(lambda (c) (if (equal c ?\[) ?\( (if (equal c ?\]) ?\) c))) string-to-transform))) + (defun transform-square-brackets-to-round-ones(string-to-transform) + "Transforms [ into ( and ] into ), other chars left unchanged." + (concat + (mapcar #'(lambda (c) (if (equal c ?\[) ?\( (if (equal c ?\]) ?\) c))) string-to-transform))) (require 'org-protocol) (require 'org-capture) + (use-package org-roam + :ensure nil + :custom + (org-roam-directory "~/org/roam/") + :config + (setq org-roam-completion-everywhere t) + (setq org-roam-database-connector 'sqlite-builtin) + (setq org-roam-db-node-include-function + (lambda () + (not (member "ATTACH" (org-get-tags))))) + (org-roam-db-autosync-mode) + ) + + (spacemacs/set-leader-keys + "aordN" 'org-roam-dailies-capture-today) + + (use-package org-roam-dailies + :after org-roam + :ensure nil + :custom + (org-roam-dailies-directory "journal/") + :config + (setq org-roam-dailies-capture-templates + '(("d" "default" entry "* %<%I:%M %p>: %?" + :if-new (file+head "daily/%<%Y-%m-%d>.org" "#+title: %<%Y-%m-%d>\n"))))) + (with-eval-after-load 'org + (setq org-attach-method 'cp) ;; copy file to an attachments dir. + (setq org-attach-id-dir "~/org/attachments/") + + (setq org-adapt-indentation t) + (setq org-indent-mode t) + (setq org-archive-location "%s_archive::") (add-hook 'org-mode-hook (lambda () - (setq fill-column 80) ;; Установить максимальную длину строки в 80 символов - (turn-on-auto-fill))) ;; Включить авто-перенос строк + (visual-line-mode 1))) (setq org-agenda-files '("~/org/"))