summaryrefslogtreecommitdiffstats
path: root/.emacs.d/jd/jd-dev.el
diff options
context:
space:
mode:
Diffstat (limited to '.emacs.d/jd/jd-dev.el')
-rwxr-xr-x.emacs.d/jd/jd-dev.el155
1 files changed, 0 insertions, 155 deletions
diff --git a/.emacs.d/jd/jd-dev.el b/.emacs.d/jd/jd-dev.el
deleted file mode 100755
index 569b12f..0000000
--- a/.emacs.d/jd/jd-dev.el
+++ /dev/null
@@ -1,155 +0,0 @@
1;;; Dotfiles --- Jakub Dlugosz emacs config
2;;; Commentary:
3
4;;; Code:
5
6(setq c-default-style "linux"
7 c-basic-offset 8
8 gdb-many-windows t)
9
10(use-package lsp-mode
11 :guix-package "emacs-lsp-mode"
12 :diminish t
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
22(use-package lsp-ivy
23 :guix-package "emacs-lsp-ivy"
24 :after lsp)
25
26
27(use-package paredit
28 :guix-package "emacs-paredit")
29
30(defun jd/lisp-mode-setup ()
31 (rainbow-delimiters-mode)
32 (paredit-mode))
33
34(add-hook 'emacs-startup-hook
35 (lambda ()
36 (add-hook 'scheme-mode-hook 'jd/lisp-mode-setup)
37 (add-hook 'emacs-lisp-mode-hook 'jd/lisp-mode-setup)
38 (add-hook 'clojure-mode-hook 'jd/lisp-mode-setup)
39 (add-hook 'lisp-mode-hook 'jd/lisp-mode-setup)))
40
41(use-package rainbow-delimiters
42 :guix-package "emacs-rainbow-delimiters")
43
44(use-package sly
45 :guix-package "emacs-sly")
46
47(use-package geiser
48 :guix-package "emacs-geiser")
49
50(use-package geiser-racket
51 :guix-package "emacs-geiser-racket")
52
53(use-package racket-mode
54 :guix-package "emacs-racket-mode")
55
56(use-package geiser-guile
57 :guix-package "emacs-geiser-guile"
58 :config
59 (when jd/guix-p
60 (defun jd/guix-repl ()
61 (interactive)
62 (let ((geiser-guile-binary '("guix" "repl"))
63 (geiser-guile-load-path (cons "~/dotfiles/guix" geiser-guile-load-path)))
64 (geiser 'guile)))))
65
66(use-package pyvenv
67 :guix-package "emacs-pyvenv"
68 :after python-mode)
69
70(use-package typescript-mode
71 :guix-package "emacs-typescript-mode"
72 :mode ("\\.ts\\'")
73 :config
74 (setq typescript-indent-level 2))
75
76(use-package cider
77 :guix-package "emacs-cider")
78
79(use-package tide
80 :guix-package "emacs-tide"
81 :after (typescript-mode company web-mode))
82
83(use-package flycheck
84 :guix-package "emacs-flycheck"
85 :hook ((after-init . global-flycheck-mode)))
86
87(use-package web-mode
88 :guix-package "emacs-web-mode"
89 :mode
90 ("\\.ejs\\'" "\\.hbs\\'" "\\.html\\'" "\\.php\\'" "\\.[jt]sx?\\'")
91 :config
92 (setq web-mode-content-types-alist '(("jsx" . "\\.[jt]sx?\\'")))
93 (setq web-mode-markup-indent-offset 2)
94 (setq web-mode-css-indent-offset 2)
95 (setq web-mode-code-indent-offset 2)
96 (setq web-mode-script-padding 2)
97 (setq web-mode-block-padding 2)
98 (setq web-mode-style-padding 2)
99 (setq web-mode-enable-auto-pairing t)
100 (setq web-mode-enable-auto-closing t)
101 (setq web-mode-enable-current-element-highlight t))
102
103(use-package yaml-mode
104 :guix-package "emacs-yaml-mode")
105
106(use-package docker
107 :guix-package "emacs-docker"
108 :bind
109 ("C-c D d" . docker-containers)
110 ("C-c D D" . docker))
111
112(use-package company
113 :guix-package "emacs-company"
114 :diminish t
115 :after lsp-mode
116 :hook (lsp-mode . company-mode)
117 :bind (:map company-active-map
118 ("<tab>" . company-complete-selection))
119 (:map lsp-mode-map
120 ("<tab>" . company-indent-or-complete-common))
121 :custom
122 (company-minimum-prefix-length 1)
123 (company-idle-delay 0.0)
124 :config
125 (global-company-mode))
126
127(use-package projectile
128 :guix-package "emacs-projectile"
129 :diminish projectile-mode
130 :init
131 (when (file-directory-p "~/Documents/code")
132 (setq projectile-project-search-path '("~/Documents/code/")))
133 :custom ((projectile-Completion-system 'ivy))
134 :config
135 (setq projectile-switch-project-action #'projectile-dired)
136 (projectile-mode))
137
138(use-package magit
139 :guix-package "emacs-magit"
140 :custom
141 (magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1))
142
143(use-package restclient
144 :guix-package "emacs-restclient")
145
146(setq sql-connection-alist
147 '(("net47-abaks"
148 (sql-product 'postgres)
149 (sql-user "kuba")
150 (sql-database "net47")
151 (sql-server "net47.abaks.pl"))))
152
153(provide 'jd-dev)
154
155;;; jd-dev.el ends here