summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormattkae <mattkae@protonmail.com>2023-01-15 10:58:59 -0500
committermattkae <mattkae@protonmail.com>2023-01-15 10:58:59 -0500
commit46a02dead281282fc36192e073cf8e95d66c427a (patch)
tree7c7ac72f05d295ff8c0720d4278ddb95eed504af
parent048930df7fee2679ea61112b192100891ad8965f (diff)
Using treemacs instead of neotree
-rw-r--r--.gitignore3
-rw-r--r--init.el4
-rw-r--r--lisp/general.el53
-rw-r--r--lisp/text.el12
4 files changed, 32 insertions, 40 deletions
diff --git a/.gitignore b/.gitignore
index 9d08d14..d24fc3d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,4 +12,5 @@ ido.last
transient
recentf
url
-tutorial \ No newline at end of file
+tutorial
+.cache \ No newline at end of file
diff --git a/init.el b/init.el
index 6d36d2e..81b2169 100644
--- a/init.el
+++ b/init.el
@@ -12,7 +12,7 @@
(package-initialize)
(setq package-list
- '(highlight-indent-guides helm helm-projectile js-doc eslint-fix go-mode highlight-thing tree-sitter-langs tree-sitter eldoc-box company-quickhelp hl-todo python-mode drag-stuff org-bullets git-gutter-fringe git-gutter vterm-toggle vterm minimap neotree good-scroll counsel smartparens xref-js2 eglot json-mode markdown-mode emojify tern rtags cmake-ide cmake-mode tide auctex evil js2-highlight-vars ac-js2 js2-refactor js2-mode all-the-icons req-package projectile org))
+ '(highlight-indent-guides helm helm-projectile js-doc eslint-fix go-mode highlight-thing tree-sitter-langs tree-sitter eldoc-box company-quickhelp hl-todo python-mode drag-stuff org-bullets git-gutter-fringe git-gutter vterm-toggle vterm minimap good-scroll counsel smartparens xref-js2 eglot json-mode markdown-mode emojify tern rtags cmake-ide cmake-mode tide auctex evil js2-highlight-vars ac-js2 js2-refactor js2-mode all-the-icons req-package projectile org))
;; Fetch the list of packages available
(unless package-archive-contents
@@ -69,7 +69,7 @@
'(org-agenda-files (list org-directory))
'(org-directory "~/Documents/org")
'(package-selected-packages
- '(highlight-indent-guides helm js-doc eslint-fix eslintd-fix go-mode css-eldoc dashboard highlight-thing tree-sitter-langs tree-sitter eldoc-box company-quickhelp hl-todo python-mode drag-stuff org-bullets git-gutter-fringe git-gutter vterm-toggle vterm minimap neotree good-scroll counsel ## smartparens xref-js2 eglot json-mode markdown-mode emojify tern rtags cmake-ide cmake-mode tide auctex evil js2-highlight-vars ac-js2 js2-refactor js2-mode flycheck-irony company-irony all-the-icons req-package projectile irony org)))
+ '(treemacs-projectile treemacs highlight-indent-guides helm js-doc eslint-fix eslintd-fix go-mode css-eldoc dashboard highlight-thing tree-sitter-langs tree-sitter eldoc-box company-quickhelp hl-todo python-mode drag-stuff org-bullets git-gutter-fringe git-gutter vterm-toggle vterm minimap good-scroll counsel ## smartparens xref-js2 eglot json-mode markdown-mode emojify tern rtags cmake-ide cmake-mode tide auctex evil js2-highlight-vars ac-js2 js2-refactor js2-mode flycheck-irony company-irony all-the-icons req-package projectile irony org)))
;;; init.el ends here
(custom-set-faces
diff --git a/lisp/general.el b/lisp/general.el
index 7092228..318b407 100644
--- a/lisp/general.el
+++ b/lisp/general.el
@@ -110,26 +110,18 @@
)
;; Tree
-(require 'neotree)
-(setq neo-smart-open t)
-(setq projectile-switch-project-action 'neotree-projectile-action)
-(setq neo-theme (if (display-graphic-p) 'icons 'arrow))
-;; (evil-define-key 'normal neotree-mode-map (kbd "TAB") 'neotree-enter)
-;; (evil-define-key 'normal neotree-mode-map (kbd "SPC") 'neotree-quick-look)
-;; (evil-define-key 'normal neotree-mode-map (kbd "q") 'neotree-hide)
-;; (evil-define-key 'normal neotree-mode-map (kbd "RET") 'neotree-enter)
-;; (evil-define-key 'normal neotree-mode-map (kbd "g") 'neotree-refresh)
-;; (evil-define-key 'normal neotree-mode-map (kbd "n") 'neotree-next-line)
-;; (evil-define-key 'normal neotree-mode-map (kbd "p") 'neotree-previous-line)
-;; (evil-define-key 'normal neotree-mode-map (kbd "A") 'neotree-stretch-toggle)
-;; (evil-define-key 'normal neotree-mode-map (kbd "H") 'neotree-hidden-file-toggle)
-(defun my-neotree-mode-hook()
- "Set the colors of neotree to match my personal taste."
- (setq left-fringe-width 0)
- (setq right-fringe-width 0)
+(use-package treemacs
+ :ensure t
+ :config
+ (add-hook 'treemacs-mode-hook treemacs-filewatch-mode)
+ (add-hook 'treemacs-mode-hook treemacs-git-mode)
)
-(add-hook 'neotree-mode-hook 'my-neotree-mode-hook)
-(setq neo-window-width 36)
+
+(use-package treemacs-projectile
+ :ensure t
+ :after (treemacs projectile))
+
+(setq projectile-switch-project-action 'treemacs-add-and-display-current-project-exclusively)
;; Line highlighting
(global-hl-line-mode 1)
@@ -174,16 +166,13 @@
(bind-key* (kbd "M-.") 'xref-find-definitions)
(bind-key* (kbd "C-x k") 'kill-this-buffer)
(bind-key* (kbd "C-x b") 'electric-buffer-list)
-(bind-key* (kbd "C-;") 'neotree-toggle)
+(bind-key* (kbd "C-;") 'treemacs)
(defun my-create-file (filename)
"Create a file and refresh neotree. FILENAME File to create."
(interactive (list (read-file-name "Enter your file name: " nil nil nil (file-name-nondirectory ""))))
(make-empty-file filename)
- (find-file filename)
- (neotree-show)
- (neotree-refresh)
- (other-window -1))
+ (find-file filename))
(bind-key* (kbd "M-n") 'my-create-file)
@@ -191,27 +180,19 @@
"Create a directory and refresh neotree."
(interactive)
(call-interactively #'make-directory)
- (neotree-show)
- (neotree-refresh)
(other-window -1))
(bind-key* (kbd "M-N") 'my-create-directory)
(defun my-delete-file ()
"Delete a file and refresh neotree."
(interactive)
- (call-interactively #'delete-file)
- (neotree-show)
- (neotree-refresh)
- (other-window -1))
+ (call-interactively #'delete-file))
(bind-key* (kbd "M-d") 'my-delete-file)
(defun my-delete-directory ()
"Delete a file and refresh neotree."
(interactive)
- (call-interactively #'delete-directory)
- (neotree-show)
- (neotree-refresh)
- (other-window -1))
+ (call-interactively #'delete-directory))
(bind-key* (kbd "M-D") 'my-delete-directory)
;; source: http://steve.yegge.googlepages.com/my-dot-emacs-file
@@ -229,8 +210,8 @@
(rename-buffer new-name)
(set-visited-file-name new-name)
(set-buffer-modified-p nil)
- (neotree-show)
- (neotree-refresh)
+ ;(neotree-show)
+ ;(neotree-refresh)
(other-window -1))))))
(bind-key* (kbd "M-r") 'my-rename-file)
diff --git a/lisp/text.el b/lisp/text.el
index 6467a4e..835f04d 100644
--- a/lisp/text.el
+++ b/lisp/text.el
@@ -2,15 +2,25 @@
;;; Code:
(defun setup-text-mode ()
"Disable word wrap in text mode."
+ ;(perfect-margin-mode 1)
(setq word-wrap t)
(require 'flyspell)
(flyspell-mode 1)
-)
+ (set-face-attribute 'hl-line nil
+ :box nil)
+ (display-line-numbers-mode -1)
+ )
+
+(use-package perfect-margin
+ :ensure t
+ :config
+ (add-hook 'text-mode-hook 'perfect-margin-mode))
(add-hook 'text-mode-hook 'setup-text-mode)
(require 'ispell)
(setq ispell-program-name (executable-find "hunspell")
ispell-dictionary "en_US")
+
(provide 'text)
;;; text.el ends here