aboutsummaryrefslogtreecommitdiff
path: root/mixins/dev.el
diff options
context:
space:
mode:
Diffstat (limited to 'mixins/dev.el')
-rw-r--r--mixins/dev.el31
1 files changed, 26 insertions, 5 deletions
diff --git a/mixins/dev.el b/mixins/dev.el
index 29db907..5817c17 100644
--- a/mixins/dev.el
+++ b/mixins/dev.el
@@ -5,8 +5,14 @@
;;; Usage: Append or require this file from init.el for some software
;;; development-focused packages.
;;;
-;;; It is **STRONGLY** recommended that you use the ui.el mixin if you want to
-;;; use eglot. Lots of completion things will work better.
+;;; It is **STRONGLY** recommended that you use the base.el mixin 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:
;;;
@@ -22,7 +28,21 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(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)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -51,8 +71,9 @@
(use-package json-mode
:ensure t)
-;; You're almost certain to find a mode for the language you're looking for.
-;; Search the internet to find the right one.
+;; 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.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
@@ -65,7 +86,7 @@
;; Configure hooks to automatically turn-on eglot for selected modes
; :hook
- ; ((python-mode . eglot))
+ ; (((python-mode ruby-mode elixir-mode) . eglot))
:custom
(eglot-send-changes-idle-time 0.1)