diff options
-rw-r--r-- | .emacs.d/init.el | 15 | ||||
-rw-r--r-- | .emacs.d/packages.el | 7 |
2 files changed, 15 insertions, 7 deletions
diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 116ff79..5192c51 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -1,7 +1,7 @@ -;; load plugins +;; load any plugins / call boostrapping code (straight) (when (file-exists-p "~/.emacs.d/plugins.el") (load "~/.emacs.d/plugins.el")) - +;; install packages (when (file-exists-p "~/.emacs.d/packages.el") (load "~/.emacs.d/packages.el")) @@ -17,13 +17,16 @@ (setq inhibit-startup-screen t) ;; Mode hooks ;;; show line numbers -;;; (global-display-line-numbers) ; we can set this if we find we want it for all buffers (add-hook 'prog-mode-hook (lambda () (display-line-numbers-mode) - (visual-line-mode) - (visual-fill-column-mode))) + (visual-line-mode))) (add-hook 'text-mode-hook (lambda () (display-line-numbers-mode) (visual-line-mode) (visual-fill-column-mode))) +;; lsp-hooks +(add-hook 'c++-mode-hook (lambda () (lsp)(company-mode)(yas-minor-mode))) +(add-hook 'python-mode-hook (lambda () (lsp)(comapny-mode))) +(add-hook 'java-mode-hook (lambda () (lsp)(comapny-mode))) +(add-hook 'c-mode-hook (lambda () (lsp)(company-mode))) ;; Idiomdrottning and bad-emacs-defaults fixes (global-set-key [(control h)] 'delete-backward-char) @@ -54,4 +57,4 @@ (global-set-key "\C-cl" 'use-light-theme) (global-set-key "\C-cd" 'use-dark-theme) - +(setq lsp-keymap-prefix "C-s-l") diff --git a/.emacs.d/packages.el b/.emacs.d/packages.el index a625f5b..04b7eea 100644 --- a/.emacs.d/packages.el +++ b/.emacs.d/packages.el @@ -1,8 +1,13 @@ +;; file of desired packages +;; for easier evaluation and reading (straight-use-package 'org) (straight-use-package 'elpher) (straight-use-package 'visual-fill-column) (straight-use-package 'markdown-mode) - +(straight-use-package 'lsp-mode) +(straight-use-package 'company) +(straight-use-package 'flycheck) +(straight-use-package 'yasnippet) ;; custom recipes (straight-use-package '(moe-theme :host github :repo "kuanyui/moe-theme.el" |