summaryrefslogtreecommitdiff
path: root/lisp/general.el
diff options
context:
space:
mode:
authormattkae <mattkae@protonmail.com>2023-03-11 17:22:13 -0500
committermattkae <mattkae@protonmail.com>2023-03-11 17:22:13 -0500
commit38893cc42e33fc3ab5b80ef592b66226b9ba91cf (patch)
treed47b5588c892f9f16c3785afe856958d139c5e8d /lisp/general.el
parent8ed31715bf05c33918c6926c36f510d838521d6a (diff)
Using use-package everywhere, upgrade to org roam
Diffstat (limited to 'lisp/general.el')
-rw-r--r--lisp/general.el99
1 files changed, 56 insertions, 43 deletions
diff --git a/lisp/general.el b/lisp/general.el
index 4ab0349..52f276a 100644
--- a/lisp/general.el
+++ b/lisp/general.el
@@ -73,6 +73,7 @@
;; Highlight todos
(use-package hl-todo
+ :ensure t
:config
(global-hl-todo-mode 1)
)
@@ -82,8 +83,10 @@
;; I am using the helm package, of course
(use-package helm
- :ensure t)
-(helm-mode 1)
+ :ensure t
+ :config
+ (helm-mode 1)
+ )
(use-package helm-posframe
:ensure t
@@ -91,26 +94,35 @@
(helm-posframe-enable))
;; Projectile for project navigation
-(use-package projectile)
-(require 'projectile)
-(projectile-mode +1)
+(use-package projectile
+ :ensure t
+ :config
+ (projectile-mode +1)
+ (setq projectile-switch-project-action 'treemacs-add-and-display-current-project-exclusively)
+ (setq projectile-indexing-method 'native)
+ (setq projectile-enable-caching t)
+ (add-to-list 'projectile-globally-ignored-directories "node_modules")
+ (add-to-list 'projectile-globally-ignored-directories "elpa")
+ (add-to-list 'projectile-project-root-files "package.json")
+ )
+
(use-package helm-projectile
+ :ensure t
+ :bind
:config
(helm-projectile-on)
+ (define-key projectile-mode-map (kbd "s-F") 'helm-projectile-grep)
+ (define-key projectile-mode-map [?\s-o] 'helm-projectile-switch-project)
+ (define-key projectile-mode-map [?\s-p] 'helm-projectile-find-file)
+ :after (projectile helm)
)
-(define-key projectile-mode-map (kbd "s-F") 'helm-projectile-grep)
-(define-key projectile-mode-map [?\s-o] 'helm-projectile-switch-project)
-(define-key projectile-mode-map [?\s-p] 'helm-projectile-find-file)
-;(setq projectile-indexing-method 'alien)
-(setq projectile-indexing-method 'native)
-(setq projectile-enable-caching t)
-(add-to-list 'projectile-globally-ignored-directories "node_modules")
;; Don't ask to kill when we have an open line number
(setq-default confirm-kill-processes nil)
;; Highlight indentation lines
(use-package highlight-indent-guides
+ :ensure t
:config
(add-hook 'prog-mode-hook 'highlight-indent-guides-mode)
(setq highlight-indent-guides-method 'character)
@@ -128,8 +140,6 @@
:ensure t
:after (treemacs projectile))
-(setq projectile-switch-project-action 'treemacs-add-and-display-current-project-exclusively)
-
;; Line highlighting
(global-hl-line-mode 1)
(set-face-background 'hl-line "unspecified")
@@ -156,6 +166,7 @@
;; Emojis
(use-package emojify
+ :ensure t
:config
(when (member "Segoe UI Emoji" (font-family-list))
(set-fontset-font
@@ -252,15 +263,6 @@
(set-face-underline 'eglot-highlight-symbol-face t)
-
-;; (use-package eldoc-box
-;; :ensure t
-;; :defer t)
-
-;; (add-hook 'emacs-lisp-mode-hook #'eldoc-box-hover-mode t)
-;; (add-hook 'css-mode-hook #'eldoc-box-hover-mode t)
-;; (add-hook 'eglot-managed-mode-hook #'eldoc-box-hover-mode t)
-
(use-package tree-sitter
:ensure t
:defer t
@@ -278,6 +280,7 @@
;; Highlight similar text
(use-package highlight-thing
+ :ensure t
:config
(setq highlight-thing-what-thing 'region)
(setq highlight-thing-what-thing 'word)
@@ -286,23 +289,6 @@
(setq highlight-thing-delay-seconds 1.0))
;; Vterm
-(require 'vterm)
-(require 'vterm-toggle)
-(setq vterm-toggle-fullscreen-p nil)
-(add-to-list 'display-buffer-alist
- '((lambda (buffer-or-name _)
- (let ((buffer (get-buffer buffer-or-name)))
- (with-current-buffer buffer
- (or (equal major-mode 'vterm-mode)
- (string-prefix-p vterm-buffer-name (buffer-name buffer))))))
- (display-buffer-reuse-window display-buffer-at-bottom)
- ;;(display-buffer-reuse-window display-buffer-in-direction)
- ;;display-buffer-in-direction/direction/dedicated is added in emacs27
- ;;(direction . bottom)
- ;;(dedicated . t) ;dedicated is supported in emacs27
- (reusable-frames . visible)
- (window-height . 0.2)))
-(bind-key* (kbd "M-t") 'vterm-toggle)
(defun my-vterm-mode-set-colors()
"Set the colors of vterm to match my personal taste."
@@ -315,12 +301,38 @@
(face-remap-add-relative 'default '(:background "#232627"))
(face-remap-add-relative 'default '(:foreground"#fcfcfc"))
)
+
+(use-package vterm
+ :ensure t
+ )
(add-hook 'vterm-mode-hook 'my-vterm-mode-set-colors)
+(use-package vterm-toggle
+ :ensure t
+ :config
+ (setq vterm-toggle-fullscreen-p nil)
+ (add-to-list 'display-buffer-alist
+ '((lambda (buffer-or-name _)
+ (let ((buffer (get-buffer buffer-or-name)))
+ (with-current-buffer buffer
+ (or (equal major-mode 'vterm-mode)
+ (string-prefix-p vterm-buffer-name (buffer-name buffer))))))
+ (display-buffer-reuse-window display-buffer-at-bottom)
+ ;;(display-buffer-reuse-window display-buffer-in-direction)
+ ;;display-buffer-in-direction/direction/dedicated is added in emacs27
+ ;;(direction . bottom)
+ ;;(dedicated . t) ;dedicated is supported in emacs27
+ (reusable-frames . visible)
+ (window-height . 0.2)))
+ :after (vterm))
+(bind-key* (kbd "M-t") 'vterm-toggle)
+
;; Line movement
-(require 'drag-stuff)
-(drag-stuff-global-mode)
-(drag-stuff-define-keys)
+(use-package drag-stuff
+ :config
+ (drag-stuff-global-mode)
+ (drag-stuff-define-keys)
+ )
;; Copy the entire buffer.
(defun my-copy-all ()
@@ -329,6 +341,7 @@
(clipboard-kill-ring-save (point-min) (point-max)))
(use-package flycheck
+ :ensure t
:config
(setq flycheck-check-syntax-automatically '(save mode-enable))
'(flycheck-idle-change-delay 1))