Misc changes to emacs config
This commit is contained in:
parent
d0f03ff3c0
commit
621b02a10a
@ -10,7 +10,7 @@
|
|||||||
* Use-package
|
* Use-package
|
||||||
|
|
||||||
#+BEGIN_SRC elisp
|
#+BEGIN_SRC elisp
|
||||||
(setq user-emacs-directory (substitute-in-file-name "$HOME/.emacs.d"))
|
; (setq user-emacs-directory (substitute-in-file-name "$HOME/.emacs.d"))
|
||||||
|
|
||||||
(require 'package)
|
(require 'package)
|
||||||
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
|
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
|
||||||
@ -36,7 +36,6 @@
|
|||||||
:states 'motion
|
:states 'motion
|
||||||
:prefix "SPC"
|
:prefix "SPC"
|
||||||
:non-normal-prefix "C-SPC"))
|
:non-normal-prefix "C-SPC"))
|
||||||
;:non-normal-prefix "SPC"))
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
Base keys
|
Base keys
|
||||||
@ -48,69 +47,69 @@ p - project management
|
|||||||
w - multiple cursors
|
w - multiple cursors
|
||||||
|
|
||||||
#+BEGIN_SRC elisp
|
#+BEGIN_SRC elisp
|
||||||
(leader-key
|
(leader-key
|
||||||
"" nil
|
"" nil
|
||||||
"c" (general-simulate-key "C-c" :which-key "C-c")
|
"c" (general-simulate-key "C-c" :which-key "C-c")
|
||||||
"u" (general-simulate-key "C-u" :which-key "C-u")
|
"u" (general-simulate-key "C-u" :which-key "C-u")
|
||||||
"x" (general-simulate-key "C-x" :which-key "C-x")
|
"x" (general-simulate-key "C-x" :which-key "C-x")
|
||||||
|
|
||||||
"m" '(:ignore t :which-key "mode")
|
"m" '(:ignore t :which-key "mode")
|
||||||
"mx" 'nil
|
"mx" 'nil
|
||||||
|
|
||||||
;; Help
|
;; Help
|
||||||
"h" (general-simulate-key "<f1>" :which-key "C-h")
|
"h" (general-simulate-key "<f1>" :which-key "C-h")
|
||||||
|
|
||||||
;; Insert
|
;; Insert
|
||||||
"i" '(:ignore t :which-key "C-h")
|
"i" '(:ignore t :which-key "C-h")
|
||||||
"ix" 'nil
|
"ix" 'nil
|
||||||
|
|
||||||
;; Package manager
|
;; Package manager
|
||||||
;; "p" '(:ignore t :which-key "packages")
|
;; "p" '(:ignore t :which-key "packages")
|
||||||
;; "pl" 'list-packages
|
;; "pl" 'list-packages
|
||||||
|
|
||||||
;; Quit operations
|
;; Quit operations
|
||||||
"q" '(:ignore t :which-key "quit emacs")
|
"q" '(:ignore t :which-key "quit emacs")
|
||||||
"qq" 'kill-emacs
|
"qq" 'kill-emacs
|
||||||
"qz" 'delete-frame
|
"qz" 'delete-frame
|
||||||
|
|
||||||
;; Buffer operations
|
;; Buffer operations
|
||||||
"b" '(:ignore t :which-key "buffer")
|
"b" '(:ignore t :which-key "buffer")
|
||||||
"bb" 'mode-line-other-buffer
|
"bb" 'mode-line-other-buffer
|
||||||
"bk" 'kill-this-buffer
|
"bk" 'kill-this-buffer
|
||||||
;; "bn" 'next-buffer
|
;; "bn" 'next-buffer
|
||||||
;; "bp" 'previous-buffer
|
;; "bp" 'previous-buffer
|
||||||
"bq" 'kill-buffer-and-window
|
"bq" 'kill-buffer-and-window
|
||||||
;; "bR" 'rename-file-and-buffer
|
;; "bR" 'rename-file-and-buffer
|
||||||
"br" 'revert-buffer
|
"br" 'revert-buffer
|
||||||
|
|
||||||
;; Window operations
|
;; Window operations
|
||||||
"w" '(:ignore t :which-key "window")
|
"w" '(:ignore t :which-key "window")
|
||||||
"wm" 'maximize-window
|
"wm" 'maximize-window
|
||||||
"wh" 'split-window-horizontally
|
"wh" 'split-window-horizontally
|
||||||
"wg" 'split-window-vertically
|
"wg" 'split-window-vertically
|
||||||
;; "wu" 'winner-undo
|
;; "wu" 'winner-undo
|
||||||
"ww" 'other-window
|
"ww" 'other-window
|
||||||
"wk" 'delete-window
|
"wk" 'delete-window
|
||||||
"wD" 'delete-other-windows
|
"wD" 'delete-other-windows
|
||||||
|
|
||||||
;; File operations
|
;; File operations
|
||||||
"f" '(:ignore t :which-key "find")
|
"f" '(:ignore t :which-key "find")
|
||||||
; "fc" 'write-file
|
; "fc" 'write-file
|
||||||
; "fe" '(:ignore t :which-key "emacs")
|
; "fe" '(:ignore t :which-key "emacs")
|
||||||
;; "fed" 'find-user-init-file
|
;; "fed" 'find-user-init-file
|
||||||
;; "feR" 'load-user-init-file
|
;; "feR" 'load-user-init-file
|
||||||
; "fj" 'dired-jump
|
; "fj" 'dired-jump
|
||||||
"fl" 'find-file-literally
|
"fl" 'find-file-literally
|
||||||
;; "fR" 'rename-file-and-buffer
|
;; "fR" 'rename-file-and-buffer
|
||||||
"fs" 'save-buffer
|
"fs" 'save-buffer
|
||||||
|
|
||||||
;; Applications
|
;; Applications
|
||||||
"a" '(:ignore t :which-key "apps")
|
"a" '(:ignore t :which-key "apps")
|
||||||
"ad" 'dired
|
"ad" 'dired
|
||||||
":" 'shell-command
|
":" 'shell-command
|
||||||
";" 'eval-expression
|
";" 'eval-expression
|
||||||
"ac" 'calendar
|
"ac" 'calendar
|
||||||
"oa" 'org-agenda)
|
"oa" 'org-agenda)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
General keys
|
General keys
|
||||||
@ -156,40 +155,41 @@ Put backup files in emacs.d/temp
|
|||||||
** Evil mode
|
** Evil mode
|
||||||
|
|
||||||
#+BEGIN_SRC elisp
|
#+BEGIN_SRC elisp
|
||||||
(use-package evil
|
(use-package evil
|
||||||
:demand t
|
:demand t
|
||||||
:init
|
:init
|
||||||
(setq evil-want-integration t)
|
(setq evil-want-integration t)
|
||||||
(setq evil-want-keybinding nil)
|
(setq evil-want-keybinding nil)
|
||||||
|
|
||||||
:general ; (leader-key
|
|
||||||
; "wh" '(evil-window-left :which-key "←")
|
|
||||||
; "wj" '(evil-window-down :which-key "↓")
|
|
||||||
; "wk" '(evil-window-up :which-key "↑")
|
|
||||||
; "wl" '(evil-window-right :which-key "→"))
|
|
||||||
([remap evil-ex-search-forward] 'swiper)
|
|
||||||
([remap evil-ex-search-backward] 'swiper-backward)
|
|
||||||
|
|
||||||
:bind (
|
:general ; (leader-key
|
||||||
("C-h" . evil-window-left)
|
; "wh" '(evil-window-left :which-key "←")
|
||||||
("C-j" . evil-window-down)
|
; "wj" '(evil-window-down :which-key "↓")
|
||||||
("C-k" . evil-window-up)
|
; "wk" '(evil-window-up :which-key "↑")
|
||||||
("C-l" . evil-window-right)
|
; "wl" '(evil-window-right :which-key "→"))
|
||||||
:map evil-insert-state-map
|
([remap evil-ex-search-forward] 'swiper)
|
||||||
|
([remap evil-ex-search-backward] 'swiper-backward)
|
||||||
|
|
||||||
|
:bind (
|
||||||
|
("C-h" . evil-window-left)
|
||||||
|
("C-j" . evil-window-down)
|
||||||
|
("C-k" . evil-window-up)
|
||||||
|
("C-l" . evil-window-right)
|
||||||
|
|
||||||
|
:map evil-insert-state-map
|
||||||
("C-g" . evil-normal-state)
|
("C-g" . evil-normal-state)
|
||||||
("C-h" . evil-delete-backward-char-and-join))
|
("C-h" . evil-delete-backward-char-and-join))
|
||||||
|
|
||||||
:config
|
|
||||||
|
|
||||||
;; :q should kill the current buffer rather than quitting emacs entirely
|
:config
|
||||||
(evil-ex-define-cmd "q" 'kill-this-buffer)
|
|
||||||
;; Need to type out :quit to close emacs
|
|
||||||
(evil-ex-define-cmd "quit" 'evil-quit)
|
|
||||||
|
|
||||||
(evil-set-initial-state 'messages-buffer-mode 'normal)
|
|
||||||
(evil-set-initial-state 'dashboard-mode 'normal)
|
|
||||||
|
|
||||||
(evil-mode 1))
|
;; :q should kill the current buffer rather than quitting emacs entirely
|
||||||
|
(evil-ex-define-cmd "q" 'kill-this-buffer)
|
||||||
|
;; Need to type out :quit to close emacs
|
||||||
|
(evil-ex-define-cmd "quit" 'evil-quit)
|
||||||
|
|
||||||
|
(evil-set-initial-state 'messages-buffer-mode 'normal)
|
||||||
|
(evil-set-initial-state 'dashboard-mode 'normal)
|
||||||
|
|
||||||
|
(evil-mode 1))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
|
||||||
@ -213,22 +213,16 @@ Put backup files in emacs.d/temp
|
|||||||
Evil escape mode
|
Evil escape mode
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package evil-escape
|
;; (use-package evil-escape
|
||||||
:after (evil company)
|
;; :after (evil company)
|
||||||
:diminish evil-escape-mode
|
;; :diminish evil-escape-mode
|
||||||
:init
|
;; :init
|
||||||
(with-eval-after-load 'company
|
;; (with-eval-after-load 'company
|
||||||
(add-hook 'evil-normal-state-entry-hook #'company-cancel))
|
;; (add-hook 'evil-normal-state-entry-hook #'company-cancel))
|
||||||
;; (use-package lsp-python-ms
|
;; (setq evil-escape-key-sequence "jk"
|
||||||
;; :init (setq
|
;; evil-escape-unordered-key-sequence t)
|
||||||
;; ; (lsp-python-ms-auto-install-server t)
|
;; :config
|
||||||
;; lsp-python-ms-executable (executable-find "mspyls"))
|
;; (evil-escape-mode))
|
||||||
;; ; :hook (python-mode . (lambda () (require 'lsp-python-ms) (lsp))))
|
|
||||||
;; :hook (python-mode . lsp))
|
|
||||||
(setq evil-escape-key-sequence "jk"
|
|
||||||
evil-escape-unordered-key-sequence t)
|
|
||||||
:config
|
|
||||||
(evil-escape-mode))
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** Ivy
|
** Ivy
|
||||||
@ -241,10 +235,6 @@ Evil escape mode
|
|||||||
("M-j" . ivy-next-line)
|
("M-j" . ivy-next-line)
|
||||||
("M-k" . ivy-previous-line)
|
("M-k" . ivy-previous-line)
|
||||||
("M-l" . ivy-alt-done)))
|
("M-l" . ivy-alt-done)))
|
||||||
|
|
||||||
;; :general (leader-key
|
|
||||||
;; "ij" 'ivy-next-line
|
|
||||||
;; "ik" 'ivy-previous-line))
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
Ivy-rich adds extra columns to a few of the Counsel commands to provide more information about each item.
|
Ivy-rich adds extra columns to a few of the Counsel commands to provide more information about each item.
|
||||||
@ -259,31 +249,33 @@ Ivy-rich adds extra columns to a few of the Counsel commands to provide more inf
|
|||||||
#+BEGIN_SRC elisp
|
#+BEGIN_SRC elisp
|
||||||
(use-package counsel
|
(use-package counsel
|
||||||
:general (leader-key
|
:general (leader-key
|
||||||
"ff" '(counsel-find-file :which-key "find file")
|
"ff" '(counsel-find-file :which-key "find file")
|
||||||
"f SPC" '(counsel-ag :which-key "Ag")
|
"f SPC" '(counsel-ag :which-key "Ag")
|
||||||
"ik" '(counsel-yank-pop :which-key "from kill-ring")
|
"ik" '(counsel-yank-pop :which-key "from kill-ring")
|
||||||
"bb" '(counsel-ibuffer :which-key "choose buffer")
|
"bb" '(counsel-ibuffer :which-key "choose buffer")
|
||||||
"fe" '(counsel-flycheck :which-key "find error"))
|
"fe" '(counsel-flycheck :which-key "find error"))
|
||||||
|
|
||||||
:bind (("M-x" . counsel-M-x)
|
:bind (("M-x" . counsel-M-x)
|
||||||
("C-x b" . counsel-ibuffer)
|
("C-x b" . counsel-ibuffer)
|
||||||
("C-x C-f" . counsel-find-file)
|
("C-x C-f" . counsel-find-file)
|
||||||
:map minibuffer-local-map
|
:map minibuffer-local-map
|
||||||
("C-r" . 'counsel-minibuffer-history)))
|
("C-r" . 'counsel-minibuffer-history)))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** Org mode
|
** Org mode
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package org
|
(use-package org
|
||||||
:general (leader-key
|
:general (leader-key
|
||||||
"o" '(:ignore t :which-key "org")
|
"o" '(:ignore t :which-key "org")
|
||||||
"oa" '(org-agenda :which-key "agenda")
|
"oa" '(org-agenda :which-key "agenda")
|
||||||
"ox" '(org-toggle-checkbox :which-key "[X]")
|
"ox" '(org-toggle-checkbox :which-key "[X]")
|
||||||
"oe" '(org-edit-src-code :which-key "Edit SRC")
|
"oe" '(org-edit-src-code :which-key "Edit SRC")
|
||||||
; Insert
|
; Insert
|
||||||
"io" '(:ignore t :which-key "org")
|
"io" '(:ignore t :which-key "org")
|
||||||
"ios" 'org-insert-structure-template))
|
"ios" 'org-insert-structure-template)
|
||||||
|
:config
|
||||||
|
(setq org-src-tab-acts-natively nil))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
Improved version of org-bullets
|
Improved version of org-bullets
|
||||||
@ -292,8 +284,8 @@ Improved version of org-bullets
|
|||||||
(use-package org-superstar
|
(use-package org-superstar
|
||||||
:hook (org-mode-hook . org-superstar-mode)
|
:hook (org-mode-hook . org-superstar-mode)
|
||||||
:config
|
:config
|
||||||
(setq org-startup-indented t) ;; Indent according to section
|
(setq org-startup-indented t) ;; Indent according to section
|
||||||
(setq org-startup-with-inline-images t)) ;; Display images in-buffer by default
|
(setq org-startup-with-inline-images t)) ;; Display images in-buffer by default
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
Evil bindings for org mode
|
Evil bindings for org mode
|
||||||
@ -302,15 +294,15 @@ Evil bindings for org mode
|
|||||||
(use-package evil-org
|
(use-package evil-org
|
||||||
:after (evil org)
|
:after (evil org)
|
||||||
:hook
|
:hook
|
||||||
(org-mode-hook . evil-org-mode)
|
(org-mode-hook . evil-org-mode)
|
||||||
(evil-org-mode-hook . (lambda ()
|
(evil-org-mode-hook . (lambda ()
|
||||||
(evil-org-set-key-theme '(navigation insert textobjects additional calendar))))
|
(evil-org-set-key-theme '(navigation insert textobjects additional calendar))))
|
||||||
:config
|
:config
|
||||||
(require 'evil-org-agenda)
|
(require 'evil-org-agenda)
|
||||||
(evil-org-agenda-set-keys)
|
(evil-org-agenda-set-keys)
|
||||||
|
|
||||||
(setq org-agenda-files '("~/org/agenda.org"))
|
(setq org-agenda-files '("~/org/agenda.org"))
|
||||||
(setq org-directory "~/org/"))
|
(setq org-directory "~/org/"))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** Notes
|
** Notes
|
||||||
@ -345,30 +337,30 @@ Evil bindings for org mode
|
|||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(setq dotfiles '(
|
(setq dotfiles '(
|
||||||
("Emacs" . "~/.emacs.d/config.org")
|
("Emacs" . (concat user-emacs-directory "/config.org"))
|
||||||
("Xmonad" . "~/.xmonad/xmonad.hs")
|
("Xmonad" . "$HOME/.xmonad/xmonad.hs")
|
||||||
("Xmobar" . "~/.config/xmobar/xmobarrc")
|
("Xmobar" . "$XDG_CONFIG_HOME/xmobar/xmobarrc")
|
||||||
("Awesome" . "~/.config/awesome/rc.lua")
|
("Awesome" . "$XDG_CONFIG_HOME/awesome/rc.lua")
|
||||||
("Stalonetray" . "~/.stalonetrayrc")
|
("Stalonetray" . "$HOME/.stalonetrayrc")
|
||||||
("Termite" . "~/.config/termite/config")
|
("Termite" . "$XDG_CONFIG_HOME/termite/config")
|
||||||
("Kitty" . "~/.config/kitty/kitty.conf")
|
("Kitty" . "$XDG_CONFIG_HOME/kitty/kitty.conf")
|
||||||
("Mpd" . "~/.config/mpd/mpd.conf")
|
("Mpd" . "$XDG_CONFIG_HOME/mpd/mpd.conf")
|
||||||
("Ncmpcpp" . "~/.ncmpcpp/config")
|
("Ncmpcpp" . "$HOME/.ncmpcpp/config")
|
||||||
("Nnn" . "~/.config/nnn/")
|
("Nnn" . "$XDG_CONFIG_HOME/nnn/")
|
||||||
("TeX-ntnu" . "~/texmf/tex/latex/local/ntnu.sty")
|
("TeX-ntnu" . "$HOME/texmf/tex/latex/local/ntnu.sty")
|
||||||
("Tmux" . "~/.tmux.conf")
|
("Tmux" . "$XDG_CONFIG_HOME/tmux/tmux.conf")
|
||||||
("Todo" . "~/.todo")
|
("Todo" . "$HOME/.todo")
|
||||||
("Qutebrowser" . "~/.config/qutebrowser/config.py")
|
("Qutebrowser" . "$XDG_CONFIG_HOME/qutebrowser/config.py")
|
||||||
("Vim" . "~/.config/nvim/init.vim")
|
("Vim" . "$XDG_CONFIG_HOME/nvim/init.lua")
|
||||||
("Zsh" . "~/.zshrc")
|
("Zsh" . "$XDG_CONFIG_HOME/zsh/.zshrc")
|
||||||
("Config-selector" . "~/.scripts/rofi/config-selector")
|
("Config-selector" . "$HOME/.scripts/rofi/config-selector")
|
||||||
("Configfiles" . "~/.scripts/rofi/configfiles")))
|
("Configfiles" . "$HOME/.scripts/rofi/configfiles")))
|
||||||
|
|
||||||
(defun find-config-file ()
|
(defun find-config-file ()
|
||||||
"Chooses a config-file from dotfiles and opens it in a new buffer"
|
"Chooses a config-file from dotfiles and opens it in a new buffer"
|
||||||
(interactive)
|
(interactive)
|
||||||
(ivy-read "Config: " dotfiles
|
(ivy-read "Config: " dotfiles
|
||||||
:action (lambda (confpair) (find-file (cdr confpair)))))
|
:action (lambda (confpair) (find-file (substitute-in-file-name (eval (cdr confpair)))))))
|
||||||
|
|
||||||
(leader-key "fc" '(find-config-file :which-key "find config file"))
|
(leader-key "fc" '(find-config-file :which-key "find config file"))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
@ -399,8 +391,33 @@ For every other theme, use load-theme
|
|||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package monokai-theme
|
(use-package monokai-theme
|
||||||
:config
|
:config
|
||||||
(load-theme 'monokai t))
|
(setq monokai-user-variable-pitch t)
|
||||||
|
(progn
|
||||||
|
|
||||||
|
(defvar after-load-theme-hook nil
|
||||||
|
"Hook run after a color theme is loaded using `load-theme'.")
|
||||||
|
|
||||||
|
(defadvice load-theme (after run-after-load-theme-hook activate)
|
||||||
|
"Run `after-load-theme-hook'."
|
||||||
|
(run-hooks 'after-load-theme-hook))
|
||||||
|
|
||||||
|
(defun customize-monokai ()
|
||||||
|
"Customize monokai theme"
|
||||||
|
(if (member 'monokai custom-enabled-themes)
|
||||||
|
(custom-theme-set-faces
|
||||||
|
'monokai
|
||||||
|
'(py-object-reference-face ((t (:foreground "#FFA500"))))
|
||||||
|
'(py-decorators-face ((t (:foreground "#FFA500"))))
|
||||||
|
'(py-variable-name-face ((t (:foreground "#FFA500"))))
|
||||||
|
'(py-exception-name-face ((:foreground "#FFA500")))
|
||||||
|
'(py-class-name-face ((:foreground "#FFA500")))
|
||||||
|
'(py-pseudo-keyword-face ((:foreground "#FFA500")))
|
||||||
|
'(py-builtins-face ((:foreground "#FFA500"))))))
|
||||||
|
|
||||||
|
(add-hook 'after-load-theme-hook 'customize-monokai)))
|
||||||
|
|
||||||
|
(load-theme 'monokai t)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** Centaur-tabs
|
** Centaur-tabs
|
||||||
@ -588,10 +605,10 @@ For every other theme, use load-theme
|
|||||||
;; Whether display the gnus notifications.
|
;; Whether display the gnus notifications.
|
||||||
(setq doom-modeline-gnus t)
|
(setq doom-modeline-gnus t)
|
||||||
|
|
||||||
;; Wheter gnus should automatically be updated and how often (set to 0 or smaller than 0 to disable)
|
;; Whether gnus should automatically be updated and how often (set to 0 or smaller than 0 to disable)
|
||||||
(setq doom-modeline-gnus-timer 2)
|
(setq doom-modeline-gnus-timer 2)
|
||||||
|
|
||||||
;; Wheter groups should be excludede when gnus automatically being updated.
|
;; Whether groups should be excludede when gnus automatically being updated.
|
||||||
(setq doom-modeline-gnus-excluded-groups '("dummy.group"))
|
(setq doom-modeline-gnus-excluded-groups '("dummy.group"))
|
||||||
|
|
||||||
;; Whether display the IRC notifications. It requires `circe' or `erc' package.
|
;; Whether display the IRC notifications. It requires `circe' or `erc' package.
|
||||||
@ -665,8 +682,8 @@ In order for this to work, the [[https://github.com/tonsky/FiraCode/issues/211#i
|
|||||||
(setq dashboard-set-file-icons t)
|
(setq dashboard-set-file-icons t)
|
||||||
|
|
||||||
(setq dashboard-image-banner-max-height (/ (frame-pixel-height) 3))
|
(setq dashboard-image-banner-max-height (/ (frame-pixel-height) 3))
|
||||||
(setq dashboard-startup-banner "~/.emacs.d/logo.svg")
|
(setq dashboard-startup-banner (concat user-emacs-directory "/logo.svg"))
|
||||||
; (setq dashboard-startup-banner "~/.emacs.d/logo.svg")
|
; (setq dashboard-startup-banner (concat user-emacs-directory "/logo.svg"))
|
||||||
(setq dashboard-center-content t)
|
(setq dashboard-center-content t)
|
||||||
(setq dashboard-items '((recents . 10)
|
(setq dashboard-items '((recents . 10)
|
||||||
(projects . 5)
|
(projects . 5)
|
||||||
@ -934,7 +951,9 @@ Nice looking completions
|
|||||||
(use-package projectile
|
(use-package projectile
|
||||||
:init
|
:init
|
||||||
(setq projectile-project-search-path '("~/git/"
|
(setq projectile-project-search-path '("~/git/"
|
||||||
"~/git/temp/"))
|
"~/git/temp/"
|
||||||
|
"~/git/appkom/"
|
||||||
|
"~/git/pvv/"))
|
||||||
(setq projectile-switch-project-action #'projectile-dired)
|
(setq projectile-switch-project-action #'projectile-dired)
|
||||||
|
|
||||||
:custom ((projectile-completion-system 'ivy))
|
:custom ((projectile-completion-system 'ivy))
|
||||||
@ -1087,11 +1106,6 @@ https://emacs.stackexchange.com/questions/10431/get-company-to-show-suggestions-
|
|||||||
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
|
||||||
(use-package evil-magit
|
|
||||||
:after (magit evil))
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package git-gutter
|
(use-package git-gutter
|
||||||
:init
|
:init
|
||||||
@ -1099,62 +1113,15 @@ https://emacs.stackexchange.com/questions/10431/get-company-to-show-suggestions-
|
|||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
* Langugages
|
* Langugages
|
||||||
** Agda
|
|
||||||
|
|
||||||
(after! agda2-mode
|
|
||||||
(set-lookup-handlers! 'agda2-mode
|
|
||||||
:definition #'agda2-goto-definition-keyboard)
|
|
||||||
(map! :map agda2-mode-map
|
|
||||||
:localleader
|
|
||||||
"?" #'agda2-show-goals
|
|
||||||
"." #'agda2-goal-and-context-and-inferred
|
|
||||||
"," #'agda2-goal-and-context
|
|
||||||
"=" #'agda2-show-constraints
|
|
||||||
"SPC" #'agda2-give
|
|
||||||
"a" #'agda2-auto-maybe-all
|
|
||||||
"b" #'agda2-previous-goal
|
|
||||||
"c" #'agda2-make-case
|
|
||||||
"d" #'agda2-infer-type-maybe-toplevel
|
|
||||||
"e" #'agda2-show-context
|
|
||||||
"f" #'agda2-next-goal
|
|
||||||
"gG" #'agda2-go-back
|
|
||||||
"h" #'agda2-helper-function-type
|
|
||||||
"l" #'agda2-load
|
|
||||||
"n" #'agda2-compute-normalised-maybe-toplevel
|
|
||||||
"p" #'agda2-module-contents-maybe-toplevel
|
|
||||||
"r" #'agda2-refine
|
|
||||||
"s" #'agda2-solveAll
|
|
||||||
"t" #'agda2-goal-type
|
|
||||||
"w" #'agda2-why-in-scope-maybe-toplevel
|
|
||||||
(:prefix "x"
|
|
||||||
"c" #'agda2-compile
|
|
||||||
"d" #'agda2-remove-annotations
|
|
||||||
"h" #'agda2-display-implicit-arguments
|
|
||||||
"q" #'agda2-quit
|
|
||||||
"r" #'agda2-restart)))
|
|
||||||
|
|
||||||
** C/C++
|
** C/C++
|
||||||
** Clojure
|
|
||||||
** Coq
|
|
||||||
** Dart / Flutter
|
** Dart / Flutter
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package dart-mode
|
(use-package dart-mode
|
||||||
:mode "\\.dart\\'")
|
:mode "\\.dart\\'")
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
** Elixir
|
(use-package lsp-dart
|
||||||
|
:hook 'dart-mode-hook)
|
||||||
Major mode for elixir
|
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
|
||||||
; (use-package elixir-mode)
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
Several tools for navigation, formatting, compilation, docs and completion
|
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
|
||||||
; (use-package alchemist)
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** Elm
|
** Elm
|
||||||
@ -1267,25 +1234,6 @@ It requires the hindent executable
|
|||||||
flycheck-haskell?
|
flycheck-haskell?
|
||||||
ghc ?
|
ghc ?
|
||||||
|
|
||||||
** Idris
|
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
|
||||||
;; (use-package idris-mode
|
|
||||||
;; :hook (idris-mode-hook . turn-on-idris-simple-indent)
|
|
||||||
;; :general (leader-key idris-mode-map
|
|
||||||
;; "m." 'idris-pop-to-repl
|
|
||||||
;; "mr" 'idris-load-file
|
|
||||||
;; "md" 'idris-docs-at-point
|
|
||||||
;; "mt" 'idris-type-at-point
|
|
||||||
;; "md" 'idris-add-clause
|
|
||||||
;; "ml" 'idris-make-lemma
|
|
||||||
;; "mc" 'idris-case-split
|
|
||||||
;; "mw" 'idris-make-with-block
|
|
||||||
;; "mm" 'idris-add-missing
|
|
||||||
;; "mp" 'idris-proof-search
|
|
||||||
;; "mh" 'idris-docs-at-point))
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
** Java
|
** Java
|
||||||
|
|
||||||
Java LSP using the Eclipse JDT Language server
|
Java LSP using the Eclipse JDT Language server
|
||||||
@ -1395,6 +1343,7 @@ js2-mode
|
|||||||
js-doc
|
js-doc
|
||||||
js2-refactor
|
js2-refactor
|
||||||
npm.el
|
npm.el
|
||||||
|
|
||||||
** Json
|
** Json
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
@ -1699,17 +1648,46 @@ To be installed from the arch community repos: python-language-server
|
|||||||
("or" . "∨")
|
("or" . "∨")
|
||||||
("pi" . "π"))))
|
("pi" . "π"))))
|
||||||
|
|
||||||
(add-hook 'python-mode-hook 'prettify-symbols-mode)
|
;; (add-hook 'python-mode-hook 'prettify-symbols-mode)
|
||||||
(add-hook 'python-mode-hook 'prettify-python)
|
;; (add-hook 'python-mode-hook 'prettify-python)
|
||||||
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** Rust
|
** Rust
|
||||||
rust-mode
|
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(use-package rustic
|
||||||
|
:bind (:map rustic-mode-map
|
||||||
|
("M-j" . lsp-ui-imenu)
|
||||||
|
("M-?" . lsp-find-references)
|
||||||
|
("C-c C-c l" . flycheck-list-errors)
|
||||||
|
("C-c C-c a" . lsp-execute-code-action)
|
||||||
|
("C-c C-c r" . lsp-rename)
|
||||||
|
("C-c C-c q" . lsp-workspace-restart)
|
||||||
|
("C-c C-c Q" . lsp-workspace-shutdown)
|
||||||
|
("C-c C-c s" . lsp-rust-analyzer-status))
|
||||||
|
:config
|
||||||
|
;; uncomment for less flashiness
|
||||||
|
;; (setq lsp-eldoc-hook nil)
|
||||||
|
;; (setq lsp-enable-symbol-highlighting nil)
|
||||||
|
;; (setq lsp-signature-auto-activate nil)
|
||||||
|
|
||||||
|
;; comment to disable rustfmt on save
|
||||||
|
(setq rustic-format-on-save t)
|
||||||
|
(add-hook 'rustic-mode-hook 'rk/rustic-mode-hook))
|
||||||
|
|
||||||
|
(defun rk/rustic-mode-hook ()
|
||||||
|
;; so that run C-c C-c C-r works without having to confirm, but don't try to
|
||||||
|
;; save rust buffers that are not file visiting. Once
|
||||||
|
;; https://github.com/brotzeit/rustic/issues/253 has been resolved this should
|
||||||
|
;; no longer be necessary.
|
||||||
|
(when buffer-file-name
|
||||||
|
(setq-local buffer-save-without-query t)))
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
flycheck-rust
|
flycheck-rust
|
||||||
cargo.el - Cargo support for Emacs.
|
cargo.el - Cargo support for Emacs.
|
||||||
|
|
||||||
** Scala
|
|
||||||
** Shellscripts
|
** Shellscripts
|
||||||
** Yaml
|
** Yaml
|
||||||
** Web-dev
|
** Web-dev
|
||||||
@ -1996,6 +1974,8 @@ https://protesilaos.com/
|
|||||||
|
|
||||||
https://writequit.org/denver-emacs/presentations/2017-04-11-ivy.html
|
https://writequit.org/denver-emacs/presentations/2017-04-11-ivy.html
|
||||||
|
|
||||||
|
https://robert.kra.hn/posts/2021-02-07_rust-with-emacs/
|
||||||
|
|
||||||
** Configs
|
** Configs
|
||||||
*** Quinoa42
|
*** Quinoa42
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user