Early May update

- Added new doom emacs config
This commit is contained in:
minhtrannhat 2022-05-15 16:12:39 -04:00
parent 993adb372d
commit 9d9fdee9cb
No known key found for this signature in database
GPG Key ID: 894C6A5801E01CA9
9 changed files with 386 additions and 208 deletions

View File

@ -5,72 +5,263 @@
;; Some functionality uses this to identify you, e.g. GPG configuration, email ;; Some functionality uses this to identify you, e.g. GPG configuration, email
;; clients, file templates and snippets. It is optional. ;; clients, file templates and snippets.
(setq user-full-name "John Doe" (setq user-full-name "minhtrannhat"
user-mail-address "john@doe.com") user-mail-address "minhtrannhat2001@gmail.com")
;; Doom exposes five (optional) variables for controlling fonts in Doom: ;; Doom exposes five (optional) variables for controlling fonts in Doom. Here
;; are the three important ones:
;; ;;
;; - `doom-font' -- the primary font to use ;; + `doom-font'
;; - `doom-variable-pitch-font' -- a non-monospace font (where applicable) ;; + `doom-variable-pitch-font'
;; - `doom-big-font' -- used for `doom-big-font-mode'; use this for ;; + `doom-big-font' -- used for `doom-big-font-mode'; use this for
;; presentations or streaming. ;; presentations or streaming.
;; - `doom-unicode-font' -- for unicode glyphs (setq doom-font (font-spec :family "JetBrainsMono Nerd Font" :size 18)
;; - `doom-serif-font' -- for the `fixed-pitch-serif' face doom-big-font (font-spec :family "JetBrainsMono Nerd Font" :size 26)
;; doom-variable-pitch-font (font-spec :family "Overpass" :size 16)
;; See 'C-h v doom-font' for documentation and more examples of what they doom-unicode-font (font-spec :family "JuliaMono")
;; accept. For example: doom-serif-font (font-spec :family "IBM Plex Mono" :weight 'light))
;;
;;(setq doom-font (font-spec :family "Fira Code" :size 12 :weight 'semi-light)
;; doom-variable-pitch-font (font-spec :family "Fira Sans" :size 13))
;;
;; If you or Emacs can't find your font, use 'M-x describe-font' to look them
;; up, `M-x eval-region' to execute elisp code, and 'M-x doom/reload-font' to
;; refresh your font settings. If Emacs still can't find your font, it likely
;; wasn't installed correctly. Font issues are rarely Doom issues!
;; There are two ways to load a theme. Both assume the theme is installed and (setq doom-emoji-fallback-font-families nil)
;; available. You can either set `doom-theme' or manually load a theme with the (setq doom-symbol-fallback-font-families nil)
;; `load-theme' function. This is the default:
(setq doom-theme 'doom-one)
;; This determines the style of line numbers in effect. If set to `nil', line (setq fancy-splash-image "/home/minhradz/.doom.d/marivector.png")
;; numbers are disabled. For relative line numbers, set this to `relative'.
(setq display-line-numbers-type t) (defun synchronize-theme ()
(let* ((light-theme 'doom-gruvbox-light)
(dark-theme 'doom-gruvbox)
(start-time-light-theme 6)
(end-time-light-theme 16)
(hour (string-to-number (substring (current-time-string) 11 13)))
(next-theme (if (member hour (number-sequence start-time-light-theme end-time-light-theme))
light-theme dark-theme)))
(when (not (equal doom-theme next-theme))
(setq doom-theme next-theme)
(load-theme next-theme t))))
(run-with-timer 0 900 'synchronize-theme)
(setq doom-themes-enable-bold t ; if nil, bold is universally disabled
doom-themes-enable-italic t) ; if nil, italics is universally disabled
(with-eval-after-load 'doom-themes
(doom-themes-treemacs-config))
(setq doom-themes-treemacs-theme "doom-colors")
;; If you use `org' and don't want your org files in the default location below,
;; change `org-directory'. It must be set before org loads!
(setq org-directory "~/org/") (setq org-directory "~/org/")
(setq display-line-numbers-type 'relative)
;; Whenever you reconfigure a package, make sure to wrap your config in an (add-hook 'spell-fu-mode-hook
;; `after!' block, otherwise Doom's defaults may override your settings. E.g. (lambda ()
;; (spell-fu-dictionary-add (spell-fu-get-ispell-dictionary "en"))
;; (after! PACKAGE (spell-fu-dictionary-add
;; (setq x y)) (spell-fu-get-personal-dictionary "en-personal" "/home/minhradz/.aspell.en.pws"))))
;;
;; The exceptions to this rule: ;; Clangd lsp for C/C++ dev
;; (setq lsp-clients-clangd-args '("-j=3"
;; - Setting file/directory variables (like `org-directory') "--background-index"
;; - Setting variables which explicitly tell you to set them before their "--clang-tidy"
;; package is loaded (see 'C-h v VARIABLE' to look up their documentation). "--completion-style=detailed"
;; - Setting doom variables (which start with 'doom-' or '+'). "--header-insertion=never"
;; "--header-insertion-decorators=0"))
;; Here are some additional functions/macros that will help you configure Doom. (after! lsp-clangd (set-lsp-priority! 'clangd 2))
;;
;; - `load!' for loading external *.el files relative to this one ;; I mindlessly press ESC, so stop me from wreaking havoc
;; - `use-package!' for configuring packages (global-set-key (kbd "<escape>") 'keyboard-escape-quit)
;; - `after!' for running code after a package has loaded
;; - `add-load-path!' for adding directories to the `load-path', relative to ;; update the git gutter
;; this file. Emacs searches the `load-path' when you load packages with (custom-set-variables
;; `require' or `use-package'. '(git-gutter:update-interval 0.02))
;; - `map!' for binding new keys
;; ;; ;; tree-sitter syntax highlighting
;; To get information about any of these functions/macros, move the cursor over ;; (use-package! tree-sitter
;; the highlighted symbol at press 'K' (non-evil users must press 'C-c c k'). ;; :config
;; This will open documentation for it, including demos of how they are used. ;; (require 'tree-sitter-langs)
;; Alternatively, use `C-h o' to look up a symbol (functions, variables, faces, ;; (global-tree-sitter-mode)
;; etc). ;; (add-hook 'tree-sitter-after-on-hook #'tree-sitter-hl-mode))
;;
;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how ;; gpg
;; they are implemented. (setq epg-pinentry-mode 'loopback)
;; both jk and kj now works
(setq evil-escape-unordered-key-sequence 't)
;; org org
(setq +latex-viewers '(zathura))
;; fish fish
(setq vterm-shell 'fish)
(defun doom-modeline-conditional-buffer-encoding ()
"We expect the encoding to be LF UTF-8, so only show the modeline when this is not the case"
(setq-local doom-modeline-buffer-encoding
(unless (and (memq (plist-get (coding-system-plist buffer-file-coding-system) :category)
'(coding-category-undecided coding-category-utf-8))
(not (memq (coding-system-eol-type buffer-file-coding-system) '(1 2))))
t)))
(add-hook 'after-change-major-mode-hook #'doom-modeline-conditional-buffer-encoding)
(after! company
(setq company-idle-delay 1)
(add-hook 'evil-normal-state-entry-hook #'company-abort)) ;; make aborting less annoying.
(setq-default history-length 1000)
(setq-default prescient-history-length 1000)
;; Whether display the icon for `major-mode'. It respects `doom-modeline-icon'.
(setq doom-modeline-major-mode-icon t)
;; Whether display the colorful icon for `major-mode'.
;; It respects `all-the-icons-color-icons'.
(setq doom-modeline-major-mode-color-icon t)
;; Whether display the icon for the buffer state. It respects `doom-modeline-icon'.
(setq doom-modeline-buffer-state-icon t)
;; Whether display the modification icon for the buffer.
;; It respects `doom-modeline-icon' and `doom-modeline-buffer-state-icon'.
(setq doom-modeline-buffer-modification-icon t)
;; Whether to use unicode as a fallback (instead of ASCII) when not using icons.
(setq doom-modeline-unicode-fallback nil)
;; Whether display the minor modes in the mode-line.
(setq doom-modeline-minor-modes nil)
(use-package! websocket
:after org-roam)
(use-package! org-roam-ui
:after org-roam ;; or :after org
;; normally we'd recommend hooking orui after org-roam, but since org-roam does not have
;; a hookable mode anymore, you're advised to pick something yourself
;; if you don't care about startup time, use
;; :hook (after-init . org-roam-ui-mode)
:config
(setq org-roam-ui-sync-theme t
org-roam-ui-follow t
org-roam-ui-update-on-save t
org-roam-ui-open-on-start t))
(setq org-roam-dailies-directory "daily/")
(setq org-roam-dailies-capture-templates
'(("d" "default" entry
"* %?"
:target (file+head "%<%Y-%m-%d>.org"
"#+title: %<%Y-%m-%d>\n* What I did today\n* What was on my mind"))))
(defun org-roam-rg-search ()
"Search org-roam directory using consult-ripgrep. With live-preview."
(interactive)
(let ((consult-ripgrep-command "rg --null --ignore-case --type org --line-buffered --color=always --max-columns=500 --no-heading --line-number . -e ARG OPTS"))
(consult-ripgrep org-roam-directory)))
(map! :leader
:desc "Search org-roam with consult-ripgrep"
"n r F" #'org-roam-rg-search)
;; Function for inserting node into Org Roam
(defun org-roam-node-insert-immediate (arg &rest args)
(interactive "P")
(let ((args (cons arg args))
(org-roam-capture-templates (list (append (car org-roam-capture-templates)
'(:immediate-finish t)))))
(apply #'org-roam-node-insert args)))
(map! :leader
:desc "Insert node immediately"
"n r I" #'org-roam-node-insert-immediate)
(setq avy-all-windows 't)
;; Disables lsp-signature-auto-activate
;; Looking at you, rustic mode
(after! lsp-mode
(setq lsp-signature-auto-activate nil))
;; this never worked lol
(lsp-treemacs-sync-mode 1)
;; bitmap very funni
(setq highlight-indent-guides-method 'bitmap)
;; magit delta looks so good
(add-hook 'magit-mode-hook (lambda () (magit-delta-mode +1)))
;; keybind to disable search highlighting (like :set noh)
(map! :leader
:desc "Clear search highlight"
"s c"
#'evil-ex-nohighlight)
;; We do a little bit of finger pointing
(use-package blamer
:bind (("s-i" . blamer-show-commit-info))
:defer 20
:custom
(blamer-idle-time 0.3)
(blamer-min-offset 40)
:custom-face
(blamer-face ((t :foreground "#7a88cf"
:background nil
:height 110
:italic t)))
:config
(global-blamer-mode 1))
;; elfeed the rss reader
(after! elfeed
(setq elfeed-search-filter "@1-month-ago"))
(add-hook! 'elfeed-search-mode-hook #'elfeed-update)
(map! :map elfeed-search-mode-map
:after elfeed-search
[remap kill-this-buffer] "q"
[remap kill-buffer] "q"
:n doom-leader-key nil
:n "q" #'+rss/quit
:n "e" #'elfeed-update
:n "r" #'elfeed-search-untag-all-unread
:n "u" #'elfeed-search-tag-all-unread
:n "s" #'elfeed-search-live-filter
:n "l" #'elfeed-search-show-entry
:n "p" #'elfeed-show-pdf
:n "+" #'elfeed-search-tag-all
:n "-" #'elfeed-search-untag-all
:n "S" #'elfeed-search-set-filter
:n "b" #'elfeed-search-browse-url
:n "y" #'elfeed-search-yank)
(map! :map elfeed-show-mode-map
:after elfeed-show
[remap kill-this-buffer] "q"
[remap kill-buffer] "q"
:n doom-leader-key nil
:nm "h" #'+rss/delete-pane
:nm "o" #'elfeed-goodies/show-ace-link
:nm "RET" #'org-ref-elfeed-add
:nm "n" #'elfeed-show-next
:nm "N" #'elfeed-show-prev
:nm "p" #'elfeed-show-pdf
:nm "+" #'elfeed-show-tag
:nm "-" #'elfeed-show-untag
:nm "s" #'elfeed-show-new-live-search
:nm "y" #'elfeed-show-yank)
(after! elfeed-search
(set-evil-initial-state! 'elfeed-search-mode 'normal))
(after! elfeed-show-mode
(set-evil-initial-state! 'elfeed-show-mode 'normal))
(after! evil-snipe
(push 'elfeed-show-mode evil-snipe-disabled-modes)
(push 'elfeed-search-mode evil-snipe-disabled-modes))
(setq org-agenda-time-grid
(quote
((daily today remove-match)
(800 1200 1600 2000)
"......" "----------------")))

View File

@ -1,191 +1,175 @@
;;; init.el -*- lexical-binding: t; -*- ;;; init.el -*- lexical-binding: t; -*-
;; This file controls what Doom modules are enabled and what order they load ;; This file controls what Doom modules are enabled and what order they load
;; in. Remember to run 'doom sync' after modifying it! ;; in. Remember to run 'doom sync' after modifying it!
;; NOTE Press 'SPC h d h' (or 'C-h d h' for non-vim users) to access Doom's ;; NOTE Press 'SPC h d h' (or 'C-h d h' for non-vim users) to access Doom's
;; documentation. There you'll find a link to Doom's Module Index where all ;; documentation. There you'll find a "Module Index" link where you'll find
;; of our modules are listed, including what flags they support. ;; a comprehensive list of Doom's modules and what flags they support.
;; NOTE Move your cursor over a module's name (or its flags) and press 'K' (or ;; NOTE Move your cursor over a module's name (or its flags) and press 'K' (or
;; 'C-c c k' for non-vim users) to view its documentation. This works on ;; 'C-c c k' for non-vim users) to view its documentation. This works on
;; flags as well (those symbols that start with a plus). ;; flags as well (those symbols that start with a plus).
;; ;;
;; Alternatively, press 'gd' (or 'C-c c d') on a module to browse its ;; Alternatively, press 'gd' (or 'C-c c d') on a module to browse its
;; directory (for easy access to its source code). ;; directory (for easy access to its source code).
(doom! :input (doom! :input
;;chinese ;;chinese
;;japanese ;;japanese
;;layout ; auie,ctsrnm is the superior home row ;;layout ; auie,ctsrnm is the superior home row
:completion :completion
company ; the ultimate code completion backend company ; the ultimate code completion backend
;;helm ; the *other* search engine for love and life ;;helm ; the *other* search engine for love and life
;;ido ; the other *other* search engine... ;;ido ; the other *other* search engine...
;;ivy ; a search engine for love and life (ivy +fuzzy +icons) ; a search engine for love and life
vertico ; the search engine of the future ;;vertico ; the search engine of the future
:ui :ui
;;deft ; notational velocity for Emacs ;;deft ; notational velocity for Emacs
doom ; what makes DOOM look the way it does doom ; what makes DOOM look the way it does
doom-dashboard ; a nifty splash screen for Emacs doom-dashboard ; a nifty splash screen for Emacs
doom-quit ; DOOM quit-message prompts when you quit Emacs doom-quit ; DOOM quit-message prompts when you quit Emacs
;;(emoji +unicode) ; 🙂 (emoji +unicode) ; 🙂
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
;;hydra ;;hydra
;;indent-guides ; highlighted indent columns indent-guides ; highlighted indent columns
;;ligatures ; ligatures and symbols to make your code pretty again ligatures ; ligatures and symbols to make your code pretty again
;;minimap ; show a map of the code on the side ;;minimap ; show a map of the code on the side
modeline ; snazzy, Atom-inspired modeline, plus API modeline ; snazzy, Atom-inspired modeline, plus API
;;nav-flash ; blink cursor line after big motions ;;nav-flash ; blink cursor line after big motions
;;neotree ; a project drawer, like NERDTree for vim ;;neotree ; a project drawer, like NERDTree for vim
ophints ; highlight the region an operation acts on ophints ; highlight the region an operation acts on
(popup +defaults) ; tame sudden yet inevitable temporary windows (popup +defaults) ; tame sudden yet inevitable temporary windows
;;tabs ; a tab bar for Emacs ;;tabs ; a tab bar for Emacs
;;treemacs ; a project drawer, like neotree but cooler (treemacs +lsp) ; a project drawer, like neotree but cooler
;;unicode ; extended unicode support for various languages unicode ; extended unicode support for various languages
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
;;window-select ; visually switch windows (window-select +numbers) ; visually switch windows
workspaces ; tab emulation, persistence & separate workspaces workspaces ; tab emulation, persistence & separate workspaces
;;zen ; distraction-free coding or writing zen ; distraction-free coding or writing
:editor :editor
(evil +everywhere); come to the dark side, we have cookies (evil +everywhere); come to the dark side, we have cookies
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) ; automated prettiness (format +onsave) ; automated prettiness
;;god ; run Emacs commands without modifier keys ;;god ; run Emacs commands without modifier keys
;;lispy ; vim for lisp, for people who don't like vim ;;lispy ; vim for lisp, for people who don't like vim
;;multiple-cursors ; editing in many places at once multiple-cursors ; editing in many places at once
;;objed ; text object editing for the innocent ;;objed ; text object editing for the innocent
;;parinfer ; turn lisp into python, sort of ;;parinfer ; turn lisp into python, sort of
;;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 ; making dired pretty [functional] (dired +icons +ranger) ; making dired pretty [functional]
electric ; smarter, keyword-based electric-indent electric ; smarter, keyword-based electric-indent
;;ibuffer ; interactive buffer management ibuffer ; interactive buffer management
undo ; persistent, smarter undo for your inevitable mistakes undo ; persistent, smarter undo for your inevitable mistakes
vc ; version-control and Emacs, sitting in a tree vc ; version-control and Emacs, sitting in a tree
:term :term
;;eshell ; the elisp shell that works everywhere eshell ; the elisp shell that works everywhere
;;shell ; simple shell REPL for Emacs ;;shell ; simple shell REPL for Emacs
;;term ; basic terminal emulator for Emacs ;;term ; basic terminal emulator for Emacs
;;vterm ; the best terminal emulation in Emacs vterm ; the best terminal emulation in Emacs
:checkers :checkers
syntax ; tasing you for every semicolon you forget syntax ; tasing you for every semicolon you forget
;;(spell +flyspell) ; tasing you for misspelling mispelling (spell +everywhere +aspell); tasing you for misspelling mispelling
;;grammar ; tasing grammar mistake every you make ;;grammar ; tasing grammar mistake every you make
:tools :tools
;;ansible ;;ansible
;;biblio ; Writes a PhD for you (citation needed)
;;debugger ; FIXME stepping through code, to help you add bugs ;;debugger ; FIXME stepping through code, to help you add bugs
;;direnv direnv
;;docker (docker +lsp)
;;editorconfig ; let someone else argue about tabs vs spaces ;;editorconfig ; let someone else argue about tabs vs spaces
;;ein ; tame Jupyter notebooks with emacs ein ; tame Jupyter notebooks with emacs
(eval +overlay) ; run code, run (also, repls) (eval +overlay) ; run code, run (also, repls)
;;gist ; interacting with github gists gist ; interacting with github gists
lookup ; navigate your code and its documentation (lookup +dictionary + docsets +offline) ; navigate your code and its documentation
;;lsp ; M-x vscode lsp ; M-x vscode
magit ; a git porcelain for Emacs (magit +forge) ; a git porcelain for Emacs
;;make ; run make tasks from Emacs make ; run make tasks from Emacs
;;pass ; password manager for nerds (pass +auth) ; password manager for nerds
;;pdf ; pdf enhancements pdf ; pdf enhancements
;;prodigy ; FIXME managing external services & code builders ;;prodigy ; FIXME managing external services & code builders
;;rgb ; creating color strings ;;rgb ; creating color strings
;;taskrunner ; taskrunner for all your projects taskrunner ; taskrunner for all your projects
;;terraform ; infrastructure as code ;;terraform ; infrastructure as code
;;tmux ; an API for interacting with tmux tmux ; an API for interacting with tmux
;;upload ; map local to remote projects via ssh/ftp ;;upload ; map local to remote projects via ssh/ftp
:os :os
(:if IS-MAC macos) ; improve compatibility with macOS ;;(:if IS-MAC macos) ; improve compatibility with macOS
;;tty ; improve the terminal Emacs experience tty ; improve the terminal Emacs experience
:lang :lang
;;agda ; types of types of types of types... ;;agda ; types of types of types of types...
;;beancount ; mind the GAAP ;;beancount ; mind the GAAP
;;(cc +lsp) ; C > C++ == 1 (cc +lsp) ; C > C++ == 1
;;clojure ; java with a lisp clojure ; java with a lisp
;;common-lisp ; if you've seen one lisp, you've seen them all common-lisp ; if you've seen one lisp, you've seen them all
;;coq ; proofs-as-programs ;;coq ; proofs-as-programs
;;crystal ; ruby at the speed of c ;;crystal ; ruby at the speed of c
;;csharp ; unity, .NET, and mono shenanigans csharp ; unity, .NET, and mono shenanigans
;;data ; config/data formats ;;data ; config/data formats
;;(dart +flutter) ; paint ui and not much else ;;(dart +flutter) ; paint ui and not much else
;;dhall ;;dhall
;;elixir ; erlang done right elixir ; erlang done right
;;elm ; care for a cup of TEA? ;;elm ; care for a cup of TEA?
emacs-lisp ; drown in parentheses emacs-lisp ; drown in parentheses
;;erlang ; an elegant language for a more civilized age (erlang +lsp) ; an elegant language for a more civilized age
;;ess ; emacs speaks statistics ;;ess ; emacs speaks statistics
;;factor ;;factor
;;faust ; dsp, but you get to keep your soul ;;faust ; dsp, but you get to keep your soul
;;fortran ; in FORTRAN, GOD is REAL (unless declared INTEGER)
;;fsharp ; ML stands for Microsoft's Language ;;fsharp ; ML stands for Microsoft's Language
;;fstar ; (dependent) types and (monadic) effects and Z3 ;;fstar ; (dependent) types and (monadic) effects and Z3
;;gdscript ; the language you waited for ;;gdscript ; the language you waited for
;;(go +lsp) ; the hipster dialect (go +lsp) ; the hipster dialect
;;(haskell +lsp) ; a language that's lazier than I am (graphql +lsp) ; Give queries a REST
(haskell +lsp) ; a language that's lazier than I am
;;hy ; readability of scheme w/ speed of python ;;hy ; readability of scheme w/ speed of python
;;idris ; a language you can depend on ;;idris ; a language you can depend on
;;json ; At least it ain't XML (json +lsp) ; At least it ain't XML
;;(java +lsp) ; the poster child for carpal tunnel syndrome (java +lsp) ; the poster child for carpal tunnel syndrome
;;javascript ; all(hope(abandon(ye(who(enter(here)))))) (javascript +lsp) ; all(hope(abandon(ye(who(enter(here))))))
;;julia ; a better, faster MATLAB (julia +lsp) ; a better, faster MATLAB
;;kotlin ; a better, slicker Java(Script) ;;kotlin ; a better, slicker Java(Script)
;;latex ; writing papers in Emacs has never been so fun latex ; writing papers in Emacs has never been so fun
;;lean ; for folks with too much to prove ;;lean ; for folks with too much to prove
;;ledger ; be audit you can be ledger ; be audit you can be
;;lua ; one-based indices? one-based indices lua ; one-based indices? one-based indices
markdown ; writing docs for people to ignore markdown ; writing docs for people to ignore
;;nim ; python + lisp at the speed of c ;;nim ; python + lisp at the speed of c
;;nix ; I hereby declare "nix geht mehr!" ;;nix ; I hereby declare "nix geht mehr!"
;;ocaml ; an objective camel ;;ocaml ; an objective camel
org ; organize your plain life in plain text ;;(org +roam2 +pretty) ; organize your plain life in plain text
(org +roam2) ; organize your plain life in plain text
;;php ; perl's insecure younger brother ;;php ; perl's insecure younger brother
;;plantuml ; diagrams for confusing people more ;;plantuml ; diagrams for confusing people more
;;purescript ; javascript, but functional ;;purescript ; javascript, but functional
;;python ; beautiful is better than ugly (python +lsp +pyright +pyenv +poetry)
;;qt ; the 'cutest' gui framework ever ;;qt ; the 'cutest' gui framework ever
;;racket ; a DSL for DSLs ;;racket ; a DSL for DSLs
;;raku ; the artist formerly known as perl6 ;;raku ; the artist formerly known as perl6
;;rest ; Emacs as a REST client rest ; Emacs as a REST client
;;rst ; ReST in peace ;;rst ; ReST in peace
;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"} ;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
;;rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap() (rust +lsp) ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
;;scala ; java, but good scala ; java, but good
;;(scheme +guile) ; a fully conniving family of lisps (scheme +guile +mit +racket) ; a fully conniving family of lisps
sh ; she sells {ba,z,fi}sh shells on the C xor (sh +fish) ; she sells {ba,z,fi}sh shells on the C xor
;;sml ;;sml
;;solidity ; do you need a blockchain? No. ;;solidity ; do you need a blockchain? No.
;;swift ; who asked for emoji variables? ;;swift ; who asked for emoji variables?
;;terra ; Earth and Moon in alignment for performance. ;;terra ; Earth and Moon in alignment for performance.
;;web ; the tubes (web +lsp) ; the tubes
;;yaml ; JSON, but readable yaml ; JSON, but readable
;;zig ; C, but simpler ;;zig ; C, but simpler
:email :email
;;(mu4e +org +gmail) ;;(mu4e +gmail +org)
;;notmuch ;;notmuch
;;(wanderlust +gmail) ;;(wanderlust +gmail)
:app :app
;;calendar ;;calendar
;;emms ;;emms
;;everywhere ; *leave* Emacs!? You must be joking ;;everywhere ; *leave* Emacs!? You must be joking
;;irc ; how neckbeards socialize ;;irc ; how neckbeards socialize
;;(rss +org) ; emacs as an RSS reader (rss +org) ; emacs as an RSS reader
;;twitter ; twitter client https://twitter.com/vnought ;;twitter ; twitter client https://twitter.com/vnought
:config :config
;;literate ;;literate
(default +bindings +smartparens)) (default +bindings +smartparens))

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

View File

@ -48,3 +48,12 @@
;(unpin! pinned-package another-pinned-package) ;(unpin! pinned-package another-pinned-package)
;; ...Or *all* packages (NOT RECOMMENDED; will likely break things) ;; ...Or *all* packages (NOT RECOMMENDED; will likely break things)
;(unpin! t) ;(unpin! t)
;;(package! elcord)
(package! tree-sitter)
(package! tree-sitter-langs)
(unpin! org-roam)
(package! websocket)
(package! org-roam-ui :recipe (:host github :repo "org-roam/org-roam-ui" :files ("*.el" "out")))
(package! magit-delta)
(package! blamer :recipe (:host github :repo "artawower/blamer.el"))
(package! org-gtd)

View File

@ -15,8 +15,7 @@ export GPG_TTY=(tty)
gpgconf --launch gpg-agent gpgconf --launch gpg-agent
if test -z (pgrep ssh-agent) if test -z (pgrep ssh-agent)
eval (ssh-agent -c) eval (ssh-agent -c) set -Ux SSH_AUTH_SOCK $SSH_AUTH_SOCK
set -Ux SSH_AUTH_SOCK $SSH_AUTH_SOCK
set -Ux SSH_AGENT_PID $SSH_AGENT_PID set -Ux SSH_AGENT_PID $SSH_AGENT_PID
set -Ux SSH_AUTH_SOCK $SSH_AUTH_SOCK set -Ux SSH_AUTH_SOCK $SSH_AUTH_SOCK
end end
@ -38,7 +37,7 @@ set -gx LC_ALL en_US.UTF-8
set -gx _JAVA_AWT_WM_NONREPARENTING 1 set -gx _JAVA_AWT_WM_NONREPARENTING 1
set -x PATH /usr/libexec /usr/local/bin /home/minhradz/.cargo/bin /home/minhradz/.local/bin /home/minhradz/go/bin /home/minhradz/.cabal/bin $PATH set -x PATH /usr/libexec /usr/local/bin /home/minhradz/.cargo/bin /home/minhradz/.local/bin /home/minhradz/go/bin /home/minhradz/.cabal/bin /home/minhradz/.local/share/gem/ruby/3.0.0/bin $PATH
starship init fish | source starship init fish | source

View File

@ -2,8 +2,8 @@
# VERSION: 3.0 # VERSION: 3.0
SETUVAR --export GTK_IM_MODULE:ibus SETUVAR --export GTK_IM_MODULE:ibus
SETUVAR --export QT_IM_MODULE:ibus SETUVAR --export QT_IM_MODULE:ibus
SETUVAR --export SSH_AGENT_PID:1262 SETUVAR --export SSH_AGENT_PID:1050
SETUVAR --export SSH_AUTH_SOCK:/tmp/ssh\x2dXXXXXXOEdXXn/agent\x2e1261 SETUVAR --export SSH_AUTH_SOCK:/tmp/ssh\x2dXXXXXXF1IpnD/agent\x2e1049
SETUVAR --export XMODIFIERS:\x40im\x3dibus SETUVAR --export XMODIFIERS:\x40im\x3dibus
SETUVAR __fish_initialized:3400 SETUVAR __fish_initialized:3400
SETUVAR fish_color_autosuggestion:93a1a1 SETUVAR fish_color_autosuggestion:93a1a1

View File

@ -9,6 +9,7 @@ lvim.builtin.alpha.active = true
lvim.builtin.terminal.active = true lvim.builtin.terminal.active = true
lvim.builtin.autopairs.active = true lvim.builtin.autopairs.active = true
lvim.builtin.gitsigns.active = true lvim.builtin.gitsigns.active = true
lvim.builtin.notify.active = true
lvim.builtin.dap.active = true lvim.builtin.dap.active = true
lvim.builtin.nvimtree.side = "left" lvim.builtin.nvimtree.side = "left"
@ -16,7 +17,7 @@ lvim.builtin.nvimtree.show_icons.git = 1
lvim.builtin.terminal.shell = "/bin/fish" lvim.builtin.terminal.shell = "/bin/fish"
vim.termguicolors = true vim.termguicolors = true
vim.background = "light" vim.background = "dark"
lvim.colorscheme = "gruvbox" lvim.colorscheme = "gruvbox"
lvim.builtin.treesitter.ensure_installed = {} lvim.builtin.treesitter.ensure_installed = {}
@ -27,82 +28,82 @@ local formatters = require("lvim.lsp.null-ls.formatters")
local linters = require("lvim.lsp.null-ls.linters") local linters = require("lvim.lsp.null-ls.linters")
formatters.setup({ formatters.setup({
{ {
exe = "black", exe = "black",
filetypes = { "python" }, filetypes = { "python" },
args = { "--quiet", "--fast", "-" }, args = { "--quiet", "--fast", "-" },
}, },
{ {
exe = "clang_format", exe = "clang_format",
filetypes = { "c", "cpp" }, filetypes = { "c", "cpp" },
}, },
{ {
exe = "rustfmt", exe = "rustfmt",
filetype = { "rust" }, filetype = { "rust" },
}, },
{ exe = "prettier" }, { exe = "prettier" },
{ exe = "gofmt", filetypes = { "go" } }, { exe = "gofmt", filetypes = { "go" } },
{ exe = "eslint_d" }, { exe = "eslint_d" },
{ exe = "stylua", filetypes = { "lua" } }, { exe = "stylua", filetypes = { "lua" } },
{ exe = "brittany", filetypes = { "haskell" } }, { exe = "brittany", filetypes = { "haskell" } },
}) })
linters.setup({ linters.setup({
{ exe = "flake8" }, { exe = "flake8" },
}) })
-- Additional Plugins -- Additional Plugins
lvim.plugins = { lvim.plugins = {
{ "ellisonleao/gruvbox.nvim" }, { "ellisonleao/gruvbox.nvim" },
{ {
"ray-x/lsp_signature.nvim", "ray-x/lsp_signature.nvim",
config = function() config = function()
require("lsp_signature").on_attach() require("lsp_signature").on_attach()
end, end,
event = "InsertEnter", event = "InsertEnter",
}, },
{ "machakann/vim-sandwich" }, { "machakann/vim-sandwich" },
{ "tpope/vim-fugitive" }, { "tpope/vim-fugitive" },
{ {
"lewis6991/spellsitter.nvim", "lewis6991/spellsitter.nvim",
config = function() config = function()
require("spellsitter").setup() require("spellsitter").setup()
end, end,
}, },
{ "ggandor/lightspeed.nvim", requires = { "tpope/vim-repeat" }, event = "InsertEnter" }, { "ggandor/lightspeed.nvim", requires = { "tpope/vim-repeat" }, event = "InsertEnter" },
{ "ellisonleao/glow.nvim" }, { "ellisonleao/glow.nvim" },
} }
-- Changes to clangd -- Changes to clangd
vim.list_extend(lvim.lsp.override, { "clangd" }) vim.list_extend(lvim.lsp.automatic_configuration.skipped_servers, { "clangd" })
-- some settings can only passed as commandline flags `clangd --help` -- some settings can only passed as commandline flags `clangd --help`
local clangd_flags = { local clangd_flags = {
"--all-scopes-completion", "--all-scopes-completion",
"--suggest-missing-includes", "--suggest-missing-includes",
"--background-index", "--background-index",
"--pch-storage=disk", "--pch-storage=disk",
"--cross-file-rename", "--cross-file-rename",
"--log=info", "--log=info",
"--completion-style=detailed", "--completion-style=detailed",
"--enable-config", -- clangd 11+ supports reading from .clangd configuration file "--enable-config", -- clangd 11+ supports reading from .clangd configuration file
"--clang-tidy", "--clang-tidy",
"--offset-encoding=utf-16", "--offset-encoding=utf-16",
"--clang-tidy-checks=-*,llvm-*,clang-analyzer-*,modernize-*,-modernize-use-trailing-return-type", "--clang-tidy-checks=-*,llvm-*,clang-analyzer-*,modernize-*,-modernize-use-trailing-return-type",
"--fallback-style=Google", "--fallback-style=Google",
} }
local clangd_bin = "clangd" local clangd_bin = "clangd"
local custom_on_attach = function(client, bufnr) local custom_on_attach = function(client, bufnr)
require("lvim.lsp").common_on_attach(client, bufnr) require("lvim.lsp").common_on_attach(client, bufnr)
local opts = { noremap = true, silent = true } local opts = { noremap = true, silent = true }
vim.api.nvim_buf_set_keymap(bufnr, "n", "<leader>lh", "<Cmd>ClangdSwitchSourceHeader<CR>", opts) vim.api.nvim_buf_set_keymap(bufnr, "n", "<leader>lh", "<Cmd>ClangdSwitchSourceHeader<CR>", opts)
end end
local opts = { local opts = {
cmd = { clangd_bin, unpack(clangd_flags) }, cmd = { clangd_bin, unpack(clangd_flags) },
on_attach = custom_on_attach, on_attach = custom_on_attach,
} }
require("lvim.lsp.manager").setup("clangd", opts) require("lvim.lsp.manager").setup("clangd", opts)

View File

@ -1,6 +1,6 @@
auto-reload yes auto-reload yes
browser "firefox --new-tab %u" browser "firefox --new-tab %u"
max-items 1000 max-items 999999
# unbind keys # unbind keys
unbind-key ENTER unbind-key ENTER

View File

@ -18,7 +18,7 @@ exec udiskie
exec wlsunset -l 45.6 -L -73.5 -g 0.8 exec wlsunset -l 45.6 -L -73.5 -g 0.8
# bspwm throw back # bspwm throw back
exec /home/minhradz/.local/bin/autotiling exec /usr/bin/autotiling
# window manager # window manager
exec env RUST_BACKTRACE=1 swayrd > /tmp/swayrd.log 2>&1 exec env RUST_BACKTRACE=1 swayrd > /tmp/swayrd.log 2>&1
@ -59,18 +59,11 @@ gaps inner 6
gaps outer 3 gaps outer 3
### Output configuration ### Output configuration
#
# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
output * bg /home/minhradz/Downloads/lantern.jpg fill output * bg /home/minhradz/Downloads/lantern.jpg fill
#
# Example configuration:
#
output LVDS-1 pos 0 0 res 1366x768 output LVDS-1 pos 0 0 res 1366x768
output DP-1 res 1920x1080 position 1366,0 output DP-1 res 1920x1080 position 1366,0
#
# You can get the names of your outputs by running: swaymsg -t get_outputs
#
### Idle configuration ### Idle configuration
exec swayidle -w \ exec swayidle -w \
@ -227,6 +220,7 @@ mode "resize" {
bindsym Return mode "default" bindsym Return mode "default"
bindsym Escape mode "default" bindsym Escape mode "default"
} }
bindsym $mod+r mode "resize" bindsym $mod+r mode "resize"
bindsym $mod+e exec emacsclient -nc bindsym $mod+e exec emacsclient -nc