|
|
@ -37,6 +37,15 @@ |
|
|
|
("\C-ca" . org-agenda) |
|
|
|
("\C-ca" . org-agenda) |
|
|
|
("\C-cb" . org-iswtichb))) |
|
|
|
("\C-cb" . org-iswtichb))) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;; LanguageServer |
|
|
|
|
|
|
|
(use-package lsp-mode |
|
|
|
|
|
|
|
:ensure t |
|
|
|
|
|
|
|
:hook ((python-mode . lsp) |
|
|
|
|
|
|
|
(rust-mode . lsp)) |
|
|
|
|
|
|
|
:commands lsp) |
|
|
|
|
|
|
|
(use-package lsp-ui |
|
|
|
|
|
|
|
:commands lsp-ui-mode |
|
|
|
|
|
|
|
:ensure t) |
|
|
|
|
|
|
|
|
|
|
|
;; Helm, for easy access to commands |
|
|
|
;; Helm, for easy access to commands |
|
|
|
; (use-package helm |
|
|
|
; (use-package helm |
|
|
@ -46,38 +55,9 @@ |
|
|
|
; (helm-mode)) |
|
|
|
; (helm-mode)) |
|
|
|
; ) |
|
|
|
; ) |
|
|
|
|
|
|
|
|
|
|
|
;; Evil |
|
|
|
|
|
|
|
; (use-package evil |
|
|
|
|
|
|
|
; :ensure t |
|
|
|
|
|
|
|
; :after (helm) |
|
|
|
|
|
|
|
; :config (progn |
|
|
|
|
|
|
|
; (evil-mode 1) |
|
|
|
|
|
|
|
; (define-key evil-normal-state-map (kbd "C-w <up>") 'evil-window-up) |
|
|
|
|
|
|
|
; (define-key evil-normal-state-map (kbd "C-w <down>") 'evil-window-down) |
|
|
|
|
|
|
|
; (define-key evil-normal-state-map (kbd "C-w <left>") 'evil-window-left) |
|
|
|
|
|
|
|
; (define-key evil-normal-state-map (kbd "C-w <right>") 'evil-window-right) |
|
|
|
|
|
|
|
; (define-key evil-normal-state-map (kbd "-") 'helm-find-files) |
|
|
|
|
|
|
|
; ) |
|
|
|
|
|
|
|
; ; Evil-leader so we can use the leader key |
|
|
|
|
|
|
|
; (use-package evil-leader |
|
|
|
|
|
|
|
; :ensure t |
|
|
|
|
|
|
|
; :config (progn (global-evil-leader-mode) |
|
|
|
|
|
|
|
; (evil-leader/set-leader "<SPC>") |
|
|
|
|
|
|
|
; (evil-leader/set-key |
|
|
|
|
|
|
|
; "q" 'kill-buffer-and-window |
|
|
|
|
|
|
|
; "w" 'save-buffer |
|
|
|
|
|
|
|
; "o" 'helm-find-files |
|
|
|
|
|
|
|
; "a" 'org-agenda))) |
|
|
|
|
|
|
|
; ; Commentary to comment out code |
|
|
|
|
|
|
|
; (use-package evil-commentary |
|
|
|
|
|
|
|
; :ensure t |
|
|
|
|
|
|
|
; :bind (:map evil-normal-state-map ("gc" . evil-commentary)) |
|
|
|
|
|
|
|
; ) |
|
|
|
|
|
|
|
; ) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;; Markdown mode |
|
|
|
;; Markdown mode |
|
|
|
; (use-package markdown-mode |
|
|
|
(use-package markdown-mode |
|
|
|
; :ensure t) |
|
|
|
:ensure t) |
|
|
|
|
|
|
|
|
|
|
|
;; install goto last change (opens the file in the last position) |
|
|
|
;; install goto last change (opens the file in the last position) |
|
|
|
; (use-package goto-last-change |
|
|
|
; (use-package goto-last-change |
|
|
@ -87,10 +67,10 @@ |
|
|
|
; (use-package fill-column-indicator |
|
|
|
; (use-package fill-column-indicator |
|
|
|
; :ensure t) |
|
|
|
; :ensure t) |
|
|
|
|
|
|
|
|
|
|
|
;; install powerline |
|
|
|
;; powerline |
|
|
|
(use-package powerline |
|
|
|
(use-package powerline |
|
|
|
:ensure t |
|
|
|
:ensure t |
|
|
|
:config (powerline-center-theme)) |
|
|
|
:config (powerline-center-theme)) |
|
|
|
|
|
|
|
|
|
|
|
;; colorschemes |
|
|
|
;; colorschemes |
|
|
|
(use-package doom-themes |
|
|
|
(use-package doom-themes |
|
|
@ -99,27 +79,10 @@ |
|
|
|
doom-themes-enable-italic t) |
|
|
|
doom-themes-enable-italic t) |
|
|
|
(load-theme 'doom-molokai t) |
|
|
|
(load-theme 'doom-molokai t) |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
(menu-bar-mode 0) |
|
|
|
|
|
|
|
(tool-bar-mode 0) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(show-paren-mode 1) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(require 'whitespace) |
|
|
|
|
|
|
|
(setq whitespace-style '(face empty tabs lines-tail trailing)) |
|
|
|
|
|
|
|
(global-whitespace-mode t) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; (setq-default fill-column 80) |
|
|
|
; (setq-default fill-column 80) |
|
|
|
; (define-globalized-minor-mode global-fci-mode fci-mode (lambda () (fci-mode 1))) |
|
|
|
; (define-globalized-minor-mode global-fci-mode fci-mode (lambda () (fci-mode 1))) |
|
|
|
; (global-fci-mode 1) |
|
|
|
; (global-fci-mode 1) |
|
|
|
|
|
|
|
|
|
|
|
;; line numbers |
|
|
|
|
|
|
|
(global-linum-mode 1) |
|
|
|
|
|
|
|
(defun configure-linum-colors () |
|
|
|
|
|
|
|
(set-face-foreground 'linum "#555555")) |
|
|
|
|
|
|
|
(configure-linum-colors) |
|
|
|
|
|
|
|
(setq linum-format " %4d ") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;; highlights the current line |
|
|
|
;; highlights the current line |
|
|
|
(use-package hlinum |
|
|
|
(use-package hlinum |
|
|
|
:ensure t) |
|
|
|
:ensure t) |
|
|
@ -127,17 +90,10 @@ |
|
|
|
(set-face-background 'linum-highlight-face nil) |
|
|
|
(set-face-background 'linum-highlight-face nil) |
|
|
|
(hlinum-activate) |
|
|
|
(hlinum-activate) |
|
|
|
|
|
|
|
|
|
|
|
;; display line and column in the statusbar |
|
|
|
|
|
|
|
(line-number-mode 1) |
|
|
|
|
|
|
|
(column-number-mode 1) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;; don't show startup messages |
|
|
|
;; don't show startup messages |
|
|
|
(setq inhibit-startup-message t) |
|
|
|
(setq inhibit-startup-message t) |
|
|
|
(setq initial-scratch-message nil) |
|
|
|
(setq initial-scratch-message nil) |
|
|
|
|
|
|
|
|
|
|
|
;; auto-pairs |
|
|
|
|
|
|
|
(electric-pair-mode 1) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;; git gutters |
|
|
|
;; git gutters |
|
|
|
(use-package diff-hl |
|
|
|
(use-package diff-hl |
|
|
|
:ensure t |
|
|
|
:ensure t |
|
|
@ -151,8 +107,38 @@ |
|
|
|
:ensure t |
|
|
|
:ensure t |
|
|
|
:config (editorconfig-mode 1)) |
|
|
|
:config (editorconfig-mode 1)) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(require 'whitespace) |
|
|
|
|
|
|
|
(setq whitespace-style '(face empty tabs lines-tail trailing)) |
|
|
|
|
|
|
|
(global-whitespace-mode t) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;; auto-pairs |
|
|
|
|
|
|
|
(electric-pair-mode 1) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;; disable the menubar and tabbar |
|
|
|
|
|
|
|
(menu-bar-mode 0) |
|
|
|
|
|
|
|
(tool-bar-mode 0) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;; highlight matching paren |
|
|
|
|
|
|
|
(show-paren-mode 1) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;; display line and column in the statusbar |
|
|
|
|
|
|
|
(line-number-mode 1) |
|
|
|
|
|
|
|
(column-number-mode 1) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;; line numbers |
|
|
|
|
|
|
|
(global-linum-mode 1) |
|
|
|
|
|
|
|
(defun configure-linum-colors () |
|
|
|
|
|
|
|
(set-face-foreground 'linum "#555555")) |
|
|
|
|
|
|
|
(configure-linum-colors) |
|
|
|
|
|
|
|
;; redefine the format; otherwise, the number will get "glued" to the code. |
|
|
|
|
|
|
|
(setq linum-format " %5d ") |
|
|
|
|
|
|
|
|
|
|
|
;; answer questions with 'y' instead of full 'yes' |
|
|
|
;; answer questions with 'y' instead of full 'yes' |
|
|
|
(defalias 'yes-or-no-p 'y-or-n-p) |
|
|
|
(defalias 'yes-or-no-p 'y-or-n-p) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;; Create backup files directly in the .Trash directory |
|
|
|
|
|
|
|
(setq backup-directory-alist '((".*" . "~/.Trash"))) |
|
|
|
|
|
|
|
|
|
|
|
(custom-set-variables |
|
|
|
(custom-set-variables |
|
|
|
;; custom-set-variables was added by Custom. |
|
|
|
;; custom-set-variables 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. |
|
|
|