summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortmu <t.man.atl.2012@gmail.com>2023-11-14 13:38:52 -0800
committertmu <t.man.atl.2012@gmail.com>2023-11-14 13:38:52 -0800
commita04213e2c04a98c204c5e51dcf0219a4286113bf (patch)
tree839dd4dc42b283a7f168a05d9f809686c7a77a4f
parent05d72eabc9e1f0daefe26be6f7c54f83f58d5f15 (diff)
bits
-rw-r--r--emacs/coding-config.el (renamed from emacs/project-stuff.el)36
-rw-r--r--emacs/init.el239
2 files changed, 163 insertions, 112 deletions
diff --git a/emacs/project-stuff.el b/emacs/coding-config.el
index 29b515e..340f0c0 100644
--- a/emacs/project-stuff.el
+++ b/emacs/coding-config.el
@@ -39,10 +39,6 @@
(setq whitespace-style
'(face trailing tabs missing-newline-at-eof indentation space-after-tab space-before-tab tab-mark))
(setq fill-column 80)
-(add-hook 'prog-mode-hook (lambda ()
- (whitespace-mode 1)
- (display-fill-column-indicator-mode 1)))
-
(global-hl-todo-mode 1)
@@ -93,37 +89,37 @@ BEG and END define the region."
(if (and (not (ad-get-arg 0))
(member major-mode yank-indent-modes))
(let ((transient-mark-mode nil))
- (yank-advised-indent-function (region-beginning) (region-end)))))
+ (yank-advised-indent-function (region-beginning) (region-end)))))
(defadvice yank-pop (after yank-pop-indent activate)
"If current mode is one of 'yank-indent-modes, indent yanked text (with prefix arg don't indent)."
(if (and (not (ad-get-arg 0))
(member major-mode yank-indent-modes))
- (let ((transient-mark-mode nil))
- (yank-advised-indent-function (region-beginning) (region-end)))))
+ (let ((transient-mark-mode nil))
+ (yank-advised-indent-function (region-beginning) (region-end)))))
(defadvice evil-paste-before (after yank-indent activate)
"If current mode is one of 'yank-indent-modes, indent yanked text (with prefix arg don't indent)."
(if (and (not (ad-get-arg 0))
(member major-mode yank-indent-modes))
(let ((transient-mark-mode nil))
- (yank-advised-indent-function (region-beginning) (region-end)))))
+ (yank-advised-indent-function (region-beginning) (region-end)))))
(defadvice evil-paste-after (after yank-indent activate)
"If current mode is one of 'yank-indent-modes, indent yanked text (with prefix arg don't indent)."
(if (and (not (ad-get-arg 0))
(member major-mode yank-indent-modes))
(let ((transient-mark-mode nil))
- (yank-advised-indent-function (region-beginning) (region-end)))))
+ (yank-advised-indent-function (region-beginning) (region-end)))))
;; make ibuffer play with projectile
(require 'ibuffer)
(add-hook 'ibuffer-hook
- (lambda ()
- (ibuffer-projectile-set-filter-groups)
- (unless (eq ibuffer-sorting-mode 'alphabetic)
- (ibuffer-do-sort-by-alphabetic))))
+ (lambda ()
+ (ibuffer-projectile-set-filter-groups)
+ (unless (eq ibuffer-sorting-mode 'alphabetic)
+ (ibuffer-do-sort-by-alphabetic))))
;; make shells and whatnot slightly better
(require 'comint)
@@ -197,7 +193,17 @@ BEG and END define the region."
;; (flymake-mode 1)
(spell-fu-mode 0)
(superword-mode 1)
- (add-hook 'before-save-hook (lambda () (clean-prog-file (current-buffer))))))
+ (whitespace-mode 1)
+ (display-fill-column-indicator-mode 1)
+ (add-hook 'before-save-hook
+ (lambda ()
+ (if (not (eq major-mode 'makefile-gmake-mode))
+ (clean-prog-file (current-buffer)))))))
+
+
+(add-hook 'haskell-mode-hook (lambda ()
+ (evil-define-key 'normal local-map (kbd "M-.") 'haskell-jump-to-def)
+ ))
;; (use-package flymake-diagnostic-at-point
;; :after flymake
@@ -219,7 +225,6 @@ BEG and END define the region."
:init
(setq sideline-backends-right '(sideline-flymake)))
-(setq rustic-lsp-setup-p nil)
;; eshell stuff
(require 'eshell)
@@ -248,7 +253,6 @@ BEG and END define the region."
(require 'evil)
(evil-set-initial-state 'vterm-mode 'emacs)
-(evil-define-key 'normal global-map (kbd "SPC i") 'imenu)
(define-key eshell-mode-map (kbd "M-o") 'other-window)
(define-key eshell-mode-map (kbd "M-W") 'switch-buffer)
diff --git a/emacs/init.el b/emacs/init.el
index 5ded8b6..36c32b3 100644
--- a/emacs/init.el
+++ b/emacs/init.el
@@ -7,102 +7,145 @@
;; If there is more than one, they won't work right.
'(comment-style 'extra-line)
'(connection-local-criteria-alist
- '(((:application tramp :protocol "flatpak")
- tramp-container-connection-local-default-flatpak-profile)
+ '(((:application tramp :protocol "kubernetes")
+ tramp-kubernetes-connection-local-default-profile)
+ ((:application tramp :protocol "flatpak")
+ tramp-container-connection-local-default-flatpak-profile
+ tramp-flatpak-connection-local-default-profile)
((:application tramp)
- tramp-connection-local-default-system-profile tramp-connection-local-default-shell-profile)
- ((:application eshell)
- eshell-connection-default-profile)))
+ tramp-connection-local-default-system-profile
+ tramp-connection-local-default-shell-profile)
+ ((:application eshell) eshell-connection-default-profile)))
'(connection-local-profile-alist
- '((tramp-container-connection-local-default-flatpak-profile
- (tramp-remote-path "/app/bin" tramp-default-remote-path "/bin" "/usr/bin" "/sbin" "/usr/sbin" "/usr/local/bin" "/usr/local/sbin" "/local/bin" "/local/freeware/bin" "/local/gnu/bin" "/usr/freeware/bin" "/usr/pkg/bin" "/usr/contrib/bin" "/opt/bin" "/opt/sbin" "/opt/local/bin"))
+ '((tramp-flatpak-connection-local-default-profile
+ (tramp-remote-path "/app/bin" tramp-default-remote-path "/bin"
+ "/usr/bin" "/sbin" "/usr/sbin"
+ "/usr/local/bin" "/usr/local/sbin"
+ "/local/bin" "/local/freeware/bin"
+ "/local/gnu/bin" "/usr/freeware/bin"
+ "/usr/pkg/bin" "/usr/contrib/bin" "/opt/bin"
+ "/opt/sbin" "/opt/local/bin"))
+ (tramp-kubernetes-connection-local-default-profile
+ (tramp-config-check . tramp-kubernetes--current-context-data)
+ (tramp-extra-expand-args 97
+ (tramp-kubernetes--container
+ (car tramp-current-connection))
+ 104
+ (tramp-kubernetes--pod
+ (car tramp-current-connection))
+ 120
+ (tramp-kubernetes--context-namespace
+ (car tramp-current-connection))))
+ (tramp-container-connection-local-default-flatpak-profile
+ (tramp-remote-path "/app/bin" tramp-default-remote-path "/bin"
+ "/usr/bin" "/sbin" "/usr/sbin"
+ "/usr/local/bin" "/usr/local/sbin"
+ "/local/bin" "/local/freeware/bin"
+ "/local/gnu/bin" "/usr/freeware/bin"
+ "/usr/pkg/bin" "/usr/contrib/bin" "/opt/bin"
+ "/opt/sbin" "/opt/local/bin"))
(tramp-connection-local-darwin-ps-profile
- (tramp-process-attributes-ps-args "-acxww" "-o" "pid,uid,user,gid,comm=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" "-o" "state=abcde" "-o" "ppid,pgid,sess,tty,tpgid,minflt,majflt,time,pri,nice,vsz,rss,etime,pcpu,pmem,args")
- (tramp-process-attributes-ps-format
- (pid . number)
- (euid . number)
- (user . string)
- (egid . number)
- (comm . 52)
- (state . 5)
- (ppid . number)
- (pgrp . number)
- (sess . number)
- (ttname . string)
- (tpgid . number)
- (minflt . number)
- (majflt . number)
- (time . tramp-ps-time)
- (pri . number)
- (nice . number)
- (vsize . number)
- (rss . number)
- (etime . tramp-ps-time)
- (pcpu . number)
- (pmem . number)
- (args)))
+ (tramp-process-attributes-ps-args "-acxww" "-o"
+ "pid,uid,user,gid,comm=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
+ "-o" "state=abcde" "-o"
+ "ppid,pgid,sess,tty,tpgid,minflt,majflt,time,pri,nice,vsz,rss,etime,pcpu,pmem,args")
+ (tramp-process-attributes-ps-format (pid . number)
+ (euid . number)
+ (user . string)
+ (egid . number) (comm . 52)
+ (state . 5) (ppid . number)
+ (pgrp . number)
+ (sess . number)
+ (ttname . string)
+ (tpgid . number)
+ (minflt . number)
+ (majflt . number)
+ (time . tramp-ps-time)
+ (pri . number)
+ (nice . number)
+ (vsize . number)
+ (rss . number)
+ (etime . tramp-ps-time)
+ (pcpu . number)
+ (pmem . number) (args)))
(tramp-connection-local-busybox-ps-profile
- (tramp-process-attributes-ps-args "-o" "pid,user,group,comm=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" "-o" "stat=abcde" "-o" "ppid,pgid,tty,time,nice,etime,args")
- (tramp-process-attributes-ps-format
- (pid . number)
- (user . string)
- (group . string)
- (comm . 52)
- (state . 5)
- (ppid . number)
- (pgrp . number)
- (ttname . string)
- (time . tramp-ps-time)
- (nice . number)
- (etime . tramp-ps-time)
- (args)))
+ (tramp-process-attributes-ps-args "-o"
+ "pid,user,group,comm=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
+ "-o" "stat=abcde" "-o"
+ "ppid,pgid,tty,time,nice,etime,args")
+ (tramp-process-attributes-ps-format (pid . number)
+ (user . string)
+ (group . string) (comm . 52)
+ (state . 5) (ppid . number)
+ (pgrp . number)
+ (ttname . string)
+ (time . tramp-ps-time)
+ (nice . number)
+ (etime . tramp-ps-time)
+ (args)))
(tramp-connection-local-bsd-ps-profile
- (tramp-process-attributes-ps-args "-acxww" "-o" "pid,euid,user,egid,egroup,comm=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" "-o" "state,ppid,pgid,sid,tty,tpgid,minflt,majflt,time,pri,nice,vsz,rss,etimes,pcpu,pmem,args")
- (tramp-process-attributes-ps-format
- (pid . number)
- (euid . number)
- (user . string)
- (egid . number)
- (group . string)
- (comm . 52)
- (state . string)
- (ppid . number)
- (pgrp . number)
- (sess . number)
- (ttname . string)
- (tpgid . number)
- (minflt . number)
- (majflt . number)
- (time . tramp-ps-time)
- (pri . number)
- (nice . number)
- (vsize . number)
- (rss . number)
- (etime . number)
- (pcpu . number)
- (pmem . number)
- (args)))
+ (tramp-process-attributes-ps-args "-acxww" "-o"
+ "pid,euid,user,egid,egroup,comm=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
+ "-o"
+ "state,ppid,pgid,sid,tty,tpgid,minflt,majflt,time,pri,nice,vsz,rss,etimes,pcpu,pmem,args")
+ (tramp-process-attributes-ps-format (pid . number)
+ (euid . number)
+ (user . string)
+ (egid . number)
+ (group . string) (comm . 52)
+ (state . string)
+ (ppid . number)
+ (pgrp . number)
+ (sess . number)
+ (ttname . string)
+ (tpgid . number)
+ (minflt . number)
+ (majflt . number)
+ (time . tramp-ps-time)
+ (pri . number)
+ (nice . number)
+ (vsize . number)
+ (rss . number)
+ (etime . number)
+ (pcpu . number)
+ (pmem . number) (args)))
(tramp-connection-local-default-shell-profile
- (shell-file-name . "/bin/sh")
- (shell-command-switch . "-c"))
+ (shell-file-name . "/bin/sh") (shell-command-switch . "-c"))
(tramp-connection-local-default-system-profile
- (path-separator . ":")
- (null-device . "/dev/null"))
- (eshell-connection-default-profile
- (eshell-path-env-list))))
+ (path-separator . ":") (null-device . "/dev/null"))
+ (eshell-connection-default-profile (eshell-path-env-list))))
'(custom-enabled-themes '(tmu-custom))
'(custom-safe-themes
- '("6dafb31ade9ff07229faaf05c41c2ae475c44731362b792f65f3930b1a2c9cfd" "dc77e008092a5a4aa6b6ed8e4826bebf8f2fb930a8de073bf7f458efd884cca8" "d1ff3e66028f9c527298580d2a64f9e3280f07f9e94d4dada72b67ef15069441" "3d4e3644e237a95683daa73e397c4c0d1ae06bbaaf8040104232591a28bc1315" "12a07bc38295e4b06a8965db261f51ea7ea61fbf91b3ef41298bbb549d1d9403" default))
+ '("6dafb31ade9ff07229faaf05c41c2ae475c44731362b792f65f3930b1a2c9cfd"
+ "dc77e008092a5a4aa6b6ed8e4826bebf8f2fb930a8de073bf7f458efd884cca8"
+ "d1ff3e66028f9c527298580d2a64f9e3280f07f9e94d4dada72b67ef15069441"
+ "3d4e3644e237a95683daa73e397c4c0d1ae06bbaaf8040104232591a28bc1315"
+ "12a07bc38295e4b06a8965db261f51ea7ea61fbf91b3ef41298bbb549d1d9403"
+ default))
'(ede-project-directories
- '("/home/tmu/Desktop/eway/sway" "/home/tmu/Desktop/eway/cage" "/home/tmu/Desktop/eway/wlroots" "/home/tmu/Desktop/eway/comp" "/home/tmu/Desktop/eway"))
+ '("/home/tmu/Desktop/eway/sway" "/home/tmu/Desktop/eway/cage"
+ "/home/tmu/Desktop/eway/wlroots" "/home/tmu/Desktop/eway/comp"
+ "/home/tmu/Desktop/eway"))
'(menu-bar-mode nil)
'(package-selected-packages
- '(evil-commentary frog-jump-buffer modus-themes which-key evil-collection hl-todo evil-easymotion sideline-flymake sideline-lsp zig-mode tree-sitter-langs tree-sitter company-go pyim-basedict evil-snipe evil-surround markdown-preview-mode 2048-game evil ibuffer-project persp-mode-projectile-bridge persp-mode fish-mode spell-fu pyim chinese-conv esup buffer-move vertico flymake-diagnostic-at-point emms-state emms-player-simple-mpv eshell-fringe-status esh-help eshell-vterm vterm rustic benchmark-init ivy-prescient eat ivy-hydra ivy emms eyebrowse highlight dumb-jump volume workgroups async bongo hydra free-keys gxref fold-this simple-httpd xelb oauth2 imenu-anywhere popwin folding gdscript-mode))
+ '(haskell-mode pyim-wbdict solarized-theme evil-commentary
+ frog-jump-buffer evil-collection evil-easymotion
+ sideline-flymake sideline-lsp tree-sitter company-go
+ pyim-basedict evil-snipe evil-surround 2048-game
+ evil ibuffer-project persp-mode-projectile-bridge
+ persp-mode fish-mode chinese-conv esup buffer-move
+ flymake-diagnostic-at-point emms-state
+ emms-player-simple-mpv eshell-fringe-status esh-help
+ eshell-vterm rustic benchmark-init ivy-prescient eat
+ emms eyebrowse highlight dumb-jump volume workgroups
+ async bongo hydra free-keys gxref fold-this xelb
+ oauth2 imenu-anywhere popwin folding gdscript-mode))
'(scroll-bar-mode nil)
'(tool-bar-mode nil)
'(transient-mark-mode nil)
'(whitespace-style
- '(face trailing tabs lines-tail missing-newline-at-eof indentation space-after-tab space-before-tab tab-mark)))
+ '(face trailing tabs lines-tail missing-newline-at-eof indentation
+ space-after-tab space-before-tab tab-mark)))
;; (use-package benchmark-init
;; :ensure t
@@ -291,23 +334,23 @@ mark. Does the same of ARG number sexps if given"
;; music
;; (autoload 'youtube-dl-enqueue "~/.emacs.d/youtube-dl.el" "download from youtube" t)
-(emms-all)
-(require 'emms-info-native)
-(defun emms-file-info (track)
- "Sets info of a track based on it's file name. Expects Artist - Album - Track.ext."
- (when (emms-track-file-p track)
- (let* ((file-name (emms-track-name track))
- (tags (string-split (car (seq-reverse (string-split file-name "/"))) " - ")))
- (emms-track-set track 'info-artist (car tags))
- (emms-track-set track 'info-album (car (cdr tags)))
- (emms-track-set track 'info-title (car (cdr (cdr tags)))))))
+;; (emms-all)
+;; (require 'emms-info-native)
+;; (defun emms-file-info (track)
+;; "Sets info of a track based on it's file name. Expects Artist - Album - Track.ext."
+;; (when (emms-track-file-p track)
+;; (let* ((file-name (emms-track-name track))
+;; (tags (string-split (car (seq-reverse (string-split file-name "/"))) " - ")))
+;; (emms-track-set track 'info-artist (car tags))
+;; (emms-track-set track 'info-album (car (cdr tags)))
+;; (emms-track-set track 'info-title (car (cdr (cdr tags)))))))
-(setq emms-player-list '(emms-player-mpv)
- emms-info-functions '(emms-file-info)
- emms-source-file-directory-tree-function 'emms-source-file-directory-tree-find)
+;; (setq emms-player-list '(emms-player-mpv)
+;; emms-info-functions '(emms-file-info)
+;; emms-source-file-directory-tree-function 'emms-source-file-directory-tree-find)
-(require 'emms-state)
-;; see single header, loaded AFTER this for more about emms-state
+;; (require 'emms-state)
+;; ;; see single header, loaded AFTER this for more about emms-state
;; allow using emacsclient
@@ -361,6 +404,7 @@ mark. Does the same of ARG number sexps if given"
(define-key evil-insert-state-map (kbd "C-e") 'move-end-of-line)
(define-key evil-insert-state-map (kbd "C-a") 'move-beginning-of-line)
(define-key evil-normal-state-map (kbd "M-.") 'xref-find-definitions)
+(define-key evil-normal-state-map (kbd "C-t") 'transpose-chars)
(add-hook 'prog-mode-hook (lambda ()
(modify-syntax-entry ?_ "w") ))
@@ -379,7 +423,9 @@ mark. Does the same of ARG number sexps if given"
(evil-window-vsplit)
(other-window 1))
+(evil-define-key 'normal global-map (kbd "SPC i") 'imenu)
(evil-define-key 'normal global-map (kbd "SPC RET") 'vterm)
+(evil-define-key 'normal global-map (kbd "SPC v") 'vterm)
(evil-define-key 'normal global-map (kbd "SPC !") 'abort-recursive-edit)
(evil-define-key 'normal global-map (kbd "SPC f f") 'find-file)
@@ -403,7 +449,7 @@ mark. Does the same of ARG number sexps if given"
(add-hook 'frog-menu-after-init-hook (lambda ()
(setq-local avy-background nil)))
-(load-file "~/.emacs.d/project-stuff.el")
+(load-file "~/.emacs.d/coding-config.el")
;; (load-file "~/.emacs.d/single-header.el")
@@ -427,6 +473,7 @@ mark. Does the same of ARG number sexps if given"
;; 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.
+ '(frog-menu-posframe-background-face ((t (:background "RoyalBlue4"))))
'(minibuffer-prompt ((t (:background "gray10" :foreground "cyan" :box nil :weight bold))))
'(vterm-color-blue ((t (:inherit ansi-color-bright-green)))))
(put 'downcase-region 'disabled nil)