aboutsummaryrefslogtreecommitdiff
path: root/extras/dev.el
diff options
context:
space:
mode:
Diffstat (limited to 'extras/dev.el')
-rw-r--r--extras/dev.el100
1 files changed, 100 insertions, 0 deletions
diff --git a/extras/dev.el b/extras/dev.el
new file mode 100644
index 0000000..40dd6cf
--- /dev/null
+++ b/extras/dev.el
@@ -0,0 +1,100 @@
+;;; Emacs Bedrock
+;;;
+;;; Extra config: Development tools
+
+;;; Usage: Append or require this file from init.el for some software
+;;; development-focused packages.
+;;;
+;;; It is **STRONGLY** recommended that you use the base.el config if you want to
+;;; use Eglot. Lots of completion things will work better.
+;;;
+;;; This will try to use tree-sitter modes for many languages. Please run
+;;;
+;;; M-x treesit-install-language-grammar
+;;;
+;;; Before trying to use a treesit mode.
+
+;;; Contents:
+;;;
+;;; - Built-in config for developers
+;;; - Version Control
+;;; - Common file types
+;;; - Eglot, the built-in LSP client for Emacs
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; Built-in config for developers
+;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(use-package emacs
+ :config
+ ;; Treesitter config
+
+ ;; Tell Emacs to prefer the treesitter mode
+ ;; You'll want to run the command `M-x treesit-install-language-grammar' before editing.
+ (setq major-mode-remap-alist
+ '((yaml-mode . yaml-ts-mode)
+ (bash-mode . bash-ts-mode)
+ (js2-mode . js-ts-mode)
+ (typescript-mode . typescript-ts-mode)
+ (json-mode . json-ts-mode)
+ (css-mode . css-ts-mode)
+ (python-mode . python-ts-mode)))
+ :hook
+ ;; Auto parenthesis matching
+ ((prog-mode . electric-pair-mode)))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; Version Control
+;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;; Magit: best Git client to ever exist
+(use-package magit
+ :ensure t
+ :bind (("s-g" . magit-status)
+ ("C-c g" . magit-status)))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; Common file types
+;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(use-package markdown-mode
+ :hook ((markdown-mode . visual-line-mode)))
+
+(use-package yaml-mode
+ :ensure t)
+
+(use-package json-mode
+ :ensure t)
+
+;; Emacs ships with a lot of popular programming language modes. If it's not
+;; built in, you're almost certain to find a mode for the language you're
+;; looking for with a quick Internet search.
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; Eglot, the built-in LSP client for Emacs
+;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(use-package eglot
+ ;; no :ensure t here because it's built-in
+
+ ;; Configure hooks to automatically turn-on eglot for selected modes
+ ; :hook
+ ; (((python-mode ruby-mode elixir-mode) . eglot))
+
+ :custom
+ (eglot-send-changes-idle-time 0.1)
+
+ :config
+ (fset #'jsonrpc--log-event #'ignore) ; massive perf boost---don't log every event
+ ;; Sometimes you need to tell Eglot where to find the language server
+ ; (add-to-list 'eglot-server-programs
+ ; '(haskell-mode . ("haskell-language-server-wrapper" "--lsp")))
+ )