Browse Source

Emacs: Ivy and Cargo modes

master
Julio Biason 4 years ago
parent
commit
a697373a33
  1. 84
      emacs.d/init.el

84
emacs.d/init.el

@ -22,65 +22,85 @@
;; update packages
(use-package auto-package-update
:config (setq auto-package-update-delete-old-versions t)
(setq auto-package-update-hide-results t)
(auto-package-update-maybe))
:config (setq auto-package-update-delete-old-versions t)
(setq auto-package-update-hide-results t)
(auto-package-update-maybe))
;; rust mode
(use-package rust-mode
:ensure t)
:ensure t
:config (setq rust-format-on-save t))
;; cargo
(use-package cargo
:ensure t
:config (add-hook 'rust-mode-hook 'cargo-minor-mode))
;; Notes
(use-package org
:ensure t
:bind (("\C-cl" . org-store-link)
("\C-ca" . org-agenda)
("\C-cb" . org-iswtichb)))
:ensure t
:bind (("\C-cl" . org-store-link)
("\C-ca" . org-agenda)
("\C-cb" . org-iswtichb)))
;; LanguageServer
(use-package lsp-mode
:ensure t
:hook ((python-mode . lsp)
(rust-mode . lsp))
:commands lsp
:config (setq lsp-enable-indentation t
lsp-enable-on-type-formatting t))
:ensure t
:hook ((python-mode . lsp)
(rust-mode . lsp))
:commands lsp
:config (setq lsp-enable-indentation t
lsp-enable-on-type-formatting t))
(use-package lsp-ui
:commands lsp-ui-mode
:ensure t
:config (setq lsp-ui-sideline-show-diagnostics t))
:commands lsp-ui-mode
:ensure t
:config (setq lsp-ui-sideline-show-diagnostics t))
;; Markdown mode
(use-package markdown-mode
:ensure t)
:ensure t)
;; install goto last change (opens the file in the last position)
; (use-package goto-last-change
; :ensure t)
;; install fill-column-indicador: right side gutter
; (use-package fill-column-indicator
; :ensure t)
(use-package fill-column-indicator
:ensure t)
;; better completion
(use-package counsel
:ensure t
:config
(global-set-key "\C-s" 'swiper)
(global-set-key (kbd "C-c C-r") 'ivy-resume)
(global-set-key (kbd "M-x") 'counsel-M-x) ;
(global-set-key (kbd "C-x C-f") 'counsel-find-file)
(global-set-key (kbd "C-c g") 'counsel-git)
(global-set-key (kbd "C-c j") 'counsel-git-grep)
(global-set-key (kbd "C-x l") 'counsel-locate)
(define-key minibuffer-local-map (kbd "C-r") 'counsel-minibuffer-history)
)
;; powerline
(use-package powerline
:ensure t
:config (powerline-center-theme))
:ensure t
:config (powerline-center-theme))
;; colorschemes
(use-package doom-themes
:ensure t
:config (setq doom-themes-enable-bold t
doom-themes-enable-italic t)
(load-theme 'doom-molokai t)
)
:ensure t
:config (setq doom-themes-enable-bold t
doom-themes-enable-italic t)
(load-theme 'doom-molokai t))
; (setq-default fill-column 80)
; (define-globalized-minor-mode global-fci-mode fci-mode (lambda () (fci-mode 1)))
; (global-fci-mode 1)
;; highlights the current line
(use-package hlinum
:ensure t)
:ensure t)
(set-face-foreground 'linum-highlight-face "white")
(set-face-background 'linum-highlight-face nil)
(hlinum-activate)
@ -91,16 +111,16 @@
;; git gutters
(use-package diff-hl
:ensure t
:init (setq diff-hl-side 'right))
:ensure t
:init (setq diff-hl-side 'right))
(global-diff-hl-mode 1)
(diff-hl-margin-mode 1)
(diff-hl-flydiff-mode 1)
;; install editorconfig
(use-package editorconfig
:ensure t
:config (editorconfig-mode 1))
:ensure t
:config (editorconfig-mode 1))
(require 'whitespace)
(setq whitespace-style '(face empty tabs lines-tail trailing))

Loading…
Cancel
Save