1
0
Fork 0
mirror of https://github.com/Horhik/dotfiles.git synced 2024-11-22 08:21:27 +00:00

some emacs changes

This commit is contained in:
horhik 2021-11-06 16:11:17 +03:00
parent 16c97fe1f8
commit 07d4edc7de
6 changed files with 202 additions and 134 deletions

View file

@ -0,0 +1,10 @@
;;;; Emacs Bookmark Format Version 1 ;;;; -*- coding: utf-8-emacs -*-
;;; This format is meant to be slightly human-readable;
;;; nevertheless, you probably don't want to edit it.
;;; -*- End Of Bookmark File Format Version Stamp -*-
(("org-capture-last-stored"
(filename . "~/org-notes/20210905123441-test2.org")
(front-context-string . "\n[[id:ee52b0fb-8")
(rear-context-string . "\n#+title: test2\n")
(position . 83))
)

View file

@ -15,9 +15,10 @@
* Packages
#+begin_src emacs-lisp
(setq max-lisp-eval-depth 10000)
(require 'package)
(add-to-list 'package-archives
'("melpa" . "http://melpa.org/packages/"))
'("melpa" . "http://stable.melpa.org/packages/"))
(package-initialize)
@ -356,7 +357,7 @@
(treemacs-create-icon :file "zip.png" :fallback "🗃️" :extensions ("zip" "tar" "tar.xz" "xz" "xfv" "7z"))
(treemacs-create-icon :file "todo.png" :fallback "🗃️" :extensions ("TODO" "todo" "Tasks" ))
(treemacs-create-icon :file "webassembly" :fallback "🗃️" :extensions ("wasm" "webasm" "webassembly"))
(treemacs-create-icon :file "python" :fallback "🗃️" :extensions ("py" "python"))))
(treemacs-create-icon :file "python.png" :fallback "🗃️" :extensions ("py" "python"))))
(treemacs-load-theme 'Material)
@ -475,7 +476,7 @@
"f v" '(lambda() (interactive) (find-file "~/.config/nvim/init.vim" :which-key "neovim config" ))
"f d" '(lambda() (interactive) (find-file "~/dotfiles/home" :which-key "dotfiles dired" ))
"f a" '(lambda() (interactive) (find-file "~/.config/alacritty/alacritty.yml" :which-key "alacritty"))
"f b" '(lambda() (interactive) (find-file "~/Notes") :which-key "my brain")
"f b" '(lambda() (interactive) (find-file "~/org-notes") :which-key "my brain")
)
@ -554,6 +555,7 @@
("DONE"." D ")
("NEXT"." N ")
("IDEA"." 💡 ")
("READ"." 🔖 ")
("DREAM"." ✨ ")
(":LOGBOOK:"." LOG ")
))
@ -632,10 +634,10 @@
(use-package org
:hook ((org-mode . my/org-mode-setup)
(org-mode . variable-pitch-mode)
(org-mode . org-inddent-mode)
(org-mode . org-indent-mode)
(org-mode . prettify-symbols-mode)
)
:config (setq org-agenda-files `("~/Nextcloud2/Notes/Ideas💡.org" "~/Nextcloud2/Notes/Lists📜.org" "~/Nextcloud2/Notes/Projects💻.org" "~/Nextcloud2/Notes/Tasks🧾.org"))
:config (setq org-agenda-files `("~/org-notes"))
(display-line-numbers-mode 0)
(org-bullets-mode t)
(org-indent-mode t)
@ -649,6 +651,7 @@
("STARTED" . "yellow")
("DREAM" . "pink")
("IDEA" . "gold")
("READ" . "violet")
("ARTICLE" . "lightblue")
("CANCELED" .
(:foreground "blue"
@ -657,7 +660,7 @@
(setq org-todo-keywords '((sequence "TODO(t)" "NEXT(n)" "|" "DONE(d!)")
(sequence "BACKLOG(b)" "PLAN(p)" "READY(r)" "ACTIVE(a)" "REVIEW(v)"
"WAIT(w@/!)" "HOLD(h)" "|" "COMPLETED(c)" "CANC(k@)")
(sequence "IDEA(i)" "DREAM(d)" "ARTICLE(a)" "|" "DONE(d!)")))
(sequence "IDEA(i)" "DREAM(d)" "READ(r)" "ARTICLE(a)" "|" "DONE(d!)")))
(setq org-agenda-custom-commands '(("d" "Dashboard" ((agenda "" ((org-deadline-warning-days 7)))
(todo "NEXT" ((org-agenda-overriding-header
@ -667,6 +670,8 @@
"Active Projects")))))
("n" "Next Tasks" ((todo "NEXT" ((org-agenda-overriding-header
"Next Tasks")))))
("r" "Read pages" ((todo "READ" ((org-agenda-overriding-header
"To read")))))
("i" "Ideas" ((todo "IDEA" ((org-agenda-overriding-header
"Ideas "))
)
@ -779,7 +784,6 @@
** Org roam
#+begin_src emacs-lisp
(use-package org-roam-server)
(use-package org-roam
:ensure t
:hook
@ -796,36 +800,41 @@
"b b" '(org-roam-buffer-toggle-display :which-key "roam buffer toggle ")
"b s" '(org-roam-buffer-activate :which-key "roam buffer show ")
"b h" '(org-roam-buffer-deactivate :which-key "roam buffer hide ")
"s" '(org-roam-server-mode :which-key "roam server "))
"s" '(org-roam-ui-mode :which-key "roam ui "))
:custom
(org-roam-directory "~/Nextcloud2/Notes")
(org-roam-directory (file-truename "~/org-notes"))
:config
(setq
org-roam-server-host "127.0.0.1"
org-roam-server-port 5034
org-roam-server-authenticate nil
org-roam-server-export-inline-images t
org-roam-server-serve-files nil
org-roam-server-served-file-extensions '("pdf" "mp4" "ogv")
org-roam-server-network-poll t
org-roam-server-network-arrows nil
org-roam-server-network-label-truncate t
org-roam-server-network-label-truncate-length 60
org-roam-server-network-label-wrap-length 20)
(org-roam-db-autosync-mode)
(require 'org-roam-protocol)
(org-roam-server-mode t)
(server-start t)
)
(setq org-roam-v2-ack t)
(setq org-roam-directory (file-truename "~/org-notes"))
(require 'org-roam-protocol)
#+end_src
: org-roam-protocol
*** org-roam-ui
#+begin_src emacs-lisp
(use-package websocket
:after org-roam
)
(use-package simple-httpd
:after org-roam
)
(require 'websocket)
(require 'simple-httpd)
(add-to-list 'load-path "~/.emacs.d/private/org-roam-ui")
(load-library "org-roam-ui")
#+end_src
* Languages
** Flycheck
@ -867,6 +876,11 @@
(use-package lsp-ivy)
(use-package lsp-ui
:after lsp)
(use-package company-lsp
:ensure t
:commands company-lsp
:config (push 'company-lsp company-backends))
#+end_src
** C/CPP
@ -886,6 +900,14 @@
(add-to-list 'auto-mode-alist '("\\.cxx\\'" . c++-mode))
(add-to-list 'auto-mode-alist '("\\.cpp\\'" . c++-mode))
(add-to-list 'auto-mode-alist '("\\.C\\'" . c++-mode))
(use-package ccls
:ensure t
:config
(setq ccls-executable "ccls")
(setq lsp-prefer-flymake nil)
(setq-default flycheck-disabled-checkers '(c/c++-clang c/c++-cppcheck c/c++-gcc))
:hook ((c-mode c++-mode objc-mode) .
(lambda () (require 'ccls) (lsp))))
#+end_src
** Markdown
#+begin_src emacs-lisp
@ -920,7 +942,15 @@
#+end_src
* Mastodon
#+begin_src emacs-lisp
(use-package mastodon
:config
(setq mastodon-instance-url "https://mastodon.ml")
)
#+end_src
* Default file
#+begin_src emacs-lisp
(setq initial-buffer-choice "~/Nextcloud2/Notes/Tasks🧾.org")
(org-agenda)
#+end_src

View file

@ -0,0 +1,8 @@
<svg version="1.1" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<g transform="translate(-1.5418e-7 -.00046865)">
<g>
<path d="m9.8594 2.0009c-1.58 0-2.8594 1.2794-2.8594 2.8594v1.6797h4.2891c.39 0 .71094.57094.71094.96094h-7.1406c-1.58 0-2.8594 1.2794-2.8594 2.8594v3.7812c0 1.58 1.2794 2.8594 2.8594 2.8594h1.1797v-2.6797c0-1.58 1.2716-2.8594 2.8516-2.8594h5.25c1.58 0 2.8594-1.2716 2.8594-2.8516v-3.75c0-1.58-1.2794-2.8594-2.8594-2.8594zm-.71875 1.6094c.4 0 .71875.12094.71875.71094s-.31875.89062-.71875.89062c-.39 0-.71094-.30062-.71094-.89062s.32094-.71094.71094-.71094z" fill="#3c78aa"/>
<path d="m17.959 7v2.6797c0 1.58-1.2696 2.8594-2.8496 2.8594h-5.25c-1.58 0-2.8594 1.2696-2.8594 2.8496v3.75a2.86 2.86 0 0 0 2.8594 2.8613h4.2812a2.86 2.86 0 0 0 2.8594 -2.8613v-1.6797h-4.291c-.39 0-.70898-.56898-.70898-.95898h7.1406a2.86 2.86 0 0 0 2.8594 -2.8613v-3.7793a2.86 2.86 0 0 0 -2.8594 -2.8594zm-9.6387 4.5137-.0039.0039c.01198-.0024.02507-.0016.03711-.0039zm6.5391 7.2754c.39 0 .71094.30062.71094.89062a.71 .71 0 0 1 -.71094 .70898c-.4 0-.71875-.11898-.71875-.70898s.31875-.89062.71875-.89062z" fill="#fdd835"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -1,6 +1,7 @@
(setq max-lisp-eval-depth 10000)
(require 'package)
(add-to-list 'package-archives
'("melpa" . "http://melpa.org/packages/"))
'("melpa" . "http://stable.melpa.org/packages/"))
(package-initialize)
@ -282,7 +283,7 @@
(treemacs-create-icon :file "zip.png" :fallback "🗃️" :extensions ("zip" "tar" "tar.xz" "xz" "xfv" "7z"))
(treemacs-create-icon :file "todo.png" :fallback "🗃️" :extensions ("TODO" "todo" "Tasks" ))
(treemacs-create-icon :file "webassembly" :fallback "🗃️" :extensions ("wasm" "webasm" "webassembly"))
(treemacs-create-icon :file "python" :fallback "🗃️" :extensions ("py" "python"))))
(treemacs-create-icon :file "python.png" :fallback "🗃️" :extensions ("py" "python"))))
(treemacs-load-theme 'Material)
@ -385,7 +386,7 @@
"f v" '(lambda() (interactive) (find-file "~/.config/nvim/init.vim" :which-key "neovim config" ))
"f d" '(lambda() (interactive) (find-file "~/dotfiles/home" :which-key "dotfiles dired" ))
"f a" '(lambda() (interactive) (find-file "~/.config/alacritty/alacritty.yml" :which-key "alacritty"))
"f b" '(lambda() (interactive) (find-file "~/Notes") :which-key "my brain")
"f b" '(lambda() (interactive) (find-file "~/org-notes") :which-key "my brain")
)
(use-package which-key
@ -444,6 +445,7 @@
("DONE"." D ")
("NEXT"." N ")
("IDEA"." 💡 ")
("READ"." 🔖 ")
("DREAM"."")
(":LOGBOOK:"." LOG ")
))
@ -507,10 +509,10 @@
(use-package org
:hook ((org-mode . my/org-mode-setup)
(org-mode . variable-pitch-mode)
(org-mode . org-inddent-mode)
(org-mode . org-indent-mode)
(org-mode . prettify-symbols-mode)
)
:config (setq org-agenda-files `("~/Nextcloud2/Notes/Ideas💡.org" "~/Nextcloud2/Notes/Lists📜.org" "~/Nextcloud2/Notes/Projects💻.org" "~/Nextcloud2/Notes/Tasks🧾.org"))
:config (setq org-agenda-files `("~/org-notes"))
(display-line-numbers-mode 0)
(org-bullets-mode t)
(org-indent-mode t)
@ -524,6 +526,7 @@
("STARTED" . "yellow")
("DREAM" . "pink")
("IDEA" . "gold")
("READ" . "violet")
("ARTICLE" . "lightblue")
("CANCELED" .
(:foreground "blue"
@ -532,7 +535,7 @@
(setq org-todo-keywords '((sequence "TODO(t)" "NEXT(n)" "|" "DONE(d!)")
(sequence "BACKLOG(b)" "PLAN(p)" "READY(r)" "ACTIVE(a)" "REVIEW(v)"
"WAIT(w@/!)" "HOLD(h)" "|" "COMPLETED(c)" "CANC(k@)")
(sequence "IDEA(i)" "DREAM(d)" "ARTICLE(a)" "|" "DONE(d!)")))
(sequence "IDEA(i)" "DREAM(d)" "READ(r)" "ARTICLE(a)" "|" "DONE(d!)")))
(setq org-agenda-custom-commands '(("d" "Dashboard" ((agenda "" ((org-deadline-warning-days 7)))
(todo "NEXT" ((org-agenda-overriding-header
@ -542,6 +545,8 @@
"Active Projects")))))
("n" "Next Tasks" ((todo "NEXT" ((org-agenda-overriding-header
"Next Tasks")))))
("r" "Read pages" ((todo "READ" ((org-agenda-overriding-header
"To read")))))
("i" "Ideas" ((todo "IDEA" ((org-agenda-overriding-header
"Ideas "))
)
@ -638,7 +643,6 @@
(add-to-list 'org-structure-template-alist '("yaml" . "src yaml"))
(add-to-list 'org-structure-template-alist '("json" . "src json"))
(use-package org-roam-server)
(use-package org-roam
:ensure t
:hook
@ -655,33 +659,35 @@
"b b" '(org-roam-buffer-toggle-display :which-key "roam buffer toggle ")
"b s" '(org-roam-buffer-activate :which-key "roam buffer show ")
"b h" '(org-roam-buffer-deactivate :which-key "roam buffer hide ")
"s" '(org-roam-server-mode :which-key "roam server "))
"s" '(org-roam-ui-mode :which-key "roam ui "))
:custom
(org-roam-directory "~/Nextcloud2/Notes")
(org-roam-directory (file-truename "~/org-notes"))
:config
(setq
org-roam-server-host "127.0.0.1"
org-roam-server-port 5034
org-roam-server-authenticate nil
org-roam-server-export-inline-images t
org-roam-server-serve-files nil
org-roam-server-served-file-extensions '("pdf" "mp4" "ogv")
org-roam-server-network-poll t
org-roam-server-network-arrows nil
org-roam-server-network-label-truncate t
org-roam-server-network-label-truncate-length 60
org-roam-server-network-label-wrap-length 20)
(org-roam-db-autosync-mode)
(require 'org-roam-protocol)
(org-roam-server-mode t)
(server-start t)
)
(setq org-roam-v2-ack t)
(setq org-roam-directory (file-truename "~/org-notes"))
(require 'org-roam-protocol)
(use-package websocket
:after org-roam
)
(use-package simple-httpd
:after org-roam
)
(require 'websocket)
(require 'simple-httpd)
(add-to-list 'load-path "~/.emacs.d/private/org-roam-ui")
(load-library "org-roam-ui")
(use-package flycheck
:init
;;(flycheck-c/c++-clang-executable "c/c++-clang" "~/code/competitive/clang++")
@ -717,6 +723,10 @@
(use-package lsp-ivy)
(use-package lsp-ui
:after lsp)
(use-package company-lsp
:ensure t
:commands company-lsp
:config (push 'company-lsp company-backends))
(use-package irony
:init
@ -733,6 +743,14 @@
(add-to-list 'auto-mode-alist '("\\.cxx\\'" . c++-mode))
(add-to-list 'auto-mode-alist '("\\.cpp\\'" . c++-mode))
(add-to-list 'auto-mode-alist '("\\.C\\'" . c++-mode))
(use-package ccls
:ensure t
:config
(setq ccls-executable "ccls")
(setq lsp-prefer-flymake nil)
(setq-default flycheck-disabled-checkers '(c/c++-clang c/c++-cppcheck c/c++-gcc))
:hook ((c-mode c++-mode objc-mode) .
(lambda () (require 'ccls) (lsp))))
(use-package markdown-mode)
@ -755,11 +773,9 @@
(setq rustic-lsp-server 'rls)
)
(setq initial-buffer-choice "~/Nextcloud2/Notes/Tasks🧾.org")
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(package-selected-packages
'(rustic rust-mode workgroups2 which-key visual-fill-column use-package undo-tree tuareg treemacs-projectile treemacs-persp treemacs-magit treemacs-icons-dired treemacs-evil treemacs-all-the-icons realgud rainbow-delimiters pretty-symbols org-roam-server org-caldav org-bullets ob-browser nix-mode neotree lsp-ui lsp-treemacs lsp-ivy ivy-posframe highlight-parentheses gruvbox-theme general flycheck-irony evil-collection elisp-lint doom-themes doom-modeline counsel-projectile company-box clang-format+ all-the-icons-ivy-rich all-the-icons-ivy)))
(use-package mastodon
:config
(setq mastodon-instance-url "https://mastodon.ml")
)
(org-agenda)

View file

@ -0,0 +1,3 @@
;;; public entries -*- mode: plstore -*-
(("mastodon-https://mastodon.ml" :id "2598" :name "mastodon.el" :website "https://github.com/jdenen/mastodon.el" :redirect_uri "urn:ietf:wg:oauth:2.0:oob" :client_id "iHqXKa5piSOsmkqynq-XMFVGMLpusIqsUdyGPOOpXMk" :client_secret "pMU14n1X8B28rC0ZQyEfQluV3QE74W1ygUZzvAWojsM" :vapid_key "BBqZRaF-YBnGFh-c6VZO9dkjfzAmOeCSMwQEgb7sp0EnMH1xHzfks29tTNtvLw45MdLjNKN4-8W7JvG1vP4376o=")
("mastodon-https://mastodon.social" :id "872135" :name "mastodon.el" :website "https://github.com/jdenen/mastodon.el" :redirect_uri "urn:ietf:wg:oauth:2.0:oob" :client_id "_rt1V_Z2TKD-uvs6SsP0s7B_vy7nyifIqRUQQLm8MN0" :client_secret "DIzCJmnUzziajbp_VMGpVDq373hMcoSPlnX_4ysRfig" :vapid_key "BCk-QqERU0q-CfYZjcuB6lnyyOYfJ2AifKqfeGIm7Z-HiTU5T9eTG5GxVA0_OH5mMlI4UkkDTpaZwozy0TzdZ2M="))

@ -0,0 +1 @@
Subproject commit 9ad111d2102c24593f6ac012206bb4b2c9c6c4e1