-;;; package -- meain's emacs config
+;;; .emacs -- meain's emacs config
 
 ;;; Commentary:
-;;; Well, this is a vimmer's Emacs config.  Nothing fancy though.
-
-;; TODO:
-;; - yank highlight
-;; - figure out using terminal
-;; - flyspell auto correct last word
+;; Well, this is a vimmer's Emacs config.  Nothing fancy though.
 
 ;;; Code:
 

  :ensure t
  :init (load-theme 'modus-operandi t))

;; Persistant undo
(use-package undo-tree
  :ensure t
  :init (progn
	  (global-undo-tree-mode)
	  (setq undo-tree-auto-save-history t)
	  (setq undo-tree-history-directory-alist '(("." . "~/.emacs.d/undo")))))

;;; [evil packages] =================================================


	  (evil-leader/set-key "k" 'flycheck-previous-error)
	  (evil-leader/set-key "j" 'flycheck-next-error)))

;; LSP
(use-package eglot
  :ensure t
  :hook ((python-mode . eglot-ensure)
	 (rust-mode . eglot-ensure)))
;;(use-package lsp-mode
;;  :ensure t
;;  :hook ((python-mode . lsp-deferred)
;;	 (rust-mode . lsp-deferred)):commands
;;  (lsp lsp-deferred))
;;(use-package lsp-ui :ensure t
;;  :commands lsp-ui-mode)
;;(use-package lsp-ivy :ensure t
;;  :commands lsp-ivy-workspace-symbol)

;;; [Language pugins] ===============================================

;; Rust
(use-package rust-mode :ensure t)

;; Lua
(use-package lua-mode :ensure t)

;;; [Other plugins] ================================================

;; drag-stuff
(use-package drag-stuff
  :ensure t
  :diminish :init
  (progn
    (drag-stuff-mode t)
    (drag-stuff-global-mode 1))
  :config (progn
	    (define-key evil-visual-state-map (kbd "<up>") 'drag-stuff-up)
	    (define-key evil-visual-state-map (kbd "<down>") 'drag-stuff-down)
	    (define-key evil-visual-state-map (kbd "<left>") 'drag-stuff-left)
	    (define-key evil-visual-state-map (kbd "<right>") 'drag-stuff-right)))

;; Try
(use-package try :ensure t)
