2019-07-10 23:27:54 +02:00
|
|
|
;; magit
|
|
|
|
(use-package magit
|
|
|
|
:ensure t
|
|
|
|
:init
|
|
|
|
;; (taken from :open https://r0tty.org/git/dotfiles/emacs/tree/.emacs.d/config/development.el)
|
|
|
|
(defun vcsh (repo)
|
|
|
|
"Invoke magit on a vcsh repo. This requires an appropriate entry in `tramp-methods'."
|
|
|
|
(interactive (let ((repos (delq nil
|
|
|
|
(mapcar #'(lambda (name)
|
|
|
|
(if (string-match ".git$" name)
|
|
|
|
(substring name 0 -4)
|
|
|
|
nil))
|
|
|
|
(directory-files "~/.config/vcsh/repo.d")))))
|
|
|
|
(list (completing-read "Repository: " repos nil t))))
|
2023-06-01 17:11:06 +02:00
|
|
|
(magit-status-internal (format "/vcsh:%s:" repo)))
|
|
|
|
:config
|
|
|
|
;; Turn on flyspell when writing commit messages
|
|
|
|
(add-hook 'git-commit-setup-hook 'git-commit-turn-on-flyspell))
|
2019-07-10 23:27:54 +02:00
|
|
|
|
|
|
|
;; rust
|
|
|
|
(use-package cargo :ensure t)
|
2023-05-10 11:26:12 +02:00
|
|
|
(use-package cargo-mode :ensure t)
|
|
|
|
(use-package rust-mode :ensure t)
|
2019-07-10 23:27:54 +02:00
|
|
|
(use-package flycheck-rust :ensure t)
|
|
|
|
|
|
|
|
;; start cargo
|
|
|
|
(add-hook 'rust-mode-hook 'cargo-minor-mode)
|
|
|
|
|
|
|
|
;; yaml
|
|
|
|
(use-package yaml-mode :ensure t)
|
|
|
|
(use-package flycheck-yamllint :ensure t)
|
|
|
|
|
|
|
|
;; paredit
|
2019-11-10 02:59:24 +01:00
|
|
|
(use-package paredit :ensure t)
|
2019-07-10 23:27:54 +02:00
|
|
|
(autoload 'enable-paredit-mode "paredit" "Turn on pseudo-structural editing of Lisp code." t)
|
|
|
|
(add-hook 'emacs-lisp-mode-hook #'enable-paredit-mode)
|
|
|
|
(add-hook 'eval-expression-minibuffer-setup-hook #'enable-paredit-mode)
|
|
|
|
(add-hook 'ielm-mode-hook #'enable-paredit-mode)
|
|
|
|
(add-hook 'lisp-mode-hook #'enable-paredit-mode)
|
|
|
|
(add-hook 'lisp-interaction-mode-hook #'enable-paredit-mode)
|
|
|
|
(add-hook 'scheme-mode-hook #'enable-paredit-mode)
|
|
|
|
|
|
|
|
;; Hack to show only files known to git inside dired; needs the
|
|
|
|
;; `git-find' shell script shim (taken from :open https://r0tty.org/git/dotfiles/emacs/tree/.emacs.d/config/development.el)
|
|
|
|
(defun git-dired (dir)
|
|
|
|
(interactive (list (read-directory-name "Find files in directory: " nil "" t)))
|
|
|
|
(let ((find-program "git-find"))
|
|
|
|
(find-dired dir "")))
|
2023-07-14 12:47:31 +02:00
|
|
|
|
|
|
|
;; c
|
|
|
|
(setq c-default-style "linux"
|
|
|
|
c-basic-offset 2)
|
|
|
|
|
|
|
|
(add-hook 'c-mode-hook
|
|
|
|
(lambda ()
|
|
|
|
(set-fill-column 100)))
|
2023-07-14 12:49:34 +02:00
|
|
|
|
|
|
|
;; enable flyspell checks for comments in code
|
|
|
|
(add-hook 'prog-mode-hook #'flyspell-prog-mode)
|