Skip to content

Commit

Permalink
do anything
Browse files Browse the repository at this point in the history
  • Loading branch information
semenInRussia committed Jun 12, 2024
1 parent da2bd38 commit 365a583
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 70 deletions.
3 changes: 1 addition & 2 deletions lisp/editing/my-aas.el
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@
;;
;; instead do it:
:hook ((latex-mode-hook . aas-mode)
(TeX-latex-mode-hook . aas-mode)
(org-mode-hook . aas-mode)))
(TeX-latex-mode-hook . aas-mode)))

(provide 'my-aas)
;;; my-aas.el ends here
53 changes: 2 additions & 51 deletions lisp/languages/my-org.el
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
;;; my-org.el --- My configuration for `org-mode'

;; Copyright (C) 2022-2024 semenInRussia

;; Author: semenInRussia <hrams205@gmail.com>
;; Version: 0.1
;; URL: https://github.com/semenInRussia/emacs.el

;; This file is not part of GNU Emacs.

;;; Commentary:

;; My configuration for `org-mode'

;;; Code:

(require 'my-leaf)
Expand All @@ -23,8 +15,7 @@

(leaf org
:ensure t
:defun ((aas-set-snippets . aas)
(meow-insert . meow-command))
:defun (meow-insert . meow-command)
:custom ((org-file-apps
. '(("\\.\\'" . default)
("\\.pdf\\'" . "start %s")
Expand All @@ -43,15 +34,6 @@
(:org-mode-map
("C-c tab" . org-refile)
("C-c C-j" . org-id-get-create)))
;; the following code should add some auto activating snippets, for example,
;; if I type "exthe", then it should be extended to the "Explore the"
;; see `aas-mode'
:aas (org-mode
"exthe" "explore the"
"Exthe" "Explore the"
"misc " "miscellaneous"
"Misc " "Miscellaneous"
"iau" "I am use")
:config
(add-hook 'org-mode-hook 'visual-line-mode)
(add-hook 'org-mode-hook 'aas-activate-for-major-mode)
Expand Down Expand Up @@ -85,38 +67,7 @@
("AUTO" "polyglossia" t ("xelatex"))
("" "cmap" nil ("pdflatex"))
("" "float" nil
("pdflatex" "xelatex")))))
:config
(leaf ox-json
:ensure (ox-json :repo "jlumpe/ox-json" :host github)
:commands (ox-json-export-to-buffer
ox-json-export-to-file)
:after ox
;; load after `ox' (`org-export')
:init
(org-export-define-backend 'json
;; Transcoders
(append
'((template . ox-json-transcode-template)
(plain-text . ox-json-transcode-plain-text)
(headline . ox-json-transcode-headline)
(link . ox-json-transcode-link)
(timestamp . ox-json-transcode-timestamp))
(cl-loop for type in (append org-element-all-elements org-element-all-objects)
collect (cons type #'ox-json-transcode-base)))
;; Filters
:filters-alist '()
;; Options
:options-alist
'((:json-data-type-property nil "json-data-type-property" "$$data_type")
(:json-exporters nil nil nil)
(:json-property-types nil nil nil)
(:json-strict nil nil nil)
(:json-include-extra-properties nil nil t))
;; Menu
:menu-entry
'(?j "Export to JSON" ((?J "As JSON buffer" ox-json-export-to-buffer)
(?j "To JSON file" ox-json-export-to-file))))))
("pdflatex" "xelatex"))))))

;; remove some useless things from the current `org-mode' buffer
(leaf my-org-do-tidy
Expand Down
16 changes: 7 additions & 9 deletions lisp/local-projects/my-org-autoformat.el
Original file line number Diff line number Diff line change
Expand Up @@ -99,20 +99,18 @@ Only names, without #, + and :"
(interactive)
(cond
((just-call-on-prev-line*
(or
(just-line-is-whitespaces-p)
(my-org-heading-p)
(my-org-properties-end-p)
(my-org-list-item-p)))
(or (just-line-is-whitespaces-p)
(my-org-heading-p)
(my-org-properties-end-p)
(my-org-list-item-p)))
(my-autoformat-sentence-capitalization t))
((just-call-on-prev-line* (equal (pos-bol) (point-min)))
(my-autoformat-sentence-capitalization))
(t
(just-call-on-backward-char*
(and
(looking-back my-autoformat-sentence-end nil)
(looking-at-p "[[:alpha:]]")
(upcase-char 1))))))
(and (looking-back my-autoformat-sentence-end nil)
(looking-at-p "[[:alpha:]]")
(upcase-char 1))))))

(defun my-org-heading-p ()
"Return t, when the cursor located at a `org-mode' heading text."
Expand Down
24 changes: 16 additions & 8 deletions lisp/my-fonts.el
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,18 @@

;; My configuration for fonts

;; Code:
;;; Code:

(require 'my-leaf)

;; you can install this font, from the GitHub repo `nerd-fonts'
(defcustom my-fonts-main
"JetBrainsMono Nerd Font"
'("JetBrainsMono Nerd Font"
"JetBrainsMono"
"FiraCode Nerd Font"
"FiraCode"
"Cascadia Code Nerd Font"
"Cascadia Code"
"Cascadia Code NF")
"Name of the main font to display all."
:group 'my
:type 'string)
Expand All @@ -28,11 +33,13 @@

(setq-default line-spacing 0.30)

(push (cons 'font
(format "%s-%s"
my-fonts-main
my-fonts-size))
default-frame-alist)
(let ((fonts my-fonts-main))
(while fonts
(when (find-font (font-spec :name (car fonts)))
(push (cons 'font (format "%s-%s" (car fonts) my-fonts-size))
default-frame-alist)
(setq fonts nil))
(setq fonts (cdr fonts))))

(prefer-coding-system 'utf-8)
(set-default-coding-systems 'utf-8)
Expand All @@ -41,6 +48,7 @@

(leaf ligature
:commands ligature-set-ligatures global-ligature-mode
:require t
:config
(ligature-set-ligatures 'prog-mode '("--" "---" "==" "===" "!="
"!==" "=!=" "=:=" "=/=" "<="
Expand Down

0 comments on commit 365a583

Please sign in to comment.