1
0
mirror of https://github.com/alrayyes/dotfiles/ synced 2023-11-14 15:56:30 +00:00

Compare commits

..

5 Commits

Author SHA1 Message Date
Ryan Kes
8a375478f4 added shortcut to move code block 2020-09-10 15:04:20 +02:00
Ryan Kes
0f3e91895e removed nerdcommenter & vimpolyglot, added vim-commentary & vim-unimpaired 2020-09-10 13:06:16 +02:00
Ryan Kes
cc14ce9715 cleaned up emacs config 2020-09-10 12:41:34 +02:00
Ryan Kes
4dc4675c40 let doom handle literate config 2020-09-10 12:16:11 +02:00
Ryan Kes
ca42eda71a added useful stuff to emacs config 2020-09-06 18:37:15 +02:00
5 changed files with 244 additions and 53 deletions

View File

@ -180,10 +180,10 @@ A repository of my personal configuration files.
- [[https://github.com/fatih/vim-go][fatih/vim-go]] - [[https://github.com/fatih/vim-go][fatih/vim-go]]
- [[https://github.com/godlygeek/tabular][godlygeek/tabular]] - [[https://github.com/godlygeek/tabular][godlygeek/tabular]]
- [[https://github.com/neoclide/coc.nvim][neoclice/coc.nvim]] - [[https://github.com/neoclide/coc.nvim][neoclice/coc.nvim]]
- [[https://github.com/preservim/nerdcommenter][preservim/nerdcommenter]]
- [[https://github.com/RRethy/vim-hexokinase][RRethy/vim-hexokinase]] - [[https://github.com/RRethy/vim-hexokinase][RRethy/vim-hexokinase]]
- [[https://github.com/sheerun/vim-polyglot][sheerun/vim-polyglot]] - [[https://github.com/tpope/vim-commentary][tpope/vim-commentary]]
- [[https://github.com/tpope/vim-fugitive][tpope/vim-fugitive]] - [[https://github.com/tpope/vim-fugitive][tpope/vim-fugitive]]
- [[https://github.com/tpope/vim-unimpaired][tpope/vim-unimpaired]]
- [[https://github.com/Xuyuanp/nerdtree-git-plugin][Xuyuanp/nerdtree-git-plugin]] - [[https://github.com/Xuyuanp/nerdtree-git-plugin][Xuyuanp/nerdtree-git-plugin]]
-[[https://github.com/Yggdroot/indentLine][ Yggdroot/indentLine]] -[[https://github.com/Yggdroot/indentLine][ Yggdroot/indentLine]]
*** UI *** UI

View File

@ -1,5 +1,193 @@
;;; .doom.d/config.el -*- lexical-binding: t; -*- (when window-system
(if (> (x-display-pixel-width) 2560)
(setq doom-font (font-spec :family "JetBrains Mono" :size 12))
(setq doom-font (font-spec :family "JetBrains Mono" :size 16))))
;; Place your private configuration here (setq doom-theme 'doom-molokai)
(org-babel-load-file "~/.config/doom/configuration.org") (defun my-fetch-password (&rest params)
(require 'auth-source)
(let ((match (car (apply #'auth-source-search params))))
(if match
(let ((secret (plist-get match :secret)))
(if (functionp secret)
(funcall secret)
secret))
(error "Password not found for %S" params))))
(setq display-line-numbers-type `relative)
(use-package! projectile
:config
(setq projectile-project-search-path '("~/devel/personal/" "~/devel/andthensome/" "~/Documents/" "~/dotfiles" "~/private-dotfiles"))) ; Default paths
(use-package! circe
:config
(setq circe-network-options
`(
("znc-freenode"
:host "irc.higherlearning.eu"
:port "5000"
:tls t ;; Enable tls
:user "l0rd/freenode"
:server-buffer-name "⇄ Freenode (ZNC)"
:pass (lambda (&rest _) (+pass-get-secret "controlpanel/irc.higherlearning.eu")) ;; Get password from pass
:channels ("#emacs"))
("znc-snoonet"
:host "irc.higherlearning.eu"
:port "5000"
:tls t
:user "l0rd/snoonet"
:server-buffer-name "⇄ Snoonet (ZNC)"
:pass (lambda (&rest _) (+pass-get-secret "controlpanel/irc.higherlearning.eu"))
:channels ("#islam"))
))
)
(add-hook 'circe-channel-mode-hook 'enable-lui-autopaste)
(setq deft-directory "~/Documents/org-roam")
(after! org
(map! :map org-mode-map
:n "M-j" #'org-metadown
:n "M-k" #'org-metaup)
)
(add-hook 'auto-save-hook 'org-save-all-org-buffers)
(setq org-directory "~/Documents/org"
org-agenda-files (directory-files-recursively "~/Documents/org/" "\.org$")
org-log-done 'note
org-startup-with-inline-images t)
(use-package! org-protocol-capture-html)
(after! org
(add-to-list 'org-capture-templates '("w" "Web site" entry
(file+olp "~/Documents/org/web.org" "Web")
"* %c\n%U %?%:initial"))
)
(setq org-roam-directory "~/Documents/org-roam")
(setq org-roam-graph-viewer "~/.local/bin/viewDotfile")
(setq org-journal-dir "~/Documents/org-roam")
(setq org-journal-date-prefix "#+title: ")
(setq org-journal-file-format "%Y-%m-%d.org")
(setq org-journal-date-format "%A, %d %B %Y")
(setq org-publish-project-alist
'(("wiki"
:base-directory "~/Documents/org-roam/"
:publishing-directory "~/devel/personal/Ryankes.eu/wiki/content/"
:publishing-function org-pandoc-export-to-markdown_mmd
:select-tags ("export-blog")
)))
(use-package! mu4e
:config
(setq sendmail-program "/usr/bin/msmtp"
send-mail-function
'smtpmail-send-it
message-sendmail-f-is-evil
t
message-sendmail-extra-arguments
'("--read-envelope-from")
message-send-mail-function
'message-send-mail-with-sendmail)
(setq mu4e-maildirs-extension-custom-list '("/ryankes/INBOX" "/ryankes/Sent" "/ryankes/Drafts"
"/ryankes/Archive" "/ryankes/Archive.quicknet"
"/gmail/INBOX" "/gmail/Sent" "/gmail/Drafts"
"/gmail/Archive" "/andthensome/INBOX" "/andthensome/Sent"
"/andthensome/Drafts" "/andthensome/Archive")))
(setq mu4e-maildir "~/.local/share/mail"
mu4e-maildir-shortcuts
'(("/ryankes/INBOX" . ?r)
("/gmail/INBOX" . ?g)
("/andthensome/INBOX" . ?a))
mu4e-mu-home
"~/.cache/mu"
mu4e-update-interval
300
mu4e-get-mail-command
"mailsync"
mu4e-enable-mode-line
t
mu4e-use-fancy-chars
t
mu4e-context-policy
'pick-first
mu4e-attachment-dir
"~/Downloads/")
(after! mu4e
;; load package to be able to capture emails for GTD
(require 'org-mu4e)
(setq mu4e-contexts
`(,(make-mu4e-context :name "Ryankes"
:match-func (lambda (msg)
(when msg
(string-match-p "^/ryankes"
(mu4e-message-field msg :maildir)))):vars'((user-mail-address . "ryan@ryankes.eu")
(user-full-name . "Ryan")
(mu4e-sent-folder . "/ryankes/Sent")
(mu4e-drafts-folder . "/ryankes/Drafts")
(mu4e-trash-folder . "/ryankes/Trash")
(mu4e-refile-folder . "/ryankes/Archive")))
,(make-mu4e-context :name "Gmail"
:match-func (lambda (msg)
(when msg
(string-match-p "^/gmail"
(mu4e-message-field msg :maildir)))):vars'((user-mail-address . "alrayyes@gmail.com")
(user-full-name . "Ryan")
(mu4e-sent-folder . "/gmail/Sent")
(mu4e-drafts-folder . "/gmail/Drafts")
(mu4e-trash-folder . "/gmail/Trash")
(mu4e-refile-folder . "/gmail/Archive")))
,(make-mu4e-context :name "Andthensome"
:match-func (lambda (msg)
(when msg
(string-match-p "^/andthensome"
(mu4e-message-field msg :maildir)))):vars'((user-mail-address . "ryan@andthensome.nl")
(user-full-name . "Ryan Kes")
(mu4e-sent-folder . "/andthensome/Sent")
(mu4e-drafts-folder . "/andthensome/Drafts")
(mu4e-trash-folder . "/andthensome/Trash")
(mu4e-refile-folder . "/andthensome/Archive"))))))
(add-hook 'mu4e-view-mode-hook 'visual-line-mode)
(use-package! elfeed
:config
(setq elfeed-use-curl t)
(elfeed-set-timeout 36000)
(setq elfeed-protocol-ttrss-maxsize 200) ; bigger than 200 is invalid
(elfeed-protocol-enable)
;
(defadvice elfeed (after configure-elfeed-feeds activate)
"Make elfeed-org autotags rules works with elfeed-protocol."
(defvar elfeed-protocol-tags)
(setq elfeed-protocol-tags elfeed-feeds)
(setq elfeed-feeds (list
(list "ttrss+https://alrayyes@rss.higherlearning.eu"
:password (password-store-get "emacs/rss")
:autotags elfeed-protocol-tags)))))
(use-package! elfeed-org
:config
(setq rmh-elfeed-org-files '("~/Documents/org/elfeed.org"))
)
(use-package! elfeed-goodies
:config
(elfeed-goodies/setup))
(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_GB,nl_NL,en_US")
(setq ispell-dictionary "en_GB,nl_NL,en_US"))
(add-to-list 'auto-mode-alist '("\\.mdx\\'" . markdown-mode))

View File

@ -10,7 +10,7 @@
(doom! :completion (doom! :completion
company ; the ultimate code completion backend company ; the ultimate code completion backend
ivy ; a search engine for love and life (ivy +icons) ; a search engine for love and life
:ui :ui
deft deft
@ -18,12 +18,12 @@
doom-dashboard ; a nifty splash screen for Emacs doom-dashboard ; a nifty splash screen for Emacs
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
modeline ; snazzy, Atom-inspired modeline, plus API modeline ; snazzy, Atom-inspired modeline, plus API
nav-flash ; blink the current line after jumping ;;nav-flash ; blink the current line after jumping
ophints ; highlight the region an operation acts on ophints ; highlight the region an operation acts on
(popup ; tame sudden yet inevitable temporary windows (popup ; tame sudden yet inevitable temporary windows
+all ; catch all popups that start with an asterix +all ; catch all popups that start with an asterix
+defaults) ; default popup rules +defaults) ; default popup rules
pretty-code ; replace bits of code with pretty symbols ligatures
treemacs ; a project drawer, like neotree but cooler treemacs ; a project drawer, like neotree but cooler
vc-gutter ; vcs diff in the fringe vc-gutter ; vcs diff in the fringe
vi-tilde-fringe ; fringe tildes to mark beyond EOB vi-tilde-fringe ; fringe tildes to mark beyond EOB
@ -35,17 +35,17 @@
file-templates ; auto-snippets for empty files file-templates ; auto-snippets for empty files
fold ; (nigh) universal code folding fold ; (nigh) universal code folding
(format +onsave +format-with-lsp) ; automated prettiness (format +onsave +format-with-lsp) ; automated prettiness
multiple-cursors ; editing in many places at once ;multiple-cursors ; editing in many places at once
rotate-text ; cycle region at point between text candidates ;rotate-text ; cycle region at point between text candidates
snippets ; my elves. They type so I don't have to ;snippets ; my elves. They type so I don't have to
word-wrap ; soft wrapping with language-aware indent word-wrap ; soft wrapping with language-aware indent
:emacs :emacs
(dired +icons (dired +icons +ranger)
+ranger) ; making dired pretty [functional] electric
electric ; smarter, keyword-based electric-indent (ibuffer +icons)
ibuffer ; interactive buffer management vc
vc ; version-control and Emacs, sitting in a tree (undo +tree)
:term :term
;;eshell ; a consistent, cross-platform shell (WIP) ;;eshell ; a consistent, cross-platform shell (WIP)
@ -54,47 +54,44 @@
;;vterm ; another terminals in Emacs ;;vterm ; another terminals in Emacs
:checkers :checkers
spell syntax
(spell +aspell)
grammar grammar
:tools :tools
biblio biblio
docker (docker +lsp)
editorconfig ; let someone else argue about tabs vs spaces editorconfig
(eval +overlay) ; run code, run (also, repls) (eval +overlay)
lsp lsp
magit ; a git porcelain for Emacs magit
make ; run make tasks from Emacs make
pass ; password manager for nerds pass
pdf ; pdf enhancements pdf
:lang :lang
(cc +lsp) ; C/C++/Obj-C madness (cc +lsp)
data ; config/data formats data
emacs-lisp ; drown in parentheses emacs-lisp
(go (go +lsp)
+lsp) (javascript +lsp)
(javascript ; all(hope(abandon(ye(who(enter(here)))))) ledger
+lsp) (markdown +grip)
ledger ; an accounting system in Emacs (org
markdown ; writing docs for people to ignore
(org ; organize your plain life in plain text
+noter +noter
+journal +journal
+roam +roam
+dragndrop ; drag & drop files/images into org buffers +dragndrop
+pandoc +pandoc
+present) ; using org-mode for presentations +pretty
(php +present)
+lsp) ; perl's insecure younger brother (json +lsp)
(python (php +lsp)
+lsp) ; beautiful is better than ugly (python +lsp)
(rust (rust +lsp)
+lsp) ; rust support (sh +lsp +fish)
(sh (web +lsp)
+lsp) ; she sells {ba,z,fi}sh shells on the C xor (yaml +lsp)
(web
+lsp) ; the tubes
:email :email
mu4e mu4e
@ -104,5 +101,7 @@
irc ; how neckbeards socialize irc ; how neckbeards socialize
(rss +org) ; emacs as an RSS reader (rss +org) ; emacs as an RSS reader
:config :config
literate
(default +bindings +smartparens)) (default +bindings +smartparens))

View File

@ -38,10 +38,10 @@
Plug 'fatih/vim-go' Plug 'fatih/vim-go'
Plug 'godlygeek/tabular' Plug 'godlygeek/tabular'
Plug 'neoclide/coc.nvim', {'branch': 'release'} Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'preservim/nerdcommenter'
Plug 'rrethy/vim-hexokinase', { 'do': 'make hexokinase' } Plug 'rrethy/vim-hexokinase', { 'do': 'make hexokinase' }
Plug 'sheerun/vim-polyglot' Plug 'tpope/vim-commentary'
Plug 'tpope/vim-fugitive' Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-unimpaired'
Plug 'Xuyuanp/nerdtree-git-plugin' Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'Yggdroot/indentLine' Plug 'Yggdroot/indentLine'
" } " }
@ -148,11 +148,6 @@
map <C-e> :NERDTreeToggle<CR> map <C-e> :NERDTreeToggle<CR>
" } " }
" NerdCommenter {
" Add spaces after comment delimiters by default
let g:NERDSpaceDelims = 1
" }
" Airline { " Airline {
" Enable powerline fonts " Enable powerline fonts
let g:airline_powerline_fonts=1 let g:airline_powerline_fonts=1
@ -234,4 +229,13 @@
" closetag { " closetag {
let g:closetag_filetypes = 'html,xhtml,phtml,vue' let g:closetag_filetypes = 'html,xhtml,phtml,vue'
" } " }
" unimpaired {
" Move single lines
nmap <M-k> [e
nmap <M-j> ]e
" Move multiple selected lines
vmap <M-k> [egv
vmap <M-j> ]egv
" }
" } " }