aboutsummaryrefslogtreecommitdiff
path: root/.emacs.d/lisp/init-lang.el
diff options
context:
space:
mode:
authorgxlin <[email protected]>2021-07-06 22:00:15 +0800
committergxlin <[email protected]>2021-07-06 22:00:15 +0800
commit43b356933766807cff3cce9dda6955469f4df49c (patch)
treeb13768fdd9c3d4fd00571870639a9100b1086bbf /.emacs.d/lisp/init-lang.el
parent20f2705342e1c444bda1b4c9a2077408ae14389a (diff)
downloaddotfiles-43b356933766807cff3cce9dda6955469f4df49c.tar.gz
dotfiles-43b356933766807cff3cce9dda6955469f4df49c.tar.bz2
dotfiles-43b356933766807cff3cce9dda6955469f4df49c.zip
Reorganized emacs config
Diffstat (limited to '.emacs.d/lisp/init-lang.el')
-rw-r--r--.emacs.d/lisp/init-lang.el33
1 files changed, 33 insertions, 0 deletions
diff --git a/.emacs.d/lisp/init-lang.el b/.emacs.d/lisp/init-lang.el
new file mode 100644
index 0000000..f8e96b6
--- /dev/null
+++ b/.emacs.d/lisp/init-lang.el
@@ -0,0 +1,33 @@
+(use-package ledger-mode
+ :mode (("\\.journal$" . ledger-mode)))
+
+(use-package markdown-mode
+ :ensure t
+ :commands (markdown-mode gfm-mode)
+ :mode (("README\\.md\\'" . gfm-mode)
+ ("\\.md\\'" . markdown-mode)
+ ("\\.markdown\\'" . markdown-mode))
+ :init
+ (evil-define-key 'normal markdown-mode-map
+ (kbd "<RET>") 'markdown-follow-link-at-point)
+ (setq markdown-command "multimarkdown"))
+
+(use-package go-mode
+ :ensure t
+ :commands (go-mode)
+ :mode (("\\.go\\'" . go-mode))
+ :hook ((go-mode . (lambda () (setq tab-width 4)))))
+
+(use-package lsp-mode
+ :ensure t
+ :hook
+ ((go-mode . lsp-deferred)
+ (lsp-mode . lsp-enable-which-key-integration))
+ :commands (lsp lsp-deferred)
+ :config
+ (evil-define-key 'normal lsp-mode-map
+ (kbd "gd") 'lsp-find-definition
+ (kbd "gr") 'lsp-find-references)
+ (add-to-list 'lsp-file-watch-ignored-directories "[/\\\\]\\.git\\'"))
+
+(provide 'init-lang)