diff options
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/general.el | 30 | ||||
-rw-r--r-- | lisp/org-custom.el | 4 |
2 files changed, 31 insertions, 3 deletions
diff --git a/lisp/general.el b/lisp/general.el index c4a3d2f..871491c 100644 --- a/lisp/general.el +++ b/lisp/general.el @@ -12,6 +12,9 @@ kept-old-versions 2 version-control t) +;; Auto revert mode to reload disk +(global-auto-revert-mode 1) + ;; menu bars (menu-bar-mode -1) (toggle-scroll-bar -1) @@ -47,6 +50,14 @@ ;; Smart parentheses (smartparens-global-mode 1) +(with-eval-after-load 'smartparens + (sp-with-modes + '(c++-mode c-mode javascript-mode typescript-mode python-mode) + (sp-local-pair "{" nil :post-handlers '(:add ("||\n[i]" "RET"))))) + +;; Show number of matches +(setq isearch-lazy-highlight t) +(setq isearch-lazy-count t) ;; Minimap (require 'minimap) @@ -275,14 +286,27 @@ (use-package tree-sitter :ensure t - :defer t) + :defer t + :config + ;; use treesitter when possible + (global-tree-sitter-mode) + ;; overwrite the default syntax-highlighting (from major modes) + (add-hook 'tree-sitter-after-on-hook #'tree-sitter-hl-mode) + :hook + (prog-mode . tree-sitter-mode)) (use-package tree-sitter-langs :ensure t :defer t) -(global-tree-sitter-mode) -(add-hook 'tree-sitter-after-on-hook #'tree-sitter-hl-mode) +;; Highlight similar text +(use-package highlight-thing + :config + (setq highlight-thing-what-thing 'region) + (setq highlight-thing-what-thing 'word) + (setq highlight-thing-exclude-thing-under-point t) + (global-highlight-thing-mode) + (setq highlight-thing-delay-seconds 0.0)) ;; Vterm (require 'vterm) diff --git a/lisp/org-custom.el b/lisp/org-custom.el index f00924d..3a4c7e7 100644 --- a/lisp/org-custom.el +++ b/lisp/org-custom.el @@ -71,5 +71,9 @@ (add-hook 'org-mode-hook 'org-custom-hook) +(use-package org-modern + :config + (add-hook 'org-mode-hook #'org-modern-mode)) + (provide 'org-custom) ;;; org-custom.el ends here |