Remove evil submodule, now installed with use-package

This commit is contained in:
Vladan Popovic 2020-01-06 02:22:45 +01:00
parent b8cae6ffb4
commit 47565fe8b2
14 changed files with 109 additions and 96 deletions

1
.gitignore vendored
View File

@ -4,3 +4,4 @@ transient/
history
ac-comphist.dat
elpy/
.python*

3
.gitmodules vendored
View File

@ -1,3 +0,0 @@
[submodule "evil"]
path = evil
url = https://github.com/emacs-evil/evil.git

View File

@ -6,7 +6,7 @@
'(ffap-machine-p-known (quote reject))
'(package-selected-packages
(quote
(undo-tree ein-mumamo yasnippet use-package racer material-theme magit lsp-ui helm flycheck-rust elm-mode company-lsp cargo))))
(ein-mumamo use-package))))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.

1
evil

@ -1 +0,0 @@
Subproject commit c861d2f6be8207a8919675ce76db583df071b4d5

10
init.el
View File

@ -1,9 +1,13 @@
;; Configure emacs packages.
(setq should-install-packages t) ;; Define this before everything to speed up startup.
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
(package-initialize)
(when (not (package-installed-p 'use-package))
(package-refresh-contents)
(package-install 'use-package))
(require 'use-package)
(setq dotfiles-dir
(file-name-directory
(or (buffer-file-name) (file-chase-links load-file-name))))
@ -11,10 +15,8 @@
(add-to-list 'load-path (concat dotfiles-dir "modules"))
;; Emacs customization / global plugin configuration
(require 'jenga-company)
(require 'jenga-prelude)
(require 'jenga-emacs)
(require 'jenga-evil)
(require 'jenga-helm)
(require 'jenga-magit)
(require 'jenga-org)
(require 'jenga-ui)

View File

@ -1,15 +0,0 @@
;;;; Company configuration.
(use-package company
:ensure t
:defer t
:init (global-company-mode)
:config
(progn
(add-to-list 'completion-styles 'initials t)
(bind-key "M-<tab>" #'company-complete company-mode-map)
(setq company-tooltip-align-annotations t
tab-always-indent 'complete)
(setq company-dabbrev-downcase nil))
:diminish company-mode)
(provide 'jenga-company)

View File

@ -2,7 +2,8 @@
(savehist-mode 1)
;; Enable C-r in evil
(undo-tree-mode 1)
(use-package undo-tree
:ensure t)
;;;; TAGS configuration.
;; Goto tag with M-.

View File

@ -1,21 +0,0 @@
;;;; Evil mode configuration.
;;(unless (package-installed-p 'evil)
;; (package-refresh-contents)
;; (package-install 'evil))
(use-package evil
:ensure t
:init ;; tweak evil's configuration before loading it
(setq evil-search-module 'evil-search
evil-ex-complete-emacs-commands nil
evil-vsplit-window-right t
evil-split-window-below t
evil-shift-round nil
evil-want-C-u-scroll t)
:config ;; tweak evil after loading it
(evil-mode)
(setq evil-want-C-u-scroll t)
(eval-after-load "evil-maps"
;; Unset Evil's "M-." keymap so that TAGS definitions can be followed.
(define-key evil-normal-state-map "\M-." nil)))
(provide 'jenga-evil)

View File

@ -1,31 +0,0 @@
;;;; Heml mode configuration.
(use-package helm
:requires helm-config
:init
(helm-mode 1)
(helm-autoresize-mode 1)
:bind
("<tab>" . helm-execute-persistent-action) ; rebind tab to run persistent action
("C-i" . helm-execute-persistent-action) ; make TAB work in terminal
("C-z" . helm-select-action) ; list actions using C-z
:config
(setq helm-autoresize-max-height 0
helm-autoresize-min-height 20
helm-split-window-in-side-p t ; Open helm buffer inside current window, not occupy whole other window
helm-move-to-line-cycle-in-source t ; Move to end or beginning of source when reaching top or bottom of source.
helm-ff-search-library-in-sexp t ; Search for library in `require' and `declare-function' sexp.
helm-scroll-amount 8 ; Scroll 8 lines other window using M-<next>/M-<prior>
helm-ff-file-name-history-use-recentf t
helm-echo-input-in-header-line t))
;; The default "C-x c" is quite close to "C-x C-c", which quits Emacs.
;; Changed to "C-c h". Note: We must set "C-c h" globally, because we
;; cannot change `helm-command-prefix-key' once `helm-config' is loaded.
(global-set-key (kbd "C-c h") 'helm-command-prefix)
(global-unset-key (kbd "C-x c"))
(when (executable-find "firefox")
(setq helm-google-suggest-use-curl-p t))
(provide 'jenga-helm)

View File

@ -2,6 +2,10 @@
;; Enable Org mode.
(use-package org
:ensure t
:init (add-to-list 'auto-mode-alist '("\\.org$" . org-mode)))
:init (add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
:config
(setq org-todo-keywords
'((sequence "TODO(t)" "WAIT(w@/!)" "|" "DONE(d!)" "CANCELED(c@)"))))
(provide 'jenga-org)

61
modules/jenga-prelude.el Normal file
View File

@ -0,0 +1,61 @@
;;;; Company configuration.
(use-package company
:ensure t
:defer t
:init (global-company-mode)
:config
(progn
(add-to-list 'completion-styles 'initials t)
(bind-key "M-<tab>" #'company-complete company-mode-map)
(setq company-tooltip-align-annotations t
tab-always-indent 'complete)
(setq company-dabbrev-downcase nil))
:diminish company-mode)
;;;; Evil mode configuration.
(use-package evil
:ensure t
:init ;; tweak evil's configuration before loading it
(setq evil-search-module 'evil-search
evil-ex-complete-emacs-commands nil
evil-vsplit-window-right t
evil-split-window-below t
evil-shift-round nil
evil-want-C-u-scroll t)
:config ;; tweak evil after loading it
(evil-mode)
(setq evil-want-C-u-scroll t)
(eval-after-load "evil-maps"
;; Unset Evil's "M-." keymap so that TAGS definitions can be followed.
(define-key evil-normal-state-map "\M-." nil)))
(use-package undo-tree
:ensure t)
;;;; Heml mode configuration.
(use-package helm
:requires helm-config
:init
(helm-mode 1)
(helm-autoresize-mode 1)
:bind
("<tab>" . helm-execute-persistent-action) ; rebind tab to run persistent action
("C-i" . helm-execute-persistent-action) ; make TAB work in terminal
("C-z" . helm-select-action) ; list actions using C-z
:config
(setq helm-autoresize-max-height 0
helm-autoresize-min-height 20
helm-split-window-in-side-p t ; Open helm buffer inside current window, not occupy whole other window
helm-move-to-line-cycle-in-source t ; Move to end or beginning of source when reaching top or bottom of source.
helm-ff-search-library-in-sexp t ; Search for library in `require' and `declare-function' sexp.
helm-scroll-amount 8 ; Scroll 8 lines other window using M-<next>/M-<prior>
helm-ff-file-name-history-use-recentf t
helm-echo-input-in-header-line t)
(global-unset-key (kbd "C-x c"))
(when (executable-find "firefox")
(setq helm-google-suggest-use-curl-p t))
:bind
("C-c h" . helm-command-prefix))
(provide 'jenga-prelude)

View File

@ -25,6 +25,7 @@
(add-to-list 'python-shell-completion-native-disabled-interpreters
"jupyter")
:hook
(elpy-mode . (lambda () (highlight-indentation-mode -1)))
(elpy-mode . py-autopep8-enable-on-save)
(elpy-mode . flycheck-mode)
(elpy-mode . jedi:setup)

View File

@ -1,26 +1,38 @@
;;;; Rust mode configuration.
;; Add rust load hooks.
(use-package cargo)
(use-package flycheck-rust)
(use-package flycheck
:hook (prog-mode . flycheck-mode))
(use-package company
:hook (prog-mode . company-mode)
:config (setq company-tooltip-align-annotations t)
(setq company-minimum-prefix-length 1))
(use-package lsp-mode
:commands lsp
:config (require 'lsp-clients))
(use-package lsp-ui
:commands lsp-ui-mode
:bind (:map lsp-ui-mode-map
("M-." . lsp-ui-peek-find-definitions)
("M-," . lsp-ui-peek-jump-backward)
("M-?" . lsp-ui-peek-find-references)
("C-c u" . lsp-ui-imenu)
("C-c C-a" . lsp-ui-sideline-apply-code-actions))
:config (setq lsp-ui-peek-enable t))
(use-package rust-mode
:init (add-to-list 'auto-mode-alist '("\\.rs\\'" . rust-mode))
:bind
("M-." . racer-find-definition)
("M-h" . racer-describe)
("M-<tab>" . company-indent-or-complete-common)
:config
(setq rust-format-on-save t)
:hook
(after-init . global-flycheck-mode)
(rust-mode . racer-mode)
(rust-mode . cargo-minor-mode))
:config
(setq rust-format-on-save t)
:hook (rust-mode . lsp))
(use-package racer
:hook
(racer-mode . eldoc-mode)
(racer-mode . company-mode))
(add-hook 'flycheck-mode-hook #'flycheck-rust-setup)
;; Add keybindings for interacting with Cargo
(use-package cargo
:hook (rust-mode . cargo-minor-mode))
(use-package flycheck-rust
:config (add-hook 'flycheck-mode-hook #'flycheck-rust-setup))
(provide 'jenga-rust)

View File

@ -25,6 +25,8 @@
(add-hook 'text-mode-hook #'display-line-numbers-mode)
(add-hook 'prog-mode-hook #'display-line-numbers-mode)
(set-face-attribute 'default (selected-frame) :height 85)
(setq column-number-mode t)
(setq ido-use-filename-at-point nil)