Compare commits
10 Commits
d73a875201
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f48fccc930 | ||
|
|
2e1b0e3ccf | ||
|
|
a35dfaac7c | ||
|
|
8a91c170cb | ||
|
|
87503dda8c | ||
|
|
cd75ab0701 | ||
|
|
e251c22634 | ||
|
|
4190c9cc54 | ||
|
|
0a070e0ffa | ||
|
|
e4210e9ea9 |
8
.gitignore
vendored
8
.gitignore
vendored
@@ -2,4 +2,10 @@ projectile-bookmarks.eld
|
|||||||
*.dat
|
*.dat
|
||||||
*~
|
*~
|
||||||
/elpa/
|
/elpa/
|
||||||
/themes/
|
/themes/
|
||||||
|
network-security.data
|
||||||
|
rust-playground
|
||||||
|
*.cache
|
||||||
|
session*
|
||||||
|
projects
|
||||||
|
|
||||||
|
|||||||
82
init.el
82
init.el
@@ -1,3 +1,6 @@
|
|||||||
|
;; Make MELPA work
|
||||||
|
(setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3")
|
||||||
|
|
||||||
(require 'package)
|
(require 'package)
|
||||||
(let* ((no-ssl (and (memq system-type '(windows-nt ms-dos))
|
(let* ((no-ssl (and (memq system-type '(windows-nt ms-dos))
|
||||||
(not (gnutls-available-p))))
|
(not (gnutls-available-p))))
|
||||||
@@ -22,77 +25,24 @@ There are two things you can do about this warning:
|
|||||||
;; Your init file should contain only one such instance.
|
;; Your init file should contain only one such instance.
|
||||||
;; If there is more than one, they won't work right.
|
;; If there is more than one, they won't work right.
|
||||||
'(custom-safe-themes
|
'(custom-safe-themes
|
||||||
(quote
|
'("0c83e0b50946e39e237769ad368a08f2cd1c854ccbcd1a01d39fdce4d6f86478" "ecfd522bd04e43c16e58bd8af7991bc9583b8e56286ea0959a428b3d7991bbd8" "eae831de756bb480240479794e85f1da0789c6f2f7746e5cc999370bbc8d9c8a" "6271fc9740379f8e2722f1510d481c1df1fcc43e48fa6641a5c19e954c21cc8f" "b3bcf1b12ef2a7606c7697d71b934ca0bdd495d52f901e73ce008c4c9825a3aa" "fc7fd2530b82a722ceb5b211f9e732d15ad41d5306c011253a0ba43aaf93dccc" "1d079355c721b517fdc9891f0fda927fe3f87288f2e6cc3b8566655a64ca5453" "68fb87a1805393d7a00ba5064d28b8277de5a75addf0d34094012408cfcf2eea" "23ba4b4ba4d1c989784475fed58919225db8d9a9751b32aa8df835134fe7ba6f" "043c8375cad0cf1d5c42f5d85cbed601075caf09594da04a74712510e9437d2b" "722e1cd0dad601ec6567c32520126e42a8031cd72e05d2221ff511b58545b108" "0c3b1358ea01895e56d1c0193f72559449462e5952bded28c81a8e09b53f103f" "d9850d120be9d94dd7ae69053630e89af8767c36b131a3aa7b06f14007a24656" "fee4e306d9070a55dce4d8e9d92d28bd9efe92625d2ba9d4d654fc9cd8113b7f" "93268bf5365f22c685550a3cbb8c687a1211e827edc76ce7be3c4bd764054bad" "f984e2f9765a69f7394527b44eaa28052ff3664a505f9ec9c60c088ca4e9fc0b" "350dc341799fbbb81e59d1e6fff2b2c8772d7000e352a5c070aa4317127eee94" "bf798e9e8ff00d4bf2512597f36e5a135ce48e477ce88a0764cfb5d8104e8163" "732b807b0543855541743429c9979ebfb363e27ec91e82f463c91e68c772f6e3" "a62f0662e6aa7b05d0b4493a8e245ab31492765561b08192df61c9d1c7e1ddee" "c9f102cf31165896631747fd20a0ca0b9c64ecae019ce5c2786713a5b7d6315e" "c9ddf33b383e74dac7690255dd2c3dfa1961a8e8a1d20e401c6572febef61045" "44961a9303c92926740fc4121829c32abca38ba3a91897a4eab2aa3b7634bed4" "9be1d34d961a40d94ef94d0d08a364c3d27201f3c98c9d38e36f10588469ea57" "50b64810ed1c36dfb72d74a61ae08e5869edc554102f20e078b21f84209c08d1" "2540689fd0bc5d74c4682764ff6c94057ba8061a98be5dd21116bf7bf301acfb" "36ca8f60565af20ef4f30783aa16a26d96c02df7b4e54e9900a5138fb33808da" "cdb4ffdecc682978da78700a461cdc77456c3a6df1c1803ae2dd55c59fa703e3" "d6c5b8dc6049f2e9dabdfcafa9ef2079352640e80dffe3e6cc07c0f89cbf9748" "a24c5b3c12d147da6cef80938dca1223b7c7f70f2f382b26308eba014dc4833a" "a7051d761a713aaf5b893c90eaba27463c791cd75d7257d3a8e66b0c8c346e77" default))
|
||||||
("722e1cd0dad601ec6567c32520126e42a8031cd72e05d2221ff511b58545b108" "0c3b1358ea01895e56d1c0193f72559449462e5952bded28c81a8e09b53f103f" "d9850d120be9d94dd7ae69053630e89af8767c36b131a3aa7b06f14007a24656" "fee4e306d9070a55dce4d8e9d92d28bd9efe92625d2ba9d4d654fc9cd8113b7f" "93268bf5365f22c685550a3cbb8c687a1211e827edc76ce7be3c4bd764054bad" "f984e2f9765a69f7394527b44eaa28052ff3664a505f9ec9c60c088ca4e9fc0b" "350dc341799fbbb81e59d1e6fff2b2c8772d7000e352a5c070aa4317127eee94" "bf798e9e8ff00d4bf2512597f36e5a135ce48e477ce88a0764cfb5d8104e8163" "732b807b0543855541743429c9979ebfb363e27ec91e82f463c91e68c772f6e3" "a62f0662e6aa7b05d0b4493a8e245ab31492765561b08192df61c9d1c7e1ddee" "c9f102cf31165896631747fd20a0ca0b9c64ecae019ce5c2786713a5b7d6315e" "c9ddf33b383e74dac7690255dd2c3dfa1961a8e8a1d20e401c6572febef61045" "44961a9303c92926740fc4121829c32abca38ba3a91897a4eab2aa3b7634bed4" "9be1d34d961a40d94ef94d0d08a364c3d27201f3c98c9d38e36f10588469ea57" "50b64810ed1c36dfb72d74a61ae08e5869edc554102f20e078b21f84209c08d1" "2540689fd0bc5d74c4682764ff6c94057ba8061a98be5dd21116bf7bf301acfb" "36ca8f60565af20ef4f30783aa16a26d96c02df7b4e54e9900a5138fb33808da" "cdb4ffdecc682978da78700a461cdc77456c3a6df1c1803ae2dd55c59fa703e3" "d6c5b8dc6049f2e9dabdfcafa9ef2079352640e80dffe3e6cc07c0f89cbf9748" "a24c5b3c12d147da6cef80938dca1223b7c7f70f2f382b26308eba014dc4833a" "a7051d761a713aaf5b893c90eaba27463c791cd75d7257d3a8e66b0c8c346e77" default)))
|
'(global-display-line-numbers-mode t)
|
||||||
|
'(inhibit-startup-screen t)
|
||||||
'(package-selected-packages
|
'(package-selected-packages
|
||||||
(quote
|
'(rustic toml-mode lsp-ui flycheck-gometalinter go-mode doom-themes lsp-mode hydra gitlab-ci-mode gitlab-ci-mode-flycheck web-mode impatient-mode exec-path-from-shell rust-playground all-the-icons neotree base16-theme afternoon-theme ample-theme nord-theme company-racer racer markdown-mode+ dumb-jump magit company flycheck-rust flycheck json-mode flymake-json tss tide material-theme zenburn-theme ac-js2 auto-complete projectile helm js2-mode cargo rust-mode iedit gitlab-ci-mode gitlab-ci-mode-flycheck dap-mode typescript-mode tree-sitter tree-sitter-langs))
|
||||||
(all-the-icons neotree base16-theme afternoon-theme ample-theme nord-theme company-racer racer markdown-mode+ vue-mode dumb-jump magit company flycheck-rust flycheck json-mode flymake-json tss tide material-theme zenburn-theme ac-js2 auto-complete projectile helm js2-mode cargo rust-mode))))
|
'(tool-bar-mode nil))
|
||||||
(custom-set-faces
|
(custom-set-faces
|
||||||
;; custom-set-faces was added by Custom.
|
;; custom-set-faces was added by Custom.
|
||||||
;; If you edit it by hand, you could mess it up, so be careful.
|
;; If you edit it by hand, you could mess it up, so be careful.
|
||||||
;; Your init file should contain only one such instance.
|
;; Your init file should contain only one such instance.
|
||||||
;; If there is more than one, they won't work right.
|
;; If there is more than one, they won't work right.
|
||||||
)
|
'(default ((t (:family "Menlo" :foundry "CTDB" :slant normal :weight normal :height 160 :width normal)))))
|
||||||
|
|
||||||
(require 'rust-mode)
|
(require 'use-package)
|
||||||
(add-to-list 'auto-mode-alist '("\\.rs\\'" . rust-mode))
|
|
||||||
(setq rust-format-on-save t)
|
|
||||||
(add-hook 'rust-mode-hook 'cargo-minor-mode)
|
|
||||||
(with-eval-after-load 'rust-mode
|
|
||||||
(add-hook 'flycheck-mode-hook #'flycheck-rust-setup))
|
|
||||||
(add-hook 'rust-mode-hook #'racer-mode)
|
|
||||||
(add-hook 'racer-mode-hook #'eldoc-mode)
|
|
||||||
(add-hook 'racer-mode-hook #'company-mode)
|
|
||||||
(define-key rust-mode-map (kbd "TAB") #'company-indent-or-complete-common)
|
|
||||||
(setq company-tooltip-align-annotations t)
|
|
||||||
|
|
||||||
(add-to-list 'auto-mode-alist '("\\.js\\'" . js2-mode))
|
(add-to-list 'load-path "~/.emacs.d/lib")
|
||||||
(require 'helm-config)
|
(require 'init-editor)
|
||||||
(projectile-mode +1)
|
(require 'init-web)
|
||||||
(define-key projectile-mode-map (kbd "s-p") 'projectile-command-map)
|
(require 'init-js-ts)
|
||||||
(define-key projectile-mode-map (kbd "C-c p") 'projectile-command-map)
|
(require 'init-rust)
|
||||||
(require 'auto-complete-config)
|
(require 'init-go)
|
||||||
(ac-config-default)
|
|
||||||
(add-hook 'js2-mode-hook 'ac-js2-mode)
|
|
||||||
(setq ac-js2-evaluate-calls t)
|
|
||||||
|
|
||||||
(require 'typescript-mode)
|
|
||||||
(add-to-list 'auto-mode-alist '("\\.ts\\'" . typescript-mode))
|
|
||||||
|
|
||||||
(defun setup-tide-mode ()
|
|
||||||
(interactive)
|
|
||||||
(tide-setup)
|
|
||||||
(flycheck-mode +1)
|
|
||||||
(setq flycheck-check-syntax-automatically '(save mode-enabled))
|
|
||||||
(eldoc-mode +1)
|
|
||||||
(tide-hl-identifier-mode +1)
|
|
||||||
;; company is an optional dependency. You have to
|
|
||||||
;; install it separately via package-install
|
|
||||||
;; `M-x package-install [ret] company`
|
|
||||||
(company-mode +1))
|
|
||||||
|
|
||||||
;; aligns annotation to the right hand side
|
|
||||||
(setq company-tooltip-align-annotations t)
|
|
||||||
|
|
||||||
;; formats the buffer before saving
|
|
||||||
(add-hook 'before-save-hook 'tide-format-before-save)
|
|
||||||
|
|
||||||
(add-hook 'typescript-mode-hook #'setup-tide-mode)
|
|
||||||
(add-hook 'json-mode #'flycheck-mode)
|
|
||||||
(dumb-jump-mode)
|
|
||||||
(global-display-line-numbers-mode)
|
|
||||||
(require 'vue-mode)
|
|
||||||
;; (add-to-list 'auto-mode-alist '("\\.vue\\'" . vue-mode))
|
|
||||||
|
|
||||||
(load-theme 'nord t)
|
|
||||||
;;(set-frame-parameter (selected-frame) 'alpha '(<active> . <inactive>))
|
|
||||||
;;(set-frame-parameter (selected-frame) 'alpha <both>)
|
|
||||||
;;(set-frame-parameter (selected-frame) 'alpha '(50 50))
|
|
||||||
;;(add-to-list 'default-frame-alist '(alpha . (50 50)))
|
|
||||||
(require 'neotree)
|
|
||||||
(global-set-key (kbd "C-c n") 'neotree-toggle)
|
|
||||||
|
|
||||||
(require 'all-the-icons)
|
|
||||||
|
|
||||||
(setq neo-theme (if (display-graphic-p) 'icons 'arrow))
|
|
||||||
(setq tab-width 4)
|
|
||||||
|
|||||||
44
lib/init-editor.el
Normal file
44
lib/init-editor.el
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
;; Editor initialization
|
||||||
|
|
||||||
|
(setq company-tooltip-align-annotations t)
|
||||||
|
;; (require 'helm-config)
|
||||||
|
(projectile-mode +1)
|
||||||
|
(define-key projectile-mode-map (kbd "s-p") 'projectile-command-map)
|
||||||
|
(define-key projectile-mode-map (kbd "C-c p") 'projectile-command-map)
|
||||||
|
(require 'auto-complete-config)
|
||||||
|
(ac-config-default)
|
||||||
|
(require 'neotree)
|
||||||
|
(global-set-key (kbd "C-c n") 'neotree-toggle)
|
||||||
|
|
||||||
|
(require 'all-the-icons)
|
||||||
|
|
||||||
|
(setq neo-theme (if (display-graphic-p) 'icons 'arrow))
|
||||||
|
(setq tab-width 4)
|
||||||
|
(setq js-indent-level 4)
|
||||||
|
(tool-bar-mode -1)
|
||||||
|
(electric-pair-mode +1)
|
||||||
|
(dumb-jump-mode)
|
||||||
|
(global-display-line-numbers-mode)
|
||||||
|
;; (load-theme 'misterioso t)
|
||||||
|
(load-theme 'doom-shades-of-purple t)
|
||||||
|
;; Born to be wild
|
||||||
|
(setq make-backup-files nil)
|
||||||
|
;; Load user path
|
||||||
|
(when (memq window-system '(mac ns x))
|
||||||
|
(exec-path-from-shell-initialize))
|
||||||
|
|
||||||
|
(set-frame-parameter (selected-frame) 'alpha '(97))
|
||||||
|
(add-to-list 'default-frame-alist '(alpha . (97)))
|
||||||
|
|
||||||
|
;; Show full path in window title
|
||||||
|
(setq frame-title-format
|
||||||
|
'(buffer-file-name "%b - %f" ; File buffer
|
||||||
|
(dired-directory dired-directory ; Dired buffer
|
||||||
|
(revert-buffer-function "%b" ; Buffer Menu
|
||||||
|
("%b - Dir: " default-directory))))) ; Plain buffer
|
||||||
|
|
||||||
|
(require 'iedit)
|
||||||
|
(require 'gitlab-ci-mode)
|
||||||
|
(require 'gitlab-ci-mode-flycheck)
|
||||||
|
|
||||||
|
(provide 'init-editor)
|
||||||
14
lib/init-go.el
Normal file
14
lib/init-go.el
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
(require 'go-mode)
|
||||||
|
(add-to-list 'auto-mode-alist '("\\.go\\'" . go-mode))
|
||||||
|
|
||||||
|
(require 'lsp-mode)
|
||||||
|
(add-hook 'go-mode-hook #'lsp-deferred)
|
||||||
|
|
||||||
|
;; Set up before-save hooks to format buffer and add/delete imports.
|
||||||
|
;; Make sure you don't have other gofmt/goimports hooks enabled.
|
||||||
|
(defun lsp-go-install-save-hooks ()
|
||||||
|
(add-hook 'before-save-hook #'lsp-format-buffer t t)
|
||||||
|
(add-hook 'before-save-hook #'lsp-organize-imports t t))
|
||||||
|
(add-hook 'go-mode-hook #'lsp-go-install-save-hooks)
|
||||||
|
|
||||||
|
(provide 'init-go)
|
||||||
46
lib/init-js-ts.el
Normal file
46
lib/init-js-ts.el
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
;; Javascript and Typescript init
|
||||||
|
(require 'json-mode)
|
||||||
|
(require 'js2-mode)
|
||||||
|
(add-to-list 'auto-mode-alist '("\\.js[x]\\'" . js2-mode))
|
||||||
|
|
||||||
|
(add-hook 'js2-mode-hook 'ac-js2-mode)
|
||||||
|
(setq ac-js2-evaluate-calls t)
|
||||||
|
|
||||||
|
(require 'typescript-mode)
|
||||||
|
(require 'tree-sitter)
|
||||||
|
(require 'tree-sitter-langs)
|
||||||
|
(add-to-list 'auto-mode-alist '("\\.ts[x]\\'" . typescript-mode))
|
||||||
|
|
||||||
|
;; Activate tree-sitter globally (minor mode registered on every buffer)
|
||||||
|
(global-tree-sitter-mode)
|
||||||
|
(add-hook 'tree-sitter-after-on-hook #'tree-sitter-hl-mode)
|
||||||
|
|
||||||
|
;; Emacs default and tango-dark themes
|
||||||
|
|
||||||
|
(defun setup-tide-mode ()
|
||||||
|
(interactive)
|
||||||
|
(tide-setup)
|
||||||
|
(flycheck-mode +1)
|
||||||
|
(setq flycheck-check-syntax-automatically '(save mode-enabled))
|
||||||
|
(eldoc-mode +1)
|
||||||
|
(tide-hl-identifier-mode +1)
|
||||||
|
;; company is an optional dependency. You have to
|
||||||
|
;; install it separately via package-install
|
||||||
|
;; `M-x package-install [ret] company`
|
||||||
|
(company-mode +1))
|
||||||
|
|
||||||
|
;; aligns annotation to the right hand side
|
||||||
|
(setq company-tooltip-align-annotations t)
|
||||||
|
|
||||||
|
;; formats the buffer before saving
|
||||||
|
(add-hook 'before-save-hook 'tide-format-before-save)
|
||||||
|
|
||||||
|
(add-hook 'typescript-mode-hook #'setup-tide-mode)
|
||||||
|
(add-hook 'js2-mode-hook #'setup-tide-mode)
|
||||||
|
;; configure javascript-tide checker to run after your default javascript checker
|
||||||
|
;; (flycheck-add-next-checker 'javascript-eslint 'javascript-tide 'append)
|
||||||
|
|
||||||
|
(add-hook 'json-mode #'flycheck-mode)
|
||||||
|
(add-to-list 'projectile-globally-ignored-files "*node_modules")
|
||||||
|
|
||||||
|
(provide 'init-js-ts)
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
; list the packages you want
|
; list the packages you want
|
||||||
(setq package-list
|
(setq package-list
|
||||||
'(all-the-icons neotree base16-theme afternoon-theme ample-theme nord-theme company-racer racer markdown-mode+ vue-mode dumb-jump magit company flycheck-rust flycheck json-mode flymake-json tss tide material-theme zenburn-theme ac-js2 auto-complete projectile helm js2-mode cargo rust-mode))
|
'(all-the-icons neotree base16-theme afternoon-theme ample-theme nord-theme company-racer racer markdown-mode+ vue-mode dumb-jump magit company flycheck-rust flycheck json-mode flymake-json tss tide material-theme zenburn-theme ac-js2 auto-complete projectile helm js2-mode cargo rust-mode rust-playground css-mode skewer-mode web-mode))
|
||||||
|
|
||||||
|
|
||||||
; activate all the packages
|
; activate all the packages
|
||||||
17
lib/init-rust
Normal file
17
lib/init-rust
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
;; Rust config
|
||||||
|
(require 'rust-mode)
|
||||||
|
(add-to-list 'auto-mode-alist '("\\.rs\\'" . rust-mode))
|
||||||
|
(setq rust-format-on-save t)
|
||||||
|
(add-hook 'rust-mode-hook 'cargo-minor-mode)
|
||||||
|
(with-eval-after-load 'rust-mode
|
||||||
|
(add-hook 'flycheck-mode-hook #'flycheck-rust-setup))
|
||||||
|
(add-hook 'rust-mode-hook #'racer-mode)
|
||||||
|
(add-hook 'racer-mode-hook #'eldoc-mode)
|
||||||
|
(add-hook 'racer-mode-hook #'company-mode)
|
||||||
|
(define-key rust-mode-map (kbd "TAB") #'company-indent-or-complete-common)
|
||||||
|
|
||||||
|
;; Rust playground https://github.com/grafov/rust-playground
|
||||||
|
;; M-x rust-playground -> Type -> Ctrl-RET -> See results -> M-x rust-playground-rm
|
||||||
|
(require rust-playground)
|
||||||
|
|
||||||
|
(provide 'rust-init)
|
||||||
76
lib/init-rust.el
Normal file
76
lib/init-rust.el
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
;; Rust config
|
||||||
|
(require 'rust-mode)
|
||||||
|
(add-to-list 'auto-mode-alist '("\\.rs\\'" . rust-mode))
|
||||||
|
(setq rust-format-on-save t)
|
||||||
|
|
||||||
|
(add-hook 'rust-mode-hook 'cargo-minor-mode)
|
||||||
|
|
||||||
|
;; (with-eval-after-load 'rust-mode
|
||||||
|
;; (add-hook 'flycheck-mode-hook #'flycheck-rust-setup))
|
||||||
|
;; (add-hook 'rust-mode-hook #'racer-mode)
|
||||||
|
;; (add-hook 'racer-mode-hook #'eldoc-mode)
|
||||||
|
;; (add-hook 'racer-mode-hook #'company-mode)
|
||||||
|
;; (define-key rust-mode-map (kbd "TAB") #'company-indent-or-complete-common)
|
||||||
|
|
||||||
|
;; -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|
||||||
|
;; rustic = basic rust-mode + additions
|
||||||
|
|
||||||
|
(use-package rustic
|
||||||
|
:ensure
|
||||||
|
:bind (:map rustic-mode-map
|
||||||
|
("M-j" . lsp-ui-imenu)
|
||||||
|
("M-?" . lsp-find-references)
|
||||||
|
("C-c C-c l" . flycheck-list-errors)
|
||||||
|
("C-c C-c a" . lsp-execute-code-action)
|
||||||
|
("C-c C-c r" . lsp-rename)
|
||||||
|
("C-c C-c q" . lsp-workspace-restart)
|
||||||
|
("C-c C-c Q" . lsp-workspace-shutdown)
|
||||||
|
("C-c C-c s" . lsp-rust-analyzer-status)
|
||||||
|
("C-c C-c e" . lsp-rust-analyzer-expand-macro)
|
||||||
|
("C-c C-c d" . dap-hydra)
|
||||||
|
("C-c C-c h" . lsp-ui-doc-glance))
|
||||||
|
:config
|
||||||
|
;; uncomment for less flashiness
|
||||||
|
;; (setq lsp-eldoc-hook nil)
|
||||||
|
;; (setq lsp-enable-symbol-highlighting nil)
|
||||||
|
;; (setq lsp-signature-auto-activate nil)
|
||||||
|
|
||||||
|
;; comment to disable rustfmt on save
|
||||||
|
(add-hook 'rustic-mode-hook 'rk/rustic-mode-hook))
|
||||||
|
|
||||||
|
(use-package lsp-mode
|
||||||
|
:ensure
|
||||||
|
:commands lsp
|
||||||
|
:custom
|
||||||
|
;; what to use when checking on-save. "check" is default, I prefer clippy
|
||||||
|
(lsp-rust-analyzer-cargo-watch-command "clippy")
|
||||||
|
(lsp-eldoc-render-all t)
|
||||||
|
(lsp-idle-delay 0.6)
|
||||||
|
;; enable / disable the hints as you prefer:
|
||||||
|
(lsp-rust-analyzer-server-display-inlay-hints t)
|
||||||
|
(lsp-rust-analyzer-display-lifetime-elision-hints-enable "skip_trivial")
|
||||||
|
(lsp-rust-analyzer-display-chaining-hints t)
|
||||||
|
(lsp-rust-analyzer-display-lifetime-elision-hints-use-parameter-names nil)
|
||||||
|
(lsp-rust-analyzer-display-closure-return-type-hints t)
|
||||||
|
(lsp-rust-analyzer-display-parameter-hints nil)
|
||||||
|
(lsp-rust-analyzer-display-reborrow-hints nil)
|
||||||
|
:config
|
||||||
|
(add-hook 'lsp-mode-hook 'lsp-ui-mode))
|
||||||
|
|
||||||
|
(use-package lsp-ui
|
||||||
|
:ensure
|
||||||
|
:commands lsp-ui-mode
|
||||||
|
:custom
|
||||||
|
(lsp-ui-peek-always-show t)
|
||||||
|
(lsp-ui-sideline-show-hover t)
|
||||||
|
(lsp-ui-doc-enable nil))
|
||||||
|
|
||||||
|
(use-package toml-mode :ensure)
|
||||||
|
|
||||||
|
(use-package flycheck :ensure)
|
||||||
|
|
||||||
|
;; Rust playground https://github.com/grafov/rust-playground
|
||||||
|
;; M-x rust-playground -> Type -> Ctrl-RET -> See results -> M-x rust-playground-rm
|
||||||
|
(require 'rust-playground)
|
||||||
|
|
||||||
|
(provide 'init-rust)
|
||||||
14
lib/init-web.el
Normal file
14
lib/init-web.el
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
;; Init Web configuration
|
||||||
|
(require 'css-mode)
|
||||||
|
|
||||||
|
(require 'skewer-mode)
|
||||||
|
(add-hook 'js2-mode-hook 'skewer-mode)
|
||||||
|
(add-hook 'css-mode-hook 'skewer-css-mode)
|
||||||
|
(add-hook 'html-mode-hook 'skewer-html-mode)
|
||||||
|
|
||||||
|
(require 'web-mode)
|
||||||
|
(add-to-list 'auto-mode-alist '("\\.twig'" . web-mode))
|
||||||
|
(add-to-list 'auto-mode-alist '("\\.html?\\'" . web-mode))
|
||||||
|
(setq sgml-quick-keys 'close)
|
||||||
|
|
||||||
|
(provide 'init-web)
|
||||||
@@ -1 +1,10 @@
|
|||||||
nil
|
((magit-commit
|
||||||
|
("--all")
|
||||||
|
nil)
|
||||||
|
(magit-dispatch nil)
|
||||||
|
(magit-pull nil)
|
||||||
|
(magit-push nil)
|
||||||
|
(magit-revert
|
||||||
|
("--edit"))
|
||||||
|
(magit-stash
|
||||||
|
("--all")))
|
||||||
|
|||||||
Reference in New Issue
Block a user