Skip to content

Commit 24091cf

Browse files
committed
Emacs config
(cherry picked from commit d934cec) (cherry picked from commit c64235e)
1 parent 4466a68 commit 24091cf

1 file changed

Lines changed: 121 additions & 0 deletions

File tree

home/.config/emacs/init.el

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
(menu-bar-mode -1)
2+
(tool-bar-mode -1)
3+
(scroll-bar-mode -1)
4+
(blink-cursor-mode -1)
5+
; (line-number-mode t) ; ?
6+
; (column-number-mode t) ; ?
7+
(global-display-line-numbers-mode 1)
8+
; (global-linum-mode t)
9+
(global-visual-line-mode t) ; ?
10+
(prefer-coding-system 'utf-8)
11+
(set-default-coding-systems 'utf-8)
12+
(set-terminal-coding-system 'utf-8)
13+
(set-keyboard-coding-system 'utf-8)
14+
(set-frame-font "Hack Nerd Font-13")
15+
(setq-default line-spacing 0.2)
16+
17+
(setq user-full-name "Andrii Gladkyi" user-mail-address "arg@arg.zone")
18+
(setq load-prefer-newer t)
19+
(setq gc-cons-threshold 50000000)
20+
(setq backup-directory-alist
21+
`(("." . ,(expand-file-name
22+
(concat user-emacs-directory "backups")))))
23+
(setq ring-bell-function 'ignore)
24+
(setq require-final-newline t)
25+
(setq inhibit-startup-screen t)
26+
(setq inhibit-startup-message t)
27+
(setq initial-scratch-message "")
28+
(setq inhibit-startup-echo-area-message t)
29+
(setq frame-title-format
30+
'((:eval (if (buffer-file-name)
31+
(abbreviate-file-name (buffer-file-name))
32+
"%b"))))
33+
(setq linum-format "%4d ")
34+
; after copy Ctrl+c in Linux X11, you can paste by `yank' in emacs
35+
; (setq x-select-enable-clipboard t)
36+
37+
; after mouse selection in X11, you can paste by `yank' in emacs
38+
; (setq x-select-enable-primary t)
39+
40+
(require 'package)
41+
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
42+
43+
(unless (package-installed-p 'use-package)
44+
(package-refresh-contents)
45+
(package-install 'use-package))
46+
47+
(require 'use-package)
48+
(setq use-package-always-ensure t)
49+
50+
(use-package gruvbox-theme
51+
:config
52+
(load-theme 'gruvbox-dark-medium t))
53+
54+
(use-package git-gutter
55+
:config
56+
(global-git-gutter-mode t))
57+
58+
(use-package evil
59+
:init
60+
(setq evil-want-keybinding nil)
61+
; (setq evil-vsplit-window-right t)
62+
; (setq evil-split-window-below t)
63+
:config
64+
(evil-mode 1))
65+
(use-package evil-collection
66+
:after evil
67+
:init
68+
; (setq evil-collection-mode-list '(dashboard dired ibuffer))
69+
:config
70+
(evil-collection-init))
71+
72+
(use-package general
73+
:after evil
74+
:config
75+
(general-evil-setup t))
76+
77+
(use-package all-the-icons)
78+
79+
(use-package tree-sitter
80+
:config
81+
(global-tree-sitter-mode))
82+
83+
(use-package tree-sitter-langs
84+
:after tree-sitter
85+
:config
86+
(add-hook 'tree-sitter-after-on-hook #'tree-sitter-hl-mode))
87+
88+
(use-package centaur-tabs
89+
:demand
90+
:init
91+
(setq centaur-tabs-style "box")
92+
(setq centaur-tabs-height 48)
93+
(setq centaur-tabs-set-close-button nil)
94+
(setq centaur-tabs-cycle-scope 'tabs)
95+
(setq centaur-tabs-label-fixed-length 20)
96+
:config
97+
(centaur-tabs-mode t)
98+
(centaur-tabs-headline-match)
99+
:bind
100+
("C-<prior>" . centaur-tabs-backward)
101+
("C-<next>" . centaur-tabs-forward))
102+
103+
(use-package powerline
104+
:config
105+
(powerline-default-theme))
106+
107+
(add-hook 'evil-insert-state-exit-hook (lambda () (call-interactively #'save-buffer)))
108+
109+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
110+
(custom-set-variables
111+
;; custom-set-variables was added by Custom.
112+
;; If you edit it by hand, you could mess it up, so be careful.
113+
;; Your init file should contain only one such instance.
114+
;; If there is more than one, they won't work right.
115+
'(package-selected-packages '(general use-package gruvbox-theme evil-collection)))
116+
(custom-set-faces
117+
;; custom-set-faces was added by Custom.
118+
;; If you edit it by hand, you could mess it up, so be careful.
119+
;; Your init file should contain only one such instance.
120+
;; If there is more than one, they won't work right.
121+
)

0 commit comments

Comments
 (0)