summaryrefslogtreecommitdiff
path: root/.emacs.d
diff options
context:
space:
mode:
authorSteph Enders <steph@senders.io>2023-03-31 10:40:22 -0400
committerSteph Enders <steph@senders.io>2023-03-31 10:40:22 -0400
commitcd734d9a27b28ae2ba68ca5acf945c9bc1b94b1d (patch)
tree2bea0749e375968db2d8190287a131c597855312 /.emacs.d
parentfc310984a9d11bef8c843a041dc88be4b56e04f1 (diff)
Install lsp packages for IDE support
Now I have an IDE!!! Look at: https://emacs-lsp.github.io/lsp-mode/ for information and such - will contain the necessary out-links to anything else I'll need :)
Diffstat (limited to '.emacs.d')
-rw-r--r--.emacs.d/init.el15
-rw-r--r--.emacs.d/packages.el7
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"