diff options
author | jdlugosz963 <jdlugosz963@gmail.com> | 2024-04-27 20:09:08 +0200 |
---|---|---|
committer | jdlugosz963 <jdlugosz963@gmail.com> | 2024-04-27 20:09:08 +0200 |
commit | 06e0a80f7b509fc2a565aff9ec8311caf4bf6aae (patch) | |
tree | 8edc05e4a3d05250863bbbaa3bb2228373772612 /.emacs.d/jd/jd-dev.el | |
parent | 73af89d935df5a8166114c9257f9f247f29850bf (diff) | |
download | dotfiles-06e0a80f7b509fc2a565aff9ec8311caf4bf6aae.tar.gz dotfiles-06e0a80f7b509fc2a565aff9ec8311caf4bf6aae.zip |
Remove trash and change name from jd/use-package to use-package!
Diffstat (limited to '.emacs.d/jd/jd-dev.el')
-rwxr-xr-x | .emacs.d/jd/jd-dev.el | 232 |
1 files changed, 98 insertions, 134 deletions
diff --git a/.emacs.d/jd/jd-dev.el b/.emacs.d/jd/jd-dev.el index 1e602d6..4cd3f0c 100755 --- a/.emacs.d/jd/jd-dev.el +++ b/.emacs.d/jd/jd-dev.el | |||
@@ -4,25 +4,24 @@ | |||
4 | ;;; Code: | 4 | ;;; Code: |
5 | 5 | ||
6 | (setq c-default-style "linux" | 6 | (setq c-default-style "linux" |
7 | c-basic-offset 8) | 7 | c-basic-offset 8 |
8 | gdb-many-windows t) | ||
8 | 9 | ||
9 | (setq gdb-many-windows t) | 10 | (use-package! lsp-mode "emacs-lsp-mode" |
11 | :diminish t | ||
12 | :commands (lsp lsp-deferred) | ||
13 | :init | ||
14 | (setq lsp-headerline-breadcrumb-enable nil) | ||
15 | (setq lsp-diagnostics-provider :none) | ||
16 | (setq lsp-modeline-diagnostics-enable nil) | ||
17 | (setq lsp-keymap-prefix "C-c l") | ||
18 | :config | ||
19 | (lsp-enable-which-key-integration t)) | ||
10 | 20 | ||
11 | (jd/use-package lsp-mode "emacs-lsp-mode" | 21 | (use-package! lsp-ivy "emacs-lsp-ivy" |
12 | :diminish t | 22 | :after lsp) |
13 | :commands (lsp lsp-deferred) | ||
14 | :init | ||
15 | (setq lsp-headerline-breadcrumb-enable nil) | ||
16 | (setq lsp-diagnostics-provider :none) | ||
17 | (setq lsp-modeline-diagnostics-enable nil) | ||
18 | (setq lsp-keymap-prefix "C-c l") | ||
19 | :config | ||
20 | (lsp-enable-which-key-integration t)) | ||
21 | 23 | ||
22 | (jd/use-package lsp-ivy "emacs-lsp-ivy" | 24 | (use-package! paredit "emacs-paredit") |
23 | :after lsp) | ||
24 | |||
25 | (jd/use-package paredit "emacs-paredit") | ||
26 | 25 | ||
27 | (defun jd/lisp-mode-setup () | 26 | (defun jd/lisp-mode-setup () |
28 | (rainbow-delimiters-mode) | 27 | (rainbow-delimiters-mode) |
@@ -35,124 +34,89 @@ | |||
35 | (add-hook 'clojure-mode-hook 'jd/lisp-mode-setup) | 34 | (add-hook 'clojure-mode-hook 'jd/lisp-mode-setup) |
36 | (add-hook 'lisp-mode-hook 'jd/lisp-mode-setup))) | 35 | (add-hook 'lisp-mode-hook 'jd/lisp-mode-setup))) |
37 | 36 | ||
38 | (jd/use-package rainbow-delimiters "emacs-rainbow-delimiters") | 37 | (use-package! rainbow-delimiters "emacs-rainbow-delimiters") |
39 | 38 | ||
40 | (jd/use-package sly "emacs-sly") | 39 | (use-package! sly "emacs-sly") |
41 | 40 | ||
42 | (jd/use-package geiser "emacs-geiser") | 41 | (use-package! geiser "emacs-geiser") |
43 | (jd/use-package geiser-racket "emacs-geiser-racket") | 42 | (use-package! geiser-racket "emacs-geiser-racket") |
44 | (jd/use-package racket-mode "emacs-racket-mode") | 43 | (use-package! racket-mode "emacs-racket-mode") |
45 | (jd/use-package geiser-guile "emacs-geiser-guile" | 44 | (use-package! geiser-guile "emacs-geiser-guile" |
46 | :config | 45 | :config |
47 | (when jd/guix-p | 46 | (when jd/guix-p |
48 | (defun jd/guix-repl () | 47 | (defun jd/guix-repl () |
49 | (interactive) | 48 | (interactive) |
50 | (let ((geiser-guile-binary '("guix" "repl")) | 49 | (let ((geiser-guile-binary '("guix" "repl")) |
51 | (geiser-guile-load-path (cons "~/dotfiles/guix" geiser-guile-load-path))) | 50 | (geiser-guile-load-path (cons "~/dotfiles/guix" geiser-guile-load-path))) |
52 | (geiser 'guile))))) | 51 | (geiser 'guile))))) |
53 | 52 | ||
54 | (jd/use-package pyvenv "emacs-pyvenv" | 53 | (use-package! pyvenv "emacs-pyvenv" |
55 | :after python-mode) | 54 | :after python-mode) |
56 | 55 | ||
57 | (jd/use-package typescript-mode "emacs-typescript-mode" | 56 | (use-package! typescript-mode "emacs-typescript-mode" |
58 | :mode ("\\.ts\\'") | 57 | :mode ("\\.ts\\'") |
59 | :config | 58 | :config |
60 | (setq typescript-indent-level 2)) | 59 | (setq typescript-indent-level 2)) |
61 | 60 | ||
62 | (jd/use-package cider "emacs-cider") | 61 | (use-package! cider "emacs-cider") |
63 | 62 | ||
64 | (jd/use-package tide "emacs-tide" | 63 | (use-package! tide "emacs-tide" |
65 | :after (typescript-mode company web-mode)) | 64 | :after (typescript-mode company web-mode)) |
66 | 65 | ||
67 | (jd/use-package flycheck "emacs-flycheck" | 66 | (use-package! flycheck "emacs-flycheck" |
68 | :hook ((after-init . global-flycheck-mode))) | 67 | :hook ((after-init . global-flycheck-mode))) |
69 | 68 | ||
70 | (jd/use-package web-mode "emacs-web-mode" | 69 | (use-package! web-mode "emacs-web-mode" |
71 | ;; :hook ((web-mode . jd/activate-tide-mode)) | 70 | :mode |
72 | :mode | 71 | ("\\.ejs\\'" "\\.hbs\\'" "\\.html\\'" "\\.php\\'" "\\.[jt]sx?\\'") |
73 | ("\\.ejs\\'" "\\.hbs\\'" "\\.html\\'" "\\.php\\'" "\\.[jt]sx?\\'") | 72 | :config |
74 | :config | 73 | (setq web-mode-content-types-alist '(("jsx" . "\\.[jt]sx?\\'"))) |
75 | (setq web-mode-content-types-alist '(("jsx" . "\\.[jt]sx?\\'"))) | 74 | (setq web-mode-markup-indent-offset 2) |
76 | (setq web-mode-markup-indent-offset 2) | 75 | (setq web-mode-css-indent-offset 2) |
77 | (setq web-mode-css-indent-offset 2) | 76 | (setq web-mode-code-indent-offset 2) |
78 | (setq web-mode-code-indent-offset 2) | 77 | (setq web-mode-script-padding 2) |
79 | (setq web-mode-script-padding 2) | 78 | (setq web-mode-block-padding 2) |
80 | (setq web-mode-block-padding 2) | 79 | (setq web-mode-style-padding 2) |
81 | (setq web-mode-style-padding 2) | 80 | (setq web-mode-enable-auto-pairing t) |
82 | (setq web-mode-enable-auto-pairing t) | 81 | (setq web-mode-enable-auto-closing t) |
83 | (setq web-mode-enable-auto-closing t) | 82 | (setq web-mode-enable-current-element-highlight t)) |
84 | (setq web-mode-enable-current-element-highlight t)) | 83 | |
85 | 84 | (use-package! yaml-mode "emacs-yaml-mode") | |
86 | (jd/use-package yaml-mode "emacs-yaml-mode") | 85 | |
87 | 86 | (use-package! docker "emacs-docker" | |
88 | (jd/use-package docker "emacs-docker" | 87 | :bind |
89 | :bind | 88 | ("C-c D d" . docker-containers) |
90 | ("C-c D d" . docker-containers) | 89 | ("C-c D D" . docker)) |
91 | ("C-c D D" . docker) | 90 | |
92 | :config | 91 | (use-package! company "emacs-company" |
93 | (jd/leader-key-def | 92 | :diminish t |
94 | "d" '(:ignore t :which-key "Docker") | 93 | :after lsp-mode |
95 | "dc" '(docker-containers :which-key "Docker containers") | 94 | :hook (lsp-mode . company-mode) |
96 | "dd" '(docker :which-key "Docker"))) | 95 | :bind (:map company-active-map |
97 | 96 | ("<tab>" . company-complete-selection)) | |
98 | (jd/use-package company "emacs-company" | 97 | (:map lsp-mode-map |
99 | :diminish t | 98 | ("<tab>" . company-indent-or-complete-common)) |
100 | :after lsp-mode | 99 | :custom |
101 | :hook (lsp-mode . company-mode) | 100 | (company-minimum-prefix-length 1) |
102 | :bind (:map company-active-map | 101 | (company-idle-delay 0.0) |
103 | ("<tab>" . company-complete-selection)) | 102 | :config |
104 | (:map lsp-mode-map | 103 | (global-company-mode)) |
105 | ("<tab>" . company-indent-or-complete-common)) | 104 | |
106 | :custom | 105 | (use-package! projectile "emacs-projectile" |
107 | (company-minimum-prefix-length 1) | 106 | :diminish projectile-mode |
108 | (company-idle-delay 0.0) | 107 | :init |
109 | :config | 108 | (when (file-directory-p "~/Documents/code") |
110 | (global-company-mode)) | 109 | (setq projectile-project-search-path '("~/Documents/code/"))) |
111 | 110 | :custom ((projectile-Completion-system 'ivy)) | |
112 | ;; (jd/use-package company-box "emacs-company-box" | 111 | :config |
113 | ;; :diminish t | 112 | (setq projectile-switch-project-action #'projectile-dired) |
114 | ;; :hook (company-mode . company-box-mode)) | 113 | (projectile-mode)) |
115 | 114 | ||
116 | (jd/use-package projectile "emacs-projectile" | 115 | (use-package! magit "emacs-magit" |
117 | :diminish projectile-mode | 116 | :custom |
118 | :init | 117 | (magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1)) |
119 | (when (file-directory-p "~/Documents/code") | 118 | |
120 | (setq projectile-project-search-path '("~/Documents/code/"))) | 119 | (use-package! restclient "emacs-restclient") |
121 | :custom ((projectile-Completion-system 'ivy)) | ||
122 | :config | ||
123 | (setq projectile-switch-project-action #'projectile-dired) | ||
124 | (projectile-mode) | ||
125 | |||
126 | (jd/leader-key-def | ||
127 | "p" '(projectile-command-map :which-key "Project") | ||
128 | "p <ESC>" '() | ||
129 | "SPC" '(projectile-find-file :which-key "Find file in project"))) | ||
130 | |||
131 | (jd/use-package neotree "emacs-neotree" | ||
132 | :init | ||
133 | (setq neo-theme 'icons) | ||
134 | :config | ||
135 | (jd/leader-key-def | ||
136 | "op" '(jd/neotree-project-dir :which-key "Open neotree")) | ||
137 | |||
138 | (defun jd/neotree-project-dir () | ||
139 | "Open NeoTree using the git root." | ||
140 | (interactive) | ||
141 | (let ((project-dir (projectile-project-root)) | ||
142 | (file-name (buffer-file-name))) | ||
143 | (neotree-toggle) | ||
144 | (if project-dir | ||
145 | (if (neo-global--window-exists-p) | ||
146 | (progn | ||
147 | (neotree-dir project-dir) | ||
148 | (neotree-find file-name))) | ||
149 | (message "Could not find git project root."))))) | ||
150 | |||
151 | (jd/use-package magit "emacs-magit" | ||
152 | :custom | ||
153 | (magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1)) | ||
154 | |||
155 | (jd/use-package restclient "emacs-restclient") | ||
156 | 120 | ||
157 | (setq sql-connection-alist | 121 | (setq sql-connection-alist |
158 | '(("net47-abaks" | 122 | '(("net47-abaks" |