More things again
This commit is contained in:
parent
c5c9cc4927
commit
37e9d3fd37
104
config.org
104
config.org
|
@ -48,10 +48,6 @@
|
|||
** Dirvish
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(setq dired-omit-files
|
||||
(rx (or (seq bol (? ".") "#")
|
||||
(seq bol "." eol))))
|
||||
|
||||
(add-hook 'dired-mode-hook 'dired-omit-mode)
|
||||
|
||||
(defun my/dirvish-create-file ()
|
||||
|
@ -71,10 +67,20 @@
|
|||
:config
|
||||
(dirvish-peek-mode)
|
||||
(dirvish-side-follow-mode)
|
||||
(setq dired-listing-switches "-al --ignore='^\\.$' --human-readable --group-directories-first"
|
||||
(setq dired-listing-switches "-al --human-readable --group-directories-first"
|
||||
dired-mouse-drag-files t
|
||||
dired-omit-files (rx (or (seq bol (? ".") "#")
|
||||
(seq bol "." eol)
|
||||
(seq bol ".git" eol)))
|
||||
dirvish-emerge-groups '(("Recent files" (predicate . recent-files-2h))
|
||||
("Documents" (extensions "pdf" "tex" "bib" "epub"))
|
||||
("Video" (extensions "mp4" "mkv" "webm"))
|
||||
("Pictures" (extensions "jpg" "png" "svg" "gif"))
|
||||
("Audio" (extensions "mp3" "flac" "wav" "ape" "aac"))
|
||||
("Archives" (extensions "gz" "rar" "zip")))
|
||||
dirvish-attributes '(vc-state subtree-state nerd-icons collapse git-msg file-time file-size)
|
||||
dirvish-mode-line-format '(:left (sort symlink) :right (omit yank index))
|
||||
dirvish-mode-line-height 25
|
||||
dirvish-subtree-state-style 'nerd
|
||||
mouse-drag-and-drop-region-cross-program t))
|
||||
|
||||
|
@ -98,6 +104,39 @@
|
|||
(when (eq system-type 'darwin) (ns-auto-titlebar-mode)))
|
||||
#+end_src
|
||||
|
||||
** Doom Modeline
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package doom-modeline
|
||||
:ensure t
|
||||
:config
|
||||
(doom-modeline-mode))
|
||||
#+end_src
|
||||
|
||||
** Nix
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package nix-mode
|
||||
:mode "\\.nix\\'")
|
||||
#+end_src
|
||||
|
||||
** Org Mode Templates
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
;; Inhibits autopairs from running for <> in org mode
|
||||
(add-hook 'org-mode-hook
|
||||
(lambda ()
|
||||
(setq-local electric-pair-inhibit-predicate
|
||||
`(lambda (c) (if (char-equal c ?<) t (,electric-pair-inhibit-predicate c))))))
|
||||
|
||||
(require 'org-tempo)
|
||||
(add-to-list 'org-modules 'org-tempo t)
|
||||
|
||||
(defun org-babel-edit-prep:emacs-lisp (babel-info)
|
||||
(setq-local buffer-file-name (->> babel-info caddr (alist-get :tangle)))
|
||||
(lsp))
|
||||
#+end_src
|
||||
|
||||
** Fix Indents + Enable Autopairs
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
|
@ -136,7 +175,26 @@
|
|||
(evil-leader/set-key "e" #'dirvish-side))
|
||||
|
||||
(use-package eglot
|
||||
:hook (emacs-lisp-mode . eglot-ensure))
|
||||
:hook
|
||||
(prog-mode . eglot-ensure)
|
||||
:config
|
||||
(add-hook 'emacs-lisp-mode-hook 'eglot-ensure)
|
||||
(add-hook 'c-mode-hook 'hide-ifdef-mode)
|
||||
(add-hook 'c++-mode-hook 'hide-ifdef-mode))
|
||||
|
||||
(setq-default eglot-workspace-configuration
|
||||
'((haskell
|
||||
(plugin
|
||||
(stan
|
||||
(globalOn . :json-false)))))) ;; disable stan
|
||||
|
||||
(defun my/eglot-format-buffer-on-save ()
|
||||
"Format the current buffer if Eglot is active."
|
||||
(when (bound-and-true-p eglot--managed-p)
|
||||
(eglot-format-buffer)))
|
||||
|
||||
(add-hook 'before-save-hook #'my/eglot-format-buffer-on-save)
|
||||
|
||||
|
||||
(use-package catppuccin-theme
|
||||
:ensure t
|
||||
|
@ -244,6 +302,40 @@
|
|||
initial-buffer-choice (lambda () (get-buffer-create "*dashboard*"))))
|
||||
#+end_src
|
||||
|
||||
** Git Integration
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package transient :ensure t)
|
||||
|
||||
(use-package magit
|
||||
:ensure t
|
||||
:commands magit-status magit-blame magit-version
|
||||
:init
|
||||
(defadvice magit-status (around magit-fullscreen activate)
|
||||
(window-configuration-to-register :magit-fullscreen) ad-do-it
|
||||
(delete-other-windows))
|
||||
:config
|
||||
(setq magit-branch-arguments nil
|
||||
magit-completing-read-function 'magit-ido-completing-read
|
||||
magit-default-tracking-name-function 'magit-default-tracking-name-branch-only
|
||||
magit-push-always-verify nil
|
||||
magit-restore-window-configuration t)
|
||||
:bind ("C-x g" . magit-status))
|
||||
|
||||
(use-package git-gutter
|
||||
:ensure t
|
||||
:config
|
||||
(global-git-gutter-mode +1))
|
||||
#+end_src
|
||||
|
||||
** Direnv
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package direnv
|
||||
:config
|
||||
(direnv-mode))
|
||||
#+end_src
|
||||
|
||||
** Better M-x
|
||||
|
||||
*** Ivy Mode (Completions)
|
||||
|
|
Loading…
Reference in a new issue