blob: cb483f7db8abc5e985140bd448aa6a002a93f08b (
plain)
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
|
;;; init.el --- Emacs configuration -*- lexical-binding: t; -*-
;; Appearance
(menu-bar-mode -1)
(setq inhibit-startup-screen t)
(setq ring-bell-function 'ignore)
(setq-default display-line-numbers-type t)
(global-display-line-numbers-mode 1)
(column-number-mode 1)
(blink-cursor-mode -1)
;; Editing
(global-set-key (kbd "C-l") #'goto-line)
(setq-default indent-tabs-mode nil)
(setq make-backup-files nil)
(setq auto-save-default nil)
(global-set-key (kbd "C-x w") #'kill-region)
(electric-pair-mode 1)
;; Eshell
(setq eshell-prompt-function (lambda () "> ")
eshell-prompt-regexp "^> ")
;; Completion and file finding
(fido-vertical-mode 1)
;; Project navigation
(global-set-key (kbd "C-c p f") #'project-find-file)
;; Languages
(require 'treesit)
(setq major-mode-remap-alist
'((go-mode . go-ts-mode)
(rust-mode . rust-ts-mode)))
;; M-x treesit-install-language-grammar RET go RET
;; M-x treesit-install-language-grammar RET rust RET
;; go install golang.org/x/tools/gopls@latest
;; rustup component add rust-analyzer
(setq treesit-language-source-alist
'((go . ("https://github.com/tree-sitter/tree-sitter-go"
"v0.23.4"))
(rust . ("https://github.com/tree-sitter/tree-sitter-rust"
"v0.23.3"))))
(add-to-list 'auto-mode-alist '("\\.go\\'" . go-ts-mode))
(add-to-list 'auto-mode-alist '("\\.rs\\'" . rust-ts-mode))
(setq auto-mode-alist
(append '(("\\.pl\\'" . cperl-mode)
("\\.pm\\'" . cperl-mode))
auto-mode-alist))
(add-to-list 'interpreter-mode-alist '("perl" . cperl-mode))
;; packages: run M-x eval expression on each
;;
;; magit
;;
;; (package-vc-install
;; '(magit :url "https://github.com/magit/magit.git"
;; :lisp-dir "lisp"))
(global-set-key (kbd "C-x g") #'magit-status)
;; LSP support (available on demand)
;; M-x eglot
;;; init.el ends here
(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.
'(package-selected-packages '(magit)))
(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.
)
|