Refactor/break up init.el
This commit is contained in:
parent
0d232eb22e
commit
ac7e57d7e5
|
@ -81,7 +81,7 @@
|
||||||
(null-device . "/dev/null"))))
|
(null-device . "/dev/null"))))
|
||||||
'(custom-enabled-themes '(modus-vivendi-tinted))
|
'(custom-enabled-themes '(modus-vivendi-tinted))
|
||||||
'(custom-safe-themes
|
'(custom-safe-themes
|
||||||
'("b40f11c174e7e475508f1e2c1cfca354d37212494c143a494f27239c7d71a294" "88cb0f9c0c11dbb4c26a628d35eb9239d1cf580cfd28e332e654e7f58b4e721b" "44bb32e37eb2b0573021d5a0ddca17ec2ad437aec14d95fe96e59d1af06c044f" "28d61ac6f26030e3c649e9f75b6ebd93dbf7f5f7b2f13e14cb1fe101e8cf4737" "d015f7295925398145c42285e2ea4bb438d449d36e2b10ba0650024862ec93a8" "64947f83c308d1101f20c6ff86c308497c4d032acb75d8e9dcbc4012d9a3b36e" "277a5bce12d6957dbabb43a2f55ee2b6371388b749cbb29fd251df19334a1f0b" "4b92d689600e9851d098c73951f7075f8fd0bb705b4d68806305cf3e4f001c9e" "75441a94fb5e6943320ce21aa5acf9cb24c3f87915666800f3906af8e85e0892" "f82e68d489e6c21c9552c4e8e35a03d126d9eba632a8e7b4f9329d1374b4a19c" "d395c1793e0d64797d711c870571a0033174ca321ed48444efbe640bf692bf4f" "11873c4fbf465b956889adfa9182495db3bf214d9a70c0f858f07f6cc91cbd47" "eb7cd622a0916358a6ef6305e661c6abfad4decb4a7c12e73d6df871b8a195f8" "fb83a50c80de36f23aea5919e50e1bccd565ca5bb646af95729dc8c5f926cbf3" "e7820b899036ae7e966dcaaec29fd6b87aef253748b7de09e74fdc54407a7a02" "1781e8bccbd8869472c09b744899ff4174d23e4f7517b8a6c721100288311fa5" default))
|
'("8d146df8bd640320d5ca94d2913392bc6f763d5bc2bb47bed8e14975017eea91" "95167736741bef2ad3e0543ed545dada5b95fef309883253387a2b14ab67db8d" "c63d2e6502d4f78e359d1fa610f137dd04778d39133d7d9e75255d2e13c6b8c4" "ceebbe6bf99d69b22440db9ef27b22032e12d2a48be291531757891e74c853c0" "b40f11c174e7e475508f1e2c1cfca354d37212494c143a494f27239c7d71a294" "88cb0f9c0c11dbb4c26a628d35eb9239d1cf580cfd28e332e654e7f58b4e721b" "44bb32e37eb2b0573021d5a0ddca17ec2ad437aec14d95fe96e59d1af06c044f" "28d61ac6f26030e3c649e9f75b6ebd93dbf7f5f7b2f13e14cb1fe101e8cf4737" "d015f7295925398145c42285e2ea4bb438d449d36e2b10ba0650024862ec93a8" "64947f83c308d1101f20c6ff86c308497c4d032acb75d8e9dcbc4012d9a3b36e" "277a5bce12d6957dbabb43a2f55ee2b6371388b749cbb29fd251df19334a1f0b" "4b92d689600e9851d098c73951f7075f8fd0bb705b4d68806305cf3e4f001c9e" "75441a94fb5e6943320ce21aa5acf9cb24c3f87915666800f3906af8e85e0892" "f82e68d489e6c21c9552c4e8e35a03d126d9eba632a8e7b4f9329d1374b4a19c" "d395c1793e0d64797d711c870571a0033174ca321ed48444efbe640bf692bf4f" "11873c4fbf465b956889adfa9182495db3bf214d9a70c0f858f07f6cc91cbd47" "eb7cd622a0916358a6ef6305e661c6abfad4decb4a7c12e73d6df871b8a195f8" "fb83a50c80de36f23aea5919e50e1bccd565ca5bb646af95729dc8c5f926cbf3" "e7820b899036ae7e966dcaaec29fd6b87aef253748b7de09e74fdc54407a7a02" "1781e8bccbd8869472c09b744899ff4174d23e4f7517b8a6c721100288311fa5" default))
|
||||||
'(org-export-backends '(ascii html icalendar latex md odt)))
|
'(org-export-backends '(ascii html icalendar latex md odt)))
|
||||||
(custom-set-faces
|
(custom-set-faces
|
||||||
;; custom-set-faces was added by Custom.
|
;; custom-set-faces was added by Custom.
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
(width (car size))
|
(width (car size))
|
||||||
(top-margin (floor (/ (- (window-height) height) 2)))
|
(top-margin (floor (/ (- (window-height) height) 2)))
|
||||||
(left-margin (floor (/ (- (window-width) width) 2)))
|
(left-margin (floor (/ (- (window-width) width) 2)))
|
||||||
(title "Welcome to Emacs!"))
|
(title "[t] work [m] mail"))
|
||||||
(erase-buffer)
|
(erase-buffer)
|
||||||
(setq mode-line-format nil)
|
(setq mode-line-format nil)
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
|
@ -26,8 +26,8 @@
|
||||||
(read-only-mode +1)
|
(read-only-mode +1)
|
||||||
(switch-to-buffer (current-buffer))
|
(switch-to-buffer (current-buffer))
|
||||||
(local-set-key (kbd "<escape>") 'kill-this-buffer)
|
(local-set-key (kbd "<escape>") 'kill-this-buffer)
|
||||||
(local-set-key (kbd "t") 'vterm)
|
(local-set-key (kbd "m") 'me/email-client-mode)
|
||||||
(local-set-key (kbd "c") 'chatgpt-shell)))
|
(local-set-key (kbd "t") 'me/work-mode)))
|
||||||
|
|
||||||
(setq initial-scratch-message nil)
|
(setq initial-scratch-message nil)
|
||||||
(setq inhibit-startup-screen t)
|
(setq inhibit-startup-screen t)
|
||||||
|
|
|
@ -2,7 +2,8 @@
|
||||||
"My custom configuration for 'org-mode'."
|
"My custom configuration for 'org-mode'."
|
||||||
(olivetti-mode)
|
(olivetti-mode)
|
||||||
(olivetti-set-width 80)
|
(olivetti-set-width 80)
|
||||||
(company-mode -1)
|
;(company-mode -1)
|
||||||
|
;(org-modern-mode)
|
||||||
(setq cursor-type 'bar)
|
(setq cursor-type 'bar)
|
||||||
)
|
)
|
||||||
(add-hook 'org-mode-hook 'me/org-mode)
|
(add-hook 'org-mode-hook 'me/org-mode)
|
||||||
|
@ -31,7 +32,7 @@
|
||||||
(defun me/code ()
|
(defun me/code ()
|
||||||
"Custom mode optimised for coding shit."
|
"Custom mode optimised for coding shit."
|
||||||
(interactive)
|
(interactive)
|
||||||
(setq buffer-face-mode-face '(:family "Jetbrains Mono" :height 120))
|
(setq buffer-face-mode-face '(:family "Berkeley Mono" :height 120))
|
||||||
(setq line-spacing nil)
|
(setq line-spacing nil)
|
||||||
(buffer-face-mode))
|
(buffer-face-mode))
|
||||||
|
|
||||||
|
|
136
.emacs.d/init.el
136
.emacs.d/init.el
|
@ -17,16 +17,14 @@
|
||||||
;; Messes with the Terraform LSP, and I don't really need this myself.
|
;; Messes with the Terraform LSP, and I don't really need this myself.
|
||||||
(setq create-lockfiles nil)
|
(setq create-lockfiles nil)
|
||||||
|
|
||||||
|
(global-tab-line-mode 1)
|
||||||
|
|
||||||
;; Orgmode tweaks.
|
;; Orgmode tweaks.
|
||||||
(setq org-edit-src-content-indentation 0
|
(setq org-edit-src-content-indentation 0
|
||||||
org-src-tab-acts-natively t
|
org-src-tab-acts-natively t
|
||||||
org-src-preserve-indentation t)
|
org-src-preserve-indentation t)
|
||||||
(setq-default tab-width 4)
|
(setq-default tab-width 4)
|
||||||
|
|
||||||
;; WSL keybinds to work around some weirdness.
|
|
||||||
(global-set-key (kbd "C-c y") 'clipboard-yank)
|
|
||||||
(global-set-key (kbd "C-c x") 'kill-ring-save)
|
|
||||||
|
|
||||||
;; straight.el bootstrapping
|
;; straight.el bootstrapping
|
||||||
(defvar bootstrap-version)
|
(defvar bootstrap-version)
|
||||||
(let ((bootstrap-file
|
(let ((bootstrap-file
|
||||||
|
@ -41,131 +39,25 @@
|
||||||
(eval-print-last-sexp)))
|
(eval-print-last-sexp)))
|
||||||
(load bootstrap-file nil 'nomessage))
|
(load bootstrap-file nil 'nomessage))
|
||||||
|
|
||||||
;; package list we want installed
|
;; Packages that we want installed across all use cases.
|
||||||
;; first use-package
|
|
||||||
(straight-use-package 'use-package)
|
(straight-use-package 'use-package)
|
||||||
|
(use-package request :straight t)
|
||||||
(use-package modus-themes :straight t)
|
(use-package modus-themes :straight t)
|
||||||
(use-package vterm :straight t)
|
(use-package simple-modeline :straight t
|
||||||
(use-package el-patch :straight t)
|
:init (simple-modeline-mode 1))
|
||||||
(use-package doom-modeline
|
|
||||||
:straight t
|
|
||||||
:init (doom-modeline-mode 1)
|
|
||||||
:custom (doom-mode-line-height 14))
|
|
||||||
(use-package all-the-icons :straight t)
|
(use-package all-the-icons :straight t)
|
||||||
(use-package paredit
|
|
||||||
:straight t
|
|
||||||
:config
|
|
||||||
(add-hook 'emacs-lisp-mode-hook #'paredit-mode)
|
|
||||||
(add-hook 'lisp-interaction-mode-hook #'paredit-mode)
|
|
||||||
(add-hook 'ielm-mode-hook #'paredit-mode)
|
|
||||||
(add-hook 'lisp-mode-hook #'paredit-mode)
|
|
||||||
(add-hook 'eval-expression-minibuffer-setup-hook #'paredit-mode))
|
|
||||||
(use-package which-key
|
(use-package which-key
|
||||||
:straight t
|
:straight t
|
||||||
:config (which-key-mode))
|
:config (which-key-mode))
|
||||||
(use-package projectile
|
|
||||||
:straight t
|
|
||||||
:init (projectile-mode +1)
|
|
||||||
:config (setq projectile-project-search-path '("~/Projects"))
|
|
||||||
:bind (:map projectile-mode-map
|
|
||||||
("s-p" . projectile-command-map)
|
|
||||||
("C-c p" . projectile-command-map)))
|
|
||||||
(use-package magit :straight t)
|
|
||||||
(use-package hide-mode-line :straight t)
|
|
||||||
(add-hook 'org-mode-hook #'hide-mode-line-mode)
|
|
||||||
(add-hook 'treemacs-mode-hook #'hide-mode-line-mode)
|
|
||||||
(use-package treemacs
|
|
||||||
:straight t
|
|
||||||
:init (with-eval-after-load 'winum
|
|
||||||
(define-key winum-keymap (kbd "M-0") #'treemacs-select-window))
|
|
||||||
:bind
|
|
||||||
(:map global-map
|
|
||||||
("M-0" . treemacs-select-window)
|
|
||||||
("C-x t t" . treemacs)
|
|
||||||
("C-x t C-t" . treemacs-find-file)))
|
|
||||||
(use-package treemacs-projectile
|
|
||||||
:straight t
|
|
||||||
:after (treemacs projectile))
|
|
||||||
|
|
||||||
;; I hate that I need this, but WSL is /special/.
|
|
||||||
(when (and (eq system-type 'gnu/linux)
|
|
||||||
(getenv "WSLENV"))
|
|
||||||
(use-package exec-path-from-shell :straight t)
|
|
||||||
(exec-path-from-shell-initialize))
|
|
||||||
|
|
||||||
;; Direnv integration
|
|
||||||
(use-package direnv :straight t)
|
|
||||||
(direnv-mode)
|
|
||||||
|
|
||||||
(use-package org-modern :straight t)
|
(use-package org-modern :straight t)
|
||||||
(add-hook 'org-mode-hook #'org-modern-mode)
|
(add-hook 'org-mode-hook #'org-modern-mode)
|
||||||
(add-hook 'org-agenda-finalize-hook #'org-modern-agenda)
|
(add-hook 'org-agenda-finalize-hook #'org-modern-agenda)
|
||||||
|
|
||||||
;; lsp-mode stuff
|
|
||||||
(use-package eglot :straight t
|
|
||||||
:config (add-hook 'go-mode-hook 'eglot-ensure)
|
|
||||||
(add-hook 'terraform-mode-hook 'eglot-ensure)
|
|
||||||
(add-hook 'rust-ts-mode 'eglot-ensure)
|
|
||||||
(add-to-list 'eglot-server-programs '(terraform-mode . ("terraform-ls" "serve"))))
|
|
||||||
(use-package flymake :straight t)
|
|
||||||
(use-package company :straight t
|
|
||||||
:config
|
|
||||||
(add-hook 'after-init-hook 'global-company-mode)
|
|
||||||
(setq company-idle-delay 0)
|
|
||||||
(setq company-minimum-prefix-length 1))
|
|
||||||
(use-package go-mode :straight t)
|
|
||||||
(use-package nix-mode :straight t
|
|
||||||
:mode "\\.nix\\'")
|
|
||||||
(use-package yaml-mode :straight t)
|
|
||||||
(use-package svelte-mode :straight t)
|
|
||||||
(use-package terraform-mode :straight t)
|
|
||||||
(use-package yasnippet :straight t)
|
|
||||||
(yas-global-mode 1)
|
|
||||||
(use-package k8s-mode
|
|
||||||
:straight t
|
|
||||||
:config
|
|
||||||
(setq k8s-search-documentation-browser-function 'browse-url-firefox)
|
|
||||||
:hook (k8s-mode . yas-minor-mode))
|
|
||||||
(use-package kubernetes :straight t)
|
|
||||||
(use-package rust-mode :straight t)
|
|
||||||
(add-hook 'rust-mode-hook
|
|
||||||
(lambda () (setq indent-tabs-mode nil)))
|
|
||||||
(add-hook 'rust-ts-mode-hook
|
|
||||||
(lambda () (setq indent-tabs-mode nil)))
|
|
||||||
(use-package tree-sitter :straight t)
|
|
||||||
(use-package tree-sitter-indent :straight t)
|
|
||||||
(use-package markdown-mode :straight t)
|
(use-package markdown-mode :straight t)
|
||||||
(use-package olivetti :straight t)
|
(use-package olivetti :straight t)
|
||||||
|
|
||||||
(setq treesit-language-source-alist
|
(use-package vundo :straight t)
|
||||||
'((bash "https://github.com/tree-sitter/tree-sitter-bash")
|
|
||||||
(cmake "https://github.com/uyha/tree-sitter-cmake")
|
|
||||||
(css "https://github.com/tree-sitter/tree-sitter-css")
|
|
||||||
(elisp "https://github.com/Wilfred/tree-sitter-elisp")
|
|
||||||
(go "https://github.com/tree-sitter/tree-sitter-go")
|
|
||||||
(html "https://github.com/tree-sitter/tree-sitter-html")
|
|
||||||
(javascript "https://github.com/tree-sitter/tree-sitter-javascript" "master" "src")
|
|
||||||
(json "https://github.com/tree-sitter/tree-sitter-json")
|
|
||||||
(make "https://github.com/alemuller/tree-sitter-make")
|
|
||||||
(markdown "https://github.com/ikatyang/tree-sitter-markdown")
|
|
||||||
(python "https://github.com/tree-sitter/tree-sitter-python")
|
|
||||||
(toml "https://github.com/tree-sitter/tree-sitter-toml")
|
|
||||||
(tsx "https://github.com/tree-sitter/tree-sitter-typescript" "master" "tsx/src")
|
|
||||||
(typescript "https://github.com/tree-sitter/tree-sitter-typescript" "master" "typescript/src")
|
|
||||||
(yaml "https://github.com/ikatyang/tree-sitter-yaml")))
|
|
||||||
|
|
||||||
(add-to-list 'auto-mode-alist '("\\.ts\\'" . typescript-ts-mode))
|
|
||||||
|
|
||||||
(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)))
|
|
||||||
|
|
||||||
(add-hook 'prog-mode-hook 'display-line-numbers-mode)
|
|
||||||
|
|
||||||
;; Adapted from https://github.com/Slackwise/dotfiles/blob/master/emacs/slackwise.el
|
;; Adapted from https://github.com/Slackwise/dotfiles/blob/master/emacs/slackwise.el
|
||||||
(setq-default
|
(setq-default
|
||||||
|
@ -178,3 +70,17 @@
|
||||||
custom-file (concat (or (getenv "XDG_CONFIG_HOME") "~/.emacs.d/") "custom.el"))
|
custom-file (concat (or (getenv "XDG_CONFIG_HOME") "~/.emacs.d/") "custom.el"))
|
||||||
(when (file-exists-p custom-file)
|
(when (file-exists-p custom-file)
|
||||||
(load custom-file))
|
(load custom-file))
|
||||||
|
|
||||||
|
(defun me/email-client-mode ()
|
||||||
|
"Custom more for using emacs as a mail client."
|
||||||
|
(interactive)
|
||||||
|
(load (concat (or (getenv "XDG_CONFIG_HOME") "~/.emacs.d/") "mail/init.el"))
|
||||||
|
(kill-this-buffer)
|
||||||
|
(mu4e))
|
||||||
|
|
||||||
|
(defun me/work-mode ()
|
||||||
|
"Custom more for using emacs as programing environment."
|
||||||
|
(interactive)
|
||||||
|
(load (concat (or (getenv "XDG_CONFIG_HOME") "~/.emacs.d/") "prog/init.el"))
|
||||||
|
(kill-this-buffer)
|
||||||
|
(treemacs))
|
||||||
|
|
42
.emacs.d/mail/init.el
Normal file
42
.emacs.d/mail/init.el
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
(cond ((find-font (font-spec :name "Noto Sans"))
|
||||||
|
(set-face-attribute 'default nil :font "Noto Sans-13")))
|
||||||
|
|
||||||
|
(use-package mu4e
|
||||||
|
:straight ( :host github :files ("build/mu4e/*.el") :repo "djcb/mu"
|
||||||
|
:pre-build (("./autogen.sh")
|
||||||
|
("ninja" "-C" "build")))
|
||||||
|
;;:load-path "/usr/share/emacs/site-lisp/mu4e/"
|
||||||
|
;; :defer 20 ; Wait until 20 seconds after startup
|
||||||
|
:config
|
||||||
|
|
||||||
|
;; This is set to 't' to avoid mail syncing issues when using mbsync
|
||||||
|
(setq mu4e-change-filenames-when-moving t)
|
||||||
|
|
||||||
|
;; Refresh mail using isync every 10 minutes
|
||||||
|
(setq mu4e-update-interval (* 10 60))
|
||||||
|
(setq mu4e-get-mail-command "mbsync -a")
|
||||||
|
(setq mu4e-maildir "/var/mail/arch")
|
||||||
|
|
||||||
|
(setq mu4e-drafts-folder "/Drafts")
|
||||||
|
(setq mu4e-sent-folder "/Sent")
|
||||||
|
(setq mu4e-refile-folder "/Archive")
|
||||||
|
(setq mu4e-trash-folder "/Trash")
|
||||||
|
|
||||||
|
(setq mu4e-maildir-shortcuts
|
||||||
|
'((:maildir "/inbox" :key ?i)
|
||||||
|
(:maildir "/Sent" :key ?s)
|
||||||
|
(:maildir "/Trash":key ?t)
|
||||||
|
(:maildir "/Archive":key ?a)
|
||||||
|
(:maildir "/Drafts" :key ?d)))
|
||||||
|
)
|
||||||
|
(setq smtpmail-smtp-server "smtp.fastmail.com"
|
||||||
|
smtpmail-smtp-service 465
|
||||||
|
smtpmail-stream-type 'ssl)
|
||||||
|
(setq message-send-mail-function 'smtpmail-send-it)
|
||||||
|
(setq user-full-name "Gabriel Simmer")
|
||||||
|
(setq smtpmail-local-domain "gmem.ca")
|
||||||
|
(setq user-mail-address (concat "g@" smtpmail-local-domain))
|
||||||
|
|
||||||
|
(fset 'my-move-to-trash "mT")
|
||||||
|
(define-key mu4e-headers-mode-map (kbd "d") 'my-move-to-trash)
|
||||||
|
(define-key mu4e-view-mode-map (kbd "d") 'my-move-to-trash)
|
96
.emacs.d/prog/init.el
Normal file
96
.emacs.d/prog/init.el
Normal file
|
@ -0,0 +1,96 @@
|
||||||
|
(use-package paredit
|
||||||
|
:straight t
|
||||||
|
:config
|
||||||
|
(add-hook 'emacs-lisp-mode-hook #'paredit-mode)
|
||||||
|
(add-hook 'lisp-interaction-mode-hook #'paredit-mode)
|
||||||
|
(add-hook 'ielm-mode-hook #'paredit-mode)
|
||||||
|
(add-hook 'lisp-mode-hook #'paredit-mode)
|
||||||
|
(add-hook 'eval-expression-minibuffer-setup-hook #'paredit-mode))
|
||||||
|
|
||||||
|
(use-package magit :straight t)
|
||||||
|
|
||||||
|
(use-package treemacs
|
||||||
|
:straight t
|
||||||
|
:init (with-eval-after-load 'winum
|
||||||
|
(define-key winum-keymap (kbd "M-0") #'treemacs-select-window))
|
||||||
|
:bind
|
||||||
|
(:map global-map
|
||||||
|
("M-0" . treemacs-select-window)
|
||||||
|
("C-x t t" . treemacs)
|
||||||
|
("C-x t C-t" . treemacs-find-file)))
|
||||||
|
|
||||||
|
(use-package hide-mode-line :straight t)
|
||||||
|
(add-hook 'treemacs-mode-hook #'hide-mode-line-mode)
|
||||||
|
|
||||||
|
;; Direnv integration
|
||||||
|
(use-package direnv :straight t)
|
||||||
|
; (direnv-mode)
|
||||||
|
|
||||||
|
(use-package company :straight t
|
||||||
|
:config
|
||||||
|
(add-hook 'after-init-hook 'global-company-mode)
|
||||||
|
(setq company-idle-delay 0)
|
||||||
|
(setq company-minimum-prefix-length 1))
|
||||||
|
|
||||||
|
(use-package go-mode :straight t)
|
||||||
|
(use-package nix-mode :straight t
|
||||||
|
:mode "\\.nix\\'")
|
||||||
|
(use-package yaml-mode :straight t)
|
||||||
|
(use-package svelte-mode :straight t)
|
||||||
|
(use-package terraform-mode :straight t)
|
||||||
|
(use-package yasnippet :straight t)
|
||||||
|
(yas-global-mode 1)
|
||||||
|
(use-package k8s-mode
|
||||||
|
:straight t
|
||||||
|
:config
|
||||||
|
(setq k8s-search-documentation-browser-function 'browse-url-firefox)
|
||||||
|
:hook (k8s-mode . yas-minor-mode))
|
||||||
|
(use-package kubernetes :straight t)
|
||||||
|
(use-package rust-mode :straight t)
|
||||||
|
(add-hook 'rust-mode-hook
|
||||||
|
(lambda () (setq indent-tabs-mode nil)))
|
||||||
|
(add-hook 'rust-ts-mode-hook
|
||||||
|
(lambda () (setq indent-tabs-mode nil)))
|
||||||
|
(use-package ebuild-mode :straight t)
|
||||||
|
(use-package just-mode :straight t)
|
||||||
|
(use-package lua-mode :straight t)
|
||||||
|
(use-package tree-sitter :straight t)
|
||||||
|
(use-package tree-sitter-indent :straight t)
|
||||||
|
(use-package php-mode :straight t)
|
||||||
|
|
||||||
|
|
||||||
|
(setq treesit-language-source-alist
|
||||||
|
'((bash "https://github.com/tree-sitter/tree-sitter-bash")
|
||||||
|
(cmake "https://github.com/uyha/tree-sitter-cmake")
|
||||||
|
(css "https://github.com/tree-sitter/tree-sitter-css")
|
||||||
|
(elisp "https://github.com/Wilfred/tree-sitter-elisp")
|
||||||
|
(go "https://github.com/tree-sitter/tree-sitter-go")
|
||||||
|
(html "https://github.com/tree-sitter/tree-sitter-html")
|
||||||
|
(javascript "https://github.com/tree-sitter/tree-sitter-javascript" "master" "src")
|
||||||
|
(json "https://github.com/tree-sitter/tree-sitter-json")
|
||||||
|
(make "https://github.com/alemuller/tree-sitter-make")
|
||||||
|
(markdown "https://github.com/ikatyang/tree-sitter-markdown")
|
||||||
|
(python "https://github.com/tree-sitter/tree-sitter-python")
|
||||||
|
(toml "https://github.com/tree-sitter/tree-sitter-toml")
|
||||||
|
(tsx "https://github.com/tree-sitter/tree-sitter-typescript" "master" "tsx/src")
|
||||||
|
(typescript "https://github.com/tree-sitter/tree-sitter-typescript" "master" "typescript/src")
|
||||||
|
(yaml "https://github.com/ikatyang/tree-sitter-yaml")
|
||||||
|
(just "https://github.com/IndianBoy42/tree-sitter-just")
|
||||||
|
(php "https://github.com/tree-sitter/tree-sitter-php")))
|
||||||
|
|
||||||
|
(add-to-list 'auto-mode-alist '("\\.ts\\'" . typescript-ts-mode))
|
||||||
|
|
||||||
|
(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)
|
||||||
|
(rust-mode . rust-ts-mode)
|
||||||
|
(php-mode . php-ts-mode)
|
||||||
|
))
|
||||||
|
|
||||||
|
(add-hook 'prog-mode-hook 'display-line-numbers-mode)
|
||||||
|
|
Loading…
Reference in a new issue