Compare commits
12 Commits
1353cfd91d
...
8235d8d0ae
Author | SHA1 | Date | |
---|---|---|---|
|
8235d8d0ae | ||
|
1227a9f837 | ||
|
6d88f3df5e | ||
|
410a34ef3e | ||
|
c7c56078b8 | ||
|
3d3c04eb5f | ||
|
05f144b85e | ||
|
1c71105efe | ||
|
15ddb2763a | ||
|
a6f2b96937 | ||
|
4f7594b71f | ||
|
2584727852 |
@ -56,4 +56,10 @@
|
||||
:config
|
||||
(evil-collection-occur-setup))
|
||||
|
||||
(use-package hideshow
|
||||
:straight (:type built-in)
|
||||
:hook (prog-mode . hs-minor-mode)
|
||||
:init
|
||||
(general-def 'normal "zM" #'hs-hide-level))
|
||||
|
||||
(provide 'init-built-ins)
|
||||
|
@ -38,6 +38,7 @@
|
||||
(cider-known-endpoints
|
||||
'(("local" "localhost" "4005")))
|
||||
(cider-prompt-for-symbol nil)
|
||||
(cider-comment-prefix ";; => ")
|
||||
:hook ((clojure-mode . cider-mode)
|
||||
(clojurescript-mode . cider-mode)
|
||||
(clojurec-mode . cider-mode))
|
||||
@ -49,6 +50,7 @@
|
||||
(cider-stacktrace-mode-map "SPC" leader-map)
|
||||
(normal cider-mode-map "M-." #'cider-find-var)
|
||||
(cider-mode-map "C-c M-b" #'cider-debug-defun-at-point)
|
||||
(cider-mode-map "C-c M-;" #'cider-pprint-eval-defun-to-comment)
|
||||
(cider-repl-mode-map "C-c C-l" #'cider-repl-clear-buffer))
|
||||
|
||||
(provide 'init-clojure)
|
||||
|
@ -4,6 +4,7 @@
|
||||
:defer 2
|
||||
:init
|
||||
(add-to-list 'auto-mode-alist '("\\.env\\'" . shell-script-mode))
|
||||
(add-to-list 'auto-mode-alist '("\\.env.local\\'" . shell-script-mode))
|
||||
:config
|
||||
(direnv-mode)
|
||||
(add-hook 'eshell-mode-hook #'direnv-update-directory-environment)
|
||||
|
5
emacs/.emacs.d/config/init-elisp.el
Normal file
5
emacs/.emacs.d/config/init-elisp.el
Normal file
@ -0,0 +1,5 @@
|
||||
(use-package elisp-mode
|
||||
:straight (:type built-in)
|
||||
:general
|
||||
(emacs-lisp-mode-map "C-c C-c" #'eval-defun
|
||||
"C-c C-k" #'eval-buffer))
|
@ -4,6 +4,41 @@
|
||||
(use-package nvm
|
||||
:commands (nvm-use
|
||||
nvm-use-for
|
||||
nvm-use-for-buffer))
|
||||
nvm-use-for-buffer
|
||||
nvm--installed-versions)
|
||||
:init
|
||||
(defun nvm (version)
|
||||
(interactive (list
|
||||
(completing-read "Node version: "
|
||||
(mapcar #'car
|
||||
(nvm--installed-versions)))))
|
||||
(nvm-use version)))
|
||||
|
||||
(use-package js
|
||||
:straight (:type built-in)
|
||||
:defer t
|
||||
:config
|
||||
(add-hook 'js-mode-hook #'lsp-deferred))
|
||||
|
||||
;; Make sure we load LSP in React files
|
||||
(with-eval-after-load 'lsp-clients
|
||||
(defun lsp-typescript-javascript-tsx-jsx-activate-p (filename major-mode)
|
||||
"Checks if the javascript-typescript language server should be enabled
|
||||
based on FILE-NAME and MAJOR-MODE"
|
||||
(or (member major-mode '(typescript-mode typescript-tsx-mode js-mode js2-mode rjsx-mode))
|
||||
(and (eq major-mode 'web-mode)
|
||||
(or (string-suffix-p ".tsx" filename t)
|
||||
(string-suffix-p ".jsx" filename t)
|
||||
(string-suffix-p ".js" filename t))))))
|
||||
|
||||
(use-package js-comint
|
||||
:commands (run-js)
|
||||
:config
|
||||
(js-do-use-nvm)
|
||||
:general
|
||||
(js-mode-map "C-c M-j" #'run-js
|
||||
"C-x C-e" #'js-send-last-sexp
|
||||
"C-c C-k" #'js-send-buffer
|
||||
"C-c M-z" #'js-send-buffer-and-go))
|
||||
|
||||
(provide 'init-js)
|
||||
|
@ -50,4 +50,12 @@
|
||||
kubectl-deployments
|
||||
kubectl-statefulsets))
|
||||
|
||||
(when (executable-find "k9s")
|
||||
(defun k9s ()
|
||||
(interactive)
|
||||
(let ((k9s-buf (vterm "*k9s*")))
|
||||
(switch-to-buffer k9s-buf)
|
||||
(vterm-send-string (executable-find "k9s"))
|
||||
(vterm-send-return))))
|
||||
|
||||
(provide 'init-kubernetes)
|
||||
|
@ -360,7 +360,7 @@
|
||||
:name "spend-service"
|
||||
:tags '(lola backend)
|
||||
:command "~/lola/python_services/spend/bin/start.sh"
|
||||
:args '("web")
|
||||
:args '("web-dev")
|
||||
:cwd "~/lola/python_services"
|
||||
:stop-signal 'int
|
||||
:init-async (python-service-setup "~/lola/python_services/.venv"
|
||||
|
@ -7,5 +7,4 @@
|
||||
(global-undo-tree-mode)
|
||||
:bind ("C-c C-r" . undo-tree-visualize))
|
||||
|
||||
|
||||
(provide 'init-undo)
|
||||
|
@ -1,3 +1,5 @@
|
||||
;; -*- lexical-binding: t; -*-
|
||||
|
||||
(use-package vterm
|
||||
:commands vterm
|
||||
:init
|
||||
|
29
emacs/.emacs.d/config/init-web.el
Normal file
29
emacs/.emacs.d/config/init-web.el
Normal file
@ -0,0 +1,29 @@
|
||||
;; -*- lexical-binding: t; -*-
|
||||
|
||||
(use-package web-mode
|
||||
:mode (("\\.phtml\\'" . web-mode)
|
||||
("\\.tpl\\.php\\'" . web-mode)
|
||||
("\\.[agj]sp\\'" . web-mode)
|
||||
("\\.as[cp]x\\'" . web-mode)
|
||||
("\\.erb\\'" . web-mode)
|
||||
("\\.mustache\\'" . web-mode)
|
||||
("\\.djhtml\\'" . web-mode)
|
||||
("\\.hbs\\'" . web-mode)
|
||||
("\\.html?\\'" . web-mode)
|
||||
("\\.jsx?\\'" . web-mode)
|
||||
("\\.mako\\'" . web-mode)
|
||||
("\\.jinja2\\'" . web-mode))
|
||||
:config
|
||||
(setq web-mode-engines-alist
|
||||
'(("django" . "\\.jinja2\\'")))
|
||||
(add-hook 'web-mode-hook
|
||||
(lambda ()
|
||||
(when (equal web-mode-content-type "javascript")
|
||||
(web-mode-set-content-type "jsx"))
|
||||
(when (or (equal web-mode-content-type "javascript")
|
||||
(equal web-mode-content-type "jsx"))
|
||||
(lsp-deferred))))
|
||||
:custom
|
||||
(web-mode-enable-auto-pairing nil))
|
||||
|
||||
(provide 'init-web)
|
15
emacs/.emacs.d/config/init-xml.el
Normal file
15
emacs/.emacs.d/config/init-xml.el
Normal file
@ -0,0 +1,15 @@
|
||||
;; -*- lexical-binding: t; -*-
|
||||
|
||||
(use-package nxml-mode
|
||||
:straight (:type built-in)
|
||||
:defer t
|
||||
:config
|
||||
(add-to-list 'hs-special-modes-alist
|
||||
'(nxml-mode
|
||||
"<!--\\|<[^/>]*[^/]>" ;; regexp for start block
|
||||
"-->\\|</[^/>]*[^/]>" ;; regexp for end block
|
||||
"<!--"
|
||||
nxml-forward-element
|
||||
nil)))
|
||||
|
||||
(provide 'init-xml)
|
@ -1,5 +1,7 @@
|
||||
;; -*- lexical-binding: t; -*-
|
||||
|
||||
(setq load-prefer-newer t)
|
||||
|
||||
;; Some startup time optimizations stolen from Doom emacs
|
||||
(setq gc-cons-threshold most-positive-fixnum ; 2^61 bytes
|
||||
gc-cons-percentage 0.6)
|
||||
|
@ -66,6 +66,7 @@
|
||||
(require 'init-keybindings)
|
||||
(require 'init-auth)
|
||||
(require 'init-lib)
|
||||
(require 'init-elisp)
|
||||
(require 'init-org)
|
||||
(require 'init-profiler)
|
||||
(require 'init-built-ins)
|
||||
@ -88,6 +89,8 @@
|
||||
(require 'init-clojure)
|
||||
(require 'init-lisp)
|
||||
(require 'init-js)
|
||||
(require 'init-web)
|
||||
(require 'init-xml)
|
||||
(require 'init-yaml)
|
||||
(require 'init-groovy)
|
||||
(require 'init-terraform)
|
||||
|
Loading…
Reference in New Issue
Block a user