20241208
This commit is contained in:
parent
d2bc5b7115
commit
ab8752cbac
2 changed files with 96 additions and 29 deletions
|
@ -40,7 +40,7 @@ This function should only modify configuration layer settings."
|
||||||
;; `M-m f e R' (Emacs style) to install them.
|
;; `M-m f e R' (Emacs style) to install them.
|
||||||
;; ----------------------------------------------------------------
|
;; ----------------------------------------------------------------
|
||||||
auto-completion
|
auto-completion
|
||||||
better-defaults
|
;; better-defaults
|
||||||
org
|
org
|
||||||
emacs-lisp
|
emacs-lisp
|
||||||
;; git
|
;; git
|
||||||
|
@ -68,7 +68,7 @@ This function should only modify configuration layer settings."
|
||||||
;; `dotspacemacs/user-config'. To use a local version of a package, use the
|
;; `dotspacemacs/user-config'. To use a local version of a package, use the
|
||||||
;; `:location' property: '(your-package :location "~/path/to/your-package/")
|
;; `:location' property: '(your-package :location "~/path/to/your-package/")
|
||||||
;; Also include the dependencies as they will not be resolved automatically.
|
;; Also include the dependencies as they will not be resolved automatically.
|
||||||
dotspacemacs-additional-packages '()
|
dotspacemacs-additional-packages '(org-roam org-roam-bibtex org-ref)
|
||||||
|
|
||||||
;; A list of packages that cannot be updated.
|
;; A list of packages that cannot be updated.
|
||||||
dotspacemacs-frozen-packages '()
|
dotspacemacs-frozen-packages '()
|
||||||
|
@ -614,22 +614,95 @@ before packages are loaded."
|
||||||
(concat
|
(concat
|
||||||
(mapcar #'(lambda (c) (if (equal c ?\[) ?\( (if (equal c ?\]) ?\) c))) string-to-transform)))
|
(mapcar #'(lambda (c) (if (equal c ?\[) ?\( (if (equal c ?\]) ?\) c))) string-to-transform)))
|
||||||
|
|
||||||
|
;; (use-package org-roam-bibtex
|
||||||
|
;; :after org-roam
|
||||||
|
;; :config
|
||||||
|
;; (require 'org-ref)
|
||||||
|
;; (setq orb-note-actions-interface 'default)
|
||||||
|
;; (setq bibtex-completion-bibliography '("~/My Library.bib"))
|
||||||
|
;; (setq orb-preformat-keywords
|
||||||
|
;; '("title" "author" "year" "keywords"))
|
||||||
|
;; )
|
||||||
|
|
||||||
|
;; (with-eval-after-load 'ox-latex
|
||||||
|
;; ;; Подключение пакетов для Unicode
|
||||||
|
;; (add-to-list 'org-latex-packages-alist '("" "fontspec"))
|
||||||
|
;; (add-to-list 'org-latex-packages-alist '("" "polyglossia"))
|
||||||
|
|
||||||
|
;; ;; Установка классов документов
|
||||||
|
;; (setq org-latex-classes
|
||||||
|
;; '(("article"
|
||||||
|
;; "\\documentclass[11pt]{article}
|
||||||
|
;; \\usepackage{fontspec}
|
||||||
|
;; \\setmainfont{Times New Roman}
|
||||||
|
;; \\newfontfamily\\cyrillicfont{Times New Roman}
|
||||||
|
;; \\usepackage{polyglossia}
|
||||||
|
;; \\setdefaultlanguage{russian}
|
||||||
|
;; \\setotherlanguage{english}"
|
||||||
|
;; ("\\section{%s}" . "\\section*{%s}")
|
||||||
|
;; ("\\subsection{%s}" . "\\subsection*{%s}")
|
||||||
|
;; ("\\subsubsection{%s}" . "\\subsubsection*{%s}")))))
|
||||||
|
(defun get-current-layout ()
|
||||||
|
"Получить текущую раскладку клавиатуры для текущего окна с помощью xkb-switch."
|
||||||
|
(string-trim (shell-command-to-string "xkb-switch")))
|
||||||
|
|
||||||
|
(defun set-layout (layout)
|
||||||
|
"Установить раскладку клавиатуры для текущего окна с помощью xkb-switch."
|
||||||
|
(shell-command (concat "xkb-switch -s " layout)))
|
||||||
|
|
||||||
|
(defvar prev-lang "us"
|
||||||
|
"Хранит текущую раскладку перед переключением в insert mode.")
|
||||||
|
|
||||||
|
(add-hook 'evil-insert-state-entry-hook
|
||||||
|
(lambda ()
|
||||||
|
(setq prev-lang (get-current-layout))
|
||||||
|
(set-layout "us"))) ;; Переключаем на английский в insert mode
|
||||||
|
|
||||||
|
(add-hook 'evil-insert-state-exit-hook
|
||||||
|
(lambda ()
|
||||||
|
(set-layout prev-lang))) ;; Восстанавливаем предыдущую раскладку
|
||||||
|
|
||||||
|
|
||||||
|
(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 ()
|
||||||
|
(visual-line-mode 1)))
|
||||||
|
|
||||||
(require 'org-protocol)
|
(require 'org-protocol)
|
||||||
(require 'org-capture)
|
(require 'org-capture)
|
||||||
|
(require 'org-tempo)
|
||||||
|
|
||||||
|
(setq org-agenda-files '("~/org/"))
|
||||||
(use-package org-roam
|
(use-package org-roam
|
||||||
:ensure nil
|
:ensure nil
|
||||||
:custom
|
:custom
|
||||||
(org-roam-directory "~/org/roam/")
|
(org-roam-directory "~/org/roam/")
|
||||||
|
(org-roam-db-autosync-mode)
|
||||||
|
(custom-set-faces
|
||||||
|
'((org-roam-link org-roam-link-current)
|
||||||
|
:foreground "#e24888" :underline t))
|
||||||
|
|
||||||
|
(org-roam-capture-templates
|
||||||
|
'(("d" "default" plain
|
||||||
|
"%?\n\n\n* References:\n"
|
||||||
|
:if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org"
|
||||||
|
"#+title: ${title}\n#+filetags:\n")
|
||||||
|
:unnarowed t)))
|
||||||
:config
|
:config
|
||||||
(setq org-roam-completion-everywhere t)
|
(setq org-roam-completion-everywhere t)
|
||||||
(setq org-roam-database-connector 'sqlite-builtin)
|
(setq org-roam-database-connector 'sqlite-builtin)
|
||||||
(setq org-roam-db-node-include-function
|
(setq org-roam-db-node-include-function
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(not (member "ATTACH" (org-get-tags)))))
|
(not (member "ATTACH" (org-get-tags)))))
|
||||||
(org-roam-db-autosync-mode)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
;; today capture
|
||||||
(spacemacs/set-leader-keys
|
(spacemacs/set-leader-keys
|
||||||
"aordN" 'org-roam-dailies-capture-today)
|
"aordN" 'org-roam-dailies-capture-today)
|
||||||
|
|
||||||
|
@ -643,19 +716,11 @@ before packages are loaded."
|
||||||
'(("d" "default" entry "* %<%I:%M %p>: %?"
|
'(("d" "default" entry "* %<%I:%M %p>: %?"
|
||||||
:if-new (file+head "daily/%<%Y-%m-%d>.org" "#+title: %<%Y-%m-%d>\n")))))
|
:if-new (file+head "daily/%<%Y-%m-%d>.org" "#+title: %<%Y-%m-%d>\n")))))
|
||||||
|
|
||||||
(with-eval-after-load 'org
|
;; (setq org-latex-pdf-process
|
||||||
(setq org-attach-method 'cp) ;; copy file to an attachments dir.
|
;; '("xelatex -interaction nonstopmode -output-directory %o %f"
|
||||||
(setq org-attach-id-dir "~/org/attachments/")
|
;; "biber %b"
|
||||||
|
;; "xelatex -interaction nonstopmode -output-directory %o %f"
|
||||||
(setq org-adapt-indentation t)
|
;; "xelatex -interaction nonstopmode -output-directory %o %f"))
|
||||||
(setq org-indent-mode t)
|
|
||||||
(setq org-archive-location "%s_archive::")
|
|
||||||
(add-hook 'org-mode-hook
|
|
||||||
(lambda ()
|
|
||||||
(visual-line-mode 1)))
|
|
||||||
|
|
||||||
(setq org-agenda-files '("~/org/"))
|
|
||||||
|
|
||||||
|
|
||||||
(setq org-capture-templates
|
(setq org-capture-templates
|
||||||
'(
|
'(
|
||||||
|
@ -957,7 +1022,7 @@ This function is called at the very end of Spacemacs initialization."
|
||||||
;; Your init file should contain only one such instance.
|
;; Your init file should contain only one such instance.
|
||||||
;; If there is more than one, they won't work right.
|
;; If there is more than one, they won't work right.
|
||||||
'(package-selected-packages
|
'(package-selected-packages
|
||||||
'(spacemacs-theme ws-butler writeroom-mode winum which-key wgrep vundo volatile-highlights vim-powerline vi-tilde-fringe uuidgen undo-fu-session undo-fu treemacs-projectile treemacs-persp treemacs-icons-dired treemacs-evil toc-org term-cursor symon symbol-overlay string-inflection string-edit-at-point spacemacs-whitespace-cleanup spacemacs-purpose-popwin spaceline space-doc restart-emacs request rainbow-delimiters quickrun popwin pcre2el password-generator paradox overseer org-superstar org-rich-yank org-projectile org-present org-pomodoro org-mime org-download org-contrib org-cliplink open-junk-file nameless multi-line macrostep lorem-ipsum link-hint inspector info+ indent-guide hybrid-mode hungry-delete htmlize holy-mode hl-todo highlight-parentheses highlight-numbers highlight-indentation hide-comnt helm-xref helm-themes helm-swoop helm-purpose helm-projectile helm-org-rifle helm-org helm-mode-manager helm-make helm-descbinds helm-comint helm-ag google-translate golden-ratio gnuplot flyspell-correct-helm flycheck-package flycheck-elsa flx-ido fancy-battery eyebrowse expand-region evil-visualstar evil-visual-mark-mode evil-unimpaired evil-tutor evil-textobj-line evil-surround evil-org evil-numbers evil-nerd-commenter evil-mc evil-matchit evil-lisp-state evil-lion evil-indent-plus evil-iedit-state evil-goggles evil-exchange evil-evilified-state evil-escape evil-easymotion evil-collection evil-cleverparens evil-args evil-anzu eval-sexp-fu emr elisp-slime-nav elisp-demos elisp-def editorconfig dumb-jump drag-stuff dotenv-mode disable-mouse dired-quick-sort diminish devdocs define-word column-enforce-mode clean-aindent-mode centered-cursor-mode auto-highlight-symbol auto-dictionary auto-compile all-the-icons aggressive-indent ace-link ace-jump-helm-line)))
|
'(bibtex-completion biblio parsebib biblio-core org-roam-bibtex spacemacs-theme ws-butler writeroom-mode winum which-key wgrep vundo volatile-highlights vim-powerline vi-tilde-fringe uuidgen undo-fu-session undo-fu treemacs-projectile treemacs-persp treemacs-icons-dired treemacs-evil toc-org term-cursor symon symbol-overlay string-inflection string-edit-at-point spacemacs-whitespace-cleanup spacemacs-purpose-popwin spaceline space-doc restart-emacs request rainbow-delimiters quickrun popwin pcre2el password-generator paradox overseer org-superstar org-rich-yank org-projectile org-present org-pomodoro org-mime org-download org-contrib org-cliplink open-junk-file nameless multi-line macrostep lorem-ipsum link-hint inspector info+ indent-guide hybrid-mode hungry-delete htmlize holy-mode hl-todo highlight-parentheses highlight-numbers highlight-indentation hide-comnt helm-xref helm-themes helm-swoop helm-purpose helm-projectile helm-org-rifle helm-org helm-mode-manager helm-make helm-descbinds helm-comint helm-ag google-translate golden-ratio gnuplot flyspell-correct-helm flycheck-package flycheck-elsa flx-ido fancy-battery eyebrowse expand-region evil-visualstar evil-visual-mark-mode evil-unimpaired evil-tutor evil-textobj-line evil-surround evil-org evil-numbers evil-nerd-commenter evil-mc evil-matchit evil-lisp-state evil-lion evil-indent-plus evil-iedit-state evil-goggles evil-exchange evil-evilified-state evil-escape evil-easymotion evil-collection evil-cleverparens evil-args evil-anzu eval-sexp-fu emr elisp-slime-nav elisp-demos elisp-def editorconfig dumb-jump drag-stuff dotenv-mode disable-mouse dired-quick-sort diminish devdocs define-word column-enforce-mode clean-aindent-mode centered-cursor-mode auto-highlight-symbol auto-dictionary auto-compile all-the-icons aggressive-indent ace-link ace-jump-helm-line)))
|
||||||
(custom-set-faces
|
(custom-set-faces
|
||||||
;; custom-set-faces was added by Custom.
|
;; custom-set-faces was added by Custom.
|
||||||
;; If you edit it by hand, you could mess it up, so be careful.
|
;; If you edit it by hand, you could mess it up, so be careful.
|
||||||
|
|
|
@ -42,3 +42,5 @@ export MANPAGER='nvim +Man!'
|
||||||
|
|
||||||
GPG_TTY=$(tty)
|
GPG_TTY=$(tty)
|
||||||
export GPG_TTY
|
export GPG_TTY
|
||||||
|
|
||||||
|
export TERMINAL="/sbin/alacritty"
|
||||||
|
|
Loading…
Add table
Reference in a new issue