diff options
Diffstat (limited to '.emacs.d/jd/jd-dev.el')
-rwxr-xr-x | .emacs.d/jd/jd-dev.el | 87 |
1 files changed, 40 insertions, 47 deletions
diff --git a/.emacs.d/jd/jd-dev.el b/.emacs.d/jd/jd-dev.el index d69313e..bd8d4ee 100755 --- a/.emacs.d/jd/jd-dev.el +++ b/.emacs.d/jd/jd-dev.el | |||
@@ -9,6 +9,7 @@ | |||
9 | (setq gdb-many-windows t) | 9 | (setq gdb-many-windows t) |
10 | 10 | ||
11 | (jd/use-package lsp-mode "emacs-lsp-mode" | 11 | (jd/use-package lsp-mode "emacs-lsp-mode" |
12 | :diminish t | ||
12 | :commands (lsp lsp-deferred) | 13 | :commands (lsp lsp-deferred) |
13 | :init | 14 | :init |
14 | (setq lsp-headerline-breadcrumb-enable nil) | 15 | (setq lsp-headerline-breadcrumb-enable nil) |
@@ -22,38 +23,33 @@ | |||
22 | :after lsp) | 23 | :after lsp) |
23 | 24 | ||
24 | (jd/use-package paredit "emacs-paredit") | 25 | (jd/use-package paredit "emacs-paredit") |
25 | ;; (jd/use-package evil-paredit "emacs-evil-paredit" | ||
26 | ;; :config | ||
27 | ;; (defun jd/lisp-mode-setup () | ||
28 | ;; (rainbow-delimiters-mode) | ||
29 | ;; (evil-paredit-mode) | ||
30 | ;; (paredit-mode)) | ||
31 | ;; (add-hook 'emacs-startup-hook | ||
32 | ;; (lambda () | ||
33 | ;; (add-hook 'scheme-mode-hook 'jd/lisp-mode-setup) | ||
34 | ;; (add-hook 'emacs-lisp-mode-hook 'jd/lisp-mode-setup) | ||
35 | ;; (add-hook 'clojure-mode-hook 'jd/lisp-mode-setup) | ||
36 | ;; (add-hook 'lisp-mode-hook 'jd/lisp-mode-setup))) | ||
37 | ;; (evil-define-key 'normal paredit-mode-map (kbd "g h") 'paredit-forward-barf-sexp) | ||
38 | ;; (evil-define-key 'normal paredit-mode-map (kbd "g l") 'paredit-forward-slurp-sexp) | ||
39 | ;; (evil-define-key 'normal paredit-mode-map (kbd "g H") 'paredit-backward-slurp-sexp) | ||
40 | ;; (evil-define-key 'normal paredit-mode-map (kbd "g L") 'paredit-backward-barf-sexp)) | ||
41 | (jd/use-package rainbow-delimiters "emacs-rainbow-delimiters") | ||
42 | 26 | ||
43 | (jd/use-package geiser "emacs-geiser") | 27 | (defun jd/lisp-mode-setup () |
44 | (jd/use-package geiser-guile "emacs-geiser-guile") | 28 | (rainbow-delimiters-mode) |
29 | (paredit-mode)) | ||
30 | |||
31 | (add-hook 'emacs-startup-hook | ||
32 | (lambda () | ||
33 | (add-hook 'scheme-mode-hook 'jd/lisp-mode-setup) | ||
34 | (add-hook 'emacs-lisp-mode-hook 'jd/lisp-mode-setup) | ||
35 | (add-hook 'clojure-mode-hook 'jd/lisp-mode-setup) | ||
36 | (add-hook 'lisp-mode-hook 'jd/lisp-mode-setup))) | ||
45 | 37 | ||
46 | ;; (defun jd/python-mode-setup () | 38 | (jd/use-package rainbow-delimiters "emacs-rainbow-delimiters") |
47 | ;; (let ((project-venv-path (concat (projectile-project-root) "venv/"))) | ||
48 | ;; (when (projectile--directory-p project-venv-path) | ||
49 | ;; (pyvenv-activate project-venv-path) | ||
50 | ;; (pyvenv-mode)))) | ||
51 | 39 | ||
52 | ;; (jd/use-package python-mode ;;TODO: find alternative | 40 | (jd/use-package sly "emacs-sly") |
53 | ;; :hook (python-mode . lsp-deferred) | 41 | |
54 | ;; :hook (python-mode . jd/python-mode-setup) | 42 | (jd/use-package geiser "emacs-geiser") |
55 | ;; :config | 43 | (jd/use-package geiser-racket "emacs-geiser-racket") |
56 | ;; (add-to-list 'auto-mode-alist '("\\.py\\'" . python-mode))) | 44 | (jd/use-package racket-mode "emacs-racket-mode") |
45 | (jd/use-package geiser-guile "emacs-geiser-guile" | ||
46 | :config | ||
47 | (when jd/guix-p | ||
48 | (defun jd/guix-repl () | ||
49 | (interactive) | ||
50 | (let ((geiser-guile-binary '("guix" "repl")) | ||
51 | (geiser-guile-load-path (cons "~/dotfiles/guix" geiser-guile-load-path))) | ||
52 | (geiser 'guile))))) | ||
57 | 53 | ||
58 | (jd/use-package pyvenv "emacs-pyvenv" | 54 | (jd/use-package pyvenv "emacs-pyvenv" |
59 | :after python-mode) | 55 | :after python-mode) |
@@ -63,11 +59,7 @@ | |||
63 | :config | 59 | :config |
64 | (setq typescript-indent-level 2)) | 60 | (setq typescript-indent-level 2)) |
65 | 61 | ||
66 | ;; (defun jd/activate-tide-mode () | 62 | (jd/use-package cider "emacs-cider") |
67 | ;; (when (and (stringp buffer-file-name) | ||
68 | ;; (string-match "\\.[tj]sx?\\'" buffer-file-name)) | ||
69 | ;; (tide-setup) | ||
70 | ;; (tide-hl-identifier-mode))) | ||
71 | 63 | ||
72 | (jd/use-package tide "emacs-tide" | 64 | (jd/use-package tide "emacs-tide" |
73 | :after (typescript-mode company web-mode)) | 65 | :after (typescript-mode company web-mode)) |
@@ -94,6 +86,9 @@ | |||
94 | (jd/use-package yaml-mode "emacs-yaml-mode") | 86 | (jd/use-package yaml-mode "emacs-yaml-mode") |
95 | 87 | ||
96 | (jd/use-package docker "emacs-docker" | 88 | (jd/use-package docker "emacs-docker" |
89 | :bind | ||
90 | ("C-c D d" . docker-containers) | ||
91 | ("C-c D D" . docker) | ||
97 | :config | 92 | :config |
98 | (jd/leader-key-def | 93 | (jd/leader-key-def |
99 | "d" '(:ignore t :which-key "Docker") | 94 | "d" '(:ignore t :which-key "Docker") |
@@ -101,6 +96,7 @@ | |||
101 | "dd" '(docker :which-key "Docker"))) | 96 | "dd" '(docker :which-key "Docker"))) |
102 | 97 | ||
103 | (jd/use-package company "emacs-company" | 98 | (jd/use-package company "emacs-company" |
99 | :diminish t | ||
104 | :after lsp-mode | 100 | :after lsp-mode |
105 | :hook (lsp-mode . company-mode) | 101 | :hook (lsp-mode . company-mode) |
106 | :bind (:map company-active-map | 102 | :bind (:map company-active-map |
@@ -114,6 +110,7 @@ | |||
114 | (global-company-mode)) | 110 | (global-company-mode)) |
115 | 111 | ||
116 | (jd/use-package company-box "emacs-company-box" | 112 | (jd/use-package company-box "emacs-company-box" |
113 | :diminish t | ||
117 | :hook (company-mode . company-box-mode)) | 114 | :hook (company-mode . company-box-mode)) |
118 | 115 | ||
119 | (jd/use-package projectile "emacs-projectile" | 116 | (jd/use-package projectile "emacs-projectile" |
@@ -135,15 +132,6 @@ | |||
135 | :init | 132 | :init |
136 | (setq neo-theme 'icons) | 133 | (setq neo-theme 'icons) |
137 | :config | 134 | :config |
138 | |||
139 | ;; (evil-define-key 'normal neotree-mode-map (kbd "TAB") 'neotree-enter) | ||
140 | ;; (evil-define-key 'normal neotree-mode-map (kbd "C-RET") 'neotree-quick-look) | ||
141 | ;; (evil-define-key 'normal neotree-mode-map (kbd "q") 'neotree-hide) | ||
142 | ;; (evil-define-key 'normal neotree-mode-map (kbd "RET") 'neotree-enter) | ||
143 | ;; (evil-define-key 'normal neotree-mode-map (kbd "g") 'neotree-refresh) | ||
144 | ;; (evil-define-key 'normal neotree-mode-map (kbd "A") 'neotree-stretch-toggle) | ||
145 | ;; (evil-define-key 'normal neotree-mode-map (kbd "H") 'neotree-hidden-file-toggle) | ||
146 | |||
147 | (jd/leader-key-def | 135 | (jd/leader-key-def |
148 | "op" '(jd/neotree-project-dir :which-key "Open neotree")) | 136 | "op" '(jd/neotree-project-dir :which-key "Open neotree")) |
149 | 137 | ||
@@ -162,11 +150,16 @@ | |||
162 | 150 | ||
163 | (jd/use-package magit "emacs-magit" | 151 | (jd/use-package magit "emacs-magit" |
164 | :custom | 152 | :custom |
165 | (magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1) | 153 | (magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1)) |
166 | 154 | ||
167 | (jd/leader-key-def | 155 | (jd/use-package restclient "emacs-restclient") |
168 | "g" '(:ignore t :which-key "Git") | 156 | |
169 | "gg" '(magit-status-here :which-key "Magit status"))) | 157 | (setq sql-connection-alist |
158 | '(("net47-abaks" | ||
159 | (sql-product 'postgres) | ||
160 | (sql-user "kuba") | ||
161 | (sql-database "net47") | ||
162 | (sql-server "net47.abaks.pl")))) | ||
170 | 163 | ||
171 | (provide 'jd-dev) | 164 | (provide 'jd-dev) |
172 | 165 | ||