aboutsummaryrefslogtreecommitdiff
path: root/.emacs.d/lisp/init-lang.el
diff options
context:
space:
mode:
authorGuangxiong Lin <[email protected]>2022-03-13 00:07:38 +0800
committerGuangxiong Lin <[email protected]>2022-03-13 00:09:13 +0800
commit38ab771977e6511d02df06cb908824707d728303 (patch)
tree2c77fb392b35e8e7c2105d3bb29f24b34c5388f7 /.emacs.d/lisp/init-lang.el
parent0097d1f3e22565ffb6db689c06ee2f9610cd45d0 (diff)
downloaddotfiles-38ab771977e6511d02df06cb908824707d728303.tar.gz
dotfiles-38ab771977e6511d02df06cb908824707d728303.tar.bz2
dotfiles-38ab771977e6511d02df06cb908824707d728303.zip
Refactor emacs config
Use less use-package features
Diffstat (limited to '.emacs.d/lisp/init-lang.el')
-rw-r--r--.emacs.d/lisp/init-lang.el76
1 files changed, 20 insertions, 56 deletions
diff --git a/.emacs.d/lisp/init-lang.el b/.emacs.d/lisp/init-lang.el
index f281ac9..341321a 100644
--- a/.emacs.d/lisp/init-lang.el
+++ b/.emacs.d/lisp/init-lang.el
@@ -1,64 +1,28 @@
-(use-package ledger-mode
- :mode (("\\.journal$" . ledger-mode))
- :config
+(use-package ledger-mode :ensure t :defer t)
+(add-to-list 'auto-mode-alist '("\\.journal\\'" . ledger-mode))
+(with-eval-after-load 'ledger-mode
(setq ledger-default-date-format ledger-iso-date-format))
-(use-package markdown-mode
- :ensure t
- :commands (markdown-mode gfm-mode)
- :mode (("README\\.md\\'" . gfm-mode)
- ("\\.md\\'" . markdown-mode)
- ("\\.markdown\\'" . markdown-mode))
- :init
- (setq markdown-command '("pandoc" "--from=markdown" "--to=html5")))
+(use-package go-mode :ensure t :defer t)
+(add-to-list 'auto-mode-alist '("\\.go\\'" . go-mode))
+(add-hook 'go-mode-hook (lambda () (setq tab-width 4)))
-(with-eval-after-load 'evil
- (evil-define-key 'normal markdown-mode-map
- (kbd "<RET>") 'markdown-follow-link-at-point))
+(use-package go-dlv :ensure t :defer t)
-(use-package go-mode
- :ensure t
- :commands (go-mode)
- :mode (("\\.go$" . go-mode))
- :hook ((go-mode . (lambda () (setq tab-width 4)))))
+(use-package eglot :ensure t :defer t)
+(add-hook 'go-mode-hook 'eglot-ensure)
-(use-package go-dlv
- :ensure t
- :after (go-mode))
+(use-package realgud :ensure t :defer t)
-(use-package eglot
- :ensure t
- :commands (eglot)
- :hook
- ((go-mode . eglot-ensure)))
-
-(use-package magit
- :ensure t
- :commands (magit magit-status)
- :init
- (setq magit-refresh-status-buffer nil))
-
-(with-eval-after-load 'evil
- (evil-define-key 'normal 'global
- (kbd "<leader>gs") 'magit))
-
-
-(use-package realgud
- :defer t
- :ensure t)
-
-(use-package plantuml-mode
- :ensure t
- :defer t
- :init
- (add-to-list 'auto-mode-alist '("\\.plantuml\\'" . plantuml-mode))
- :config
- (setq plantuml-jar-path "~/.local/bin/plantuml.jar"
- plantuml-default-exec-mode 'jar
- org-plantuml-jar-path "~/.local/bin/plantuml.jar"
- org-plantuml-default-exec-mode 'jar)
- (add-to-list 'org-src-lang-modes '("plantuml" . plantuml))
- (unless (file-readable-p plantuml-jar-path)
- (plantuml-download-jar)))
+(use-package plantuml-mode :ensure t :defer t)
+(add-to-list 'auto-mode-alist '("\\.plantuml\\'" . plantuml-mode))
+(setq plantuml-jar-path "~/.local/bin/plantuml.jar"
+ plantuml-default-exec-mode 'jar
+ org-plantuml-jar-path plantuml-jar-path
+ org-plantuml-default-exec-mode 'jar)
+(unless (file-readable-p plantuml-jar-path)
+ (plantuml-download-jar))
+(with-eval-after-load 'org
+ (add-to-list 'org-src-lang-modes '("plantuml" . plantuml)))
(provide 'init-lang)