-
Notifications
You must be signed in to change notification settings - Fork 0
/
.emacs
126 lines (93 loc) · 3.58 KB
/
.emacs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
;; Added by Package.el. This must come before configurations of
;; installed packages. Don't delete this line. If you don't want it,
;; just comment it out by adding a semicolon to the start of the line.
;; You may delete these explanatory comments.
(package-initialize)
(require 'package)
(require 'helm-config)
(global-set-key (kbd "M-x") #'helm-M-x)
(global-set-key (kbd "C-x r b") #'helm-filtered-bookmarks)
(global-set-key (kbd "C-x C-f") #'helm-find-files)
(helm-mode 1)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
(add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/"))
;; java lsp, segun la misma pag
(require 'lsp-java)
(add-hook 'java-mode-hook #'lsp)
(require 'cc-mode)
(condition-case nil
(require 'use-package)
(file-error
(require 'package)
(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/"))
(package-initialize)
(package-refresh-contents)
(package-install 'use-package)
(require 'use-package)))
(use-package projectile :ensure t)
(use-package yasnippet :ensure t)
(use-package lsp-mode :ensure t)
(use-package hydra :ensure t)
(use-package company-lsp :ensure t)
(use-package lsp-ui :ensure t)
(use-package lsp-java :ensure t :after lsp
:config (add-hook 'java-mode-hook 'lsp))
(use-package dap-mode
:ensure t :after lsp-mode
:config
(dap-mode t)
(dap-ui-mode t))
;;(use-package dap-java :after (lsp-java))
(define-key lsp-ui-mode-map [remap xref-find-definitions] #'lsp-ui-peek-find-definitions)
(define-key lsp-ui-mode-map [remap xref-find-references] #'lsp-ui-peek-find-references)
(use-package lsp-mode
:config
(add-hook 'python-mode-hook #'lsp))
(require 'dap-python)
(require 'dap-java)
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(custom-enabled-themes (quote (dichromacy)))
'(lsp-ui-peek-always-show t)
'(package-selected-packages
(quote
(dap-mode lsp-mode magit helm flycheck lsp-java impatient-mode simple-httpd web-mode auto-complete elpy ein iedit company emmet-mode)))
'(python-shell-interpreter "python3")
'(tool-bar-mode nil))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
;; windmove
(require 'windmove)
(windmove-default-keybindings)
;; matching parenthesis
(show-paren-mode 1)
;; parenthesis autocomplete
(electric-pair-mode 1)
(setq electric-pair-preserve-balance nil)
;; auto-complete-mode
(global-auto-complete-mode t)
;; emmet-mode: Auto-start on any markup modes, from the documentation
(require 'emmet-mode)
(emmet-mode 1)
(add-hook 'sgml-mode-hook 'emmet-mode) ;; Auto-start on any markup modes
;; iedit
(require 'iedit)
;; web-mode: http://web-mode.org/
(require 'web-mode)
(setq web-mode-enable-current-element-highlight t)
(add-to-list 'auto-mode-alist '("\\.html?\\'" . web-mode))
(setq web-mode-enable-auto-pairing t)
(setq web-mode-markup-indent-offset 2)
;; set colors
(set-face-attribute 'web-mode-html-tag-face nil :foreground "black")
(set-face-attribute 'web-mode-html-tag-bracket-face nil :foreground "red")
(set-face-attribute 'web-mode-current-element-highlight-face nil :background "pink")
(set-face-attribute 'web-mode-current-element-highlight-face nil :foreground "black")
(set-face-attribute 'web-mode-html-attr-value-face nil :foreground "medium blue")