diff --git a/emacs/.config/emacs/.gitignore b/emacs/.config/emacs/.gitignore index fb20d77..c45bae1 100644 --- a/emacs/.config/emacs/.gitignore +++ b/emacs/.config/emacs/.gitignore @@ -49,4 +49,6 @@ flycheck_*.el # Cache etc .cache/ -projectile-bookmarks.eld \ No newline at end of file +projectile-bookmarks.eld +.lsp-session-v1 +*.dat diff --git a/emacs/.config/emacs/config.el b/emacs/.config/emacs/config.el index 823bfa7..d54261e 100644 --- a/emacs/.config/emacs/config.el +++ b/emacs/.config/emacs/config.el @@ -6,11 +6,14 @@ (load-theme 'doom-tomorrow-night t) ;; Font size -(set-face-attribute 'default nil :height 140) +(set-face-attribute 'default nil :height 140 :family "Fira Code") ;; Enable line numbers (global-display-line-numbers-mode 1) ;; Indentation -;; (setq indent-tabs-mode t -;; tab-width 8) +(setq + indent-tabs-mode t + tab-width 4 +) +(define-key evil-insert-state-map (kbd "TAB") 'tab-to-tab-stop) diff --git a/emacs/.config/emacs/init.el b/emacs/.config/emacs/init.el index 4406834..883de64 100644 --- a/emacs/.config/emacs/init.el +++ b/emacs/.config/emacs/init.el @@ -12,10 +12,11 @@ ;; Treemacs (with-eval-after-load 'treemacs (define-key treemacs-mode-map [mouse-1] #'treemacs-single-click-expand-action)) +(global-set-key (kbd "M-d") 'treemacs) ;; Alt + d to open treemacs ;; Startup stuff -(setq inhibit-startup-message nil +(setq inhibit-startup-message t visible-bell nil) ;; Don't the bell thing ;; Remove ugly bars @@ -38,7 +39,7 @@ '(custom-safe-themes '("7e377879cbd60c66b88e51fad480b3ab18d60847f31c435f15f5df18bdb18184" default)) '(package-selected-packages - '(go-mode rust-mode use-package treemacs-evil treemacs projectile doom-themes lsp-mode evil))) + '(evil-commentary format-all auto-complete editorconfig haskell-mode counsel ivy go-mode rust-mode use-package treemacs-evil treemacs projectile doom-themes lsp-mode evil))) (custom-set-faces ;; custom-set-faces was added by Custom. @@ -84,5 +85,39 @@ (setq read-process-output-max (* 1024 1024)) ;; 1MB (setq lsp-idle-delay 0.5)) +;; Ivy +(ivy-mode) +(setq ivy-use-virtual-buffers t) +(setq ivy-use-selectable-prompt t) +(setq enable-recursive-minibuffers t) +;; enable this if you want `swiper' to use it +;; (setq search-default-mode #'char-fold-to-regexp) +(global-set-key "\C-s" 'swiper) +(global-set-key (kbd "C-c C-r") 'ivy-resume) +(global-set-key (kbd "") 'ivy-resume) +(global-set-key (kbd "M-x") 'counsel-M-x) +(global-set-key (kbd "M-f") 'counsel-find-file) +(global-set-key (kbd " f") 'counsel-describe-function) +(global-set-key (kbd " v") 'counsel-describe-variable) +(global-set-key (kbd " o") 'counsel-describe-symbol) +(global-set-key (kbd " l") 'counsel-find-library) +(global-set-key (kbd " i") 'counsel-info-lookup-symbol) +(global-set-key (kbd " u") 'counsel-unicode-char) +(global-set-key (kbd "C-c g") 'counsel-git) +(global-set-key (kbd "C-c j") 'counsel-git-grep) +(global-set-key (kbd "C-c k") 'counsel-ag) +(global-set-key (kbd "C-x l") 'counsel-locate) +(global-set-key (kbd "C-S-o") 'counsel-rhythmbox) +(define-key minibuffer-local-map (kbd "C-r") 'counsel-minibuffer-history) + +;; Editorconfig +(editorconfig-mode 1) + +;; Autocomplete +(ac-config-default) + +;; Evil Commentary (comment thing) +(evil-commentary-mode) + ;; Loading config stuff (load "$HOME/.config/emacs/config.el")