pkg update and first config fix
org-brain not working, add org-roam
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
;;; treemacs-mode.el --- A tree style file viewer package -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2021 Alexander Miller
|
||||
;; Copyright (C) 2022 Alexander Miller
|
||||
|
||||
;; This program is free software; you can redistribute it and/or modify
|
||||
;; it under the terms of the GNU General Public License as published by
|
||||
@@ -56,7 +56,7 @@
|
||||
treemacs-advanced-helpful-hydra)
|
||||
|
||||
(treemacs-import-functions-from "treemacs-tags"
|
||||
treemacs--create-imenu-index-functione)
|
||||
treemacs--create-imenu-index-function)
|
||||
|
||||
(defvar bookmark-make-record-function)
|
||||
|
||||
@@ -130,6 +130,8 @@ Will be set by `treemacs--post-command'.")
|
||||
(define-key map (kbd "f") 'treemacs-follow-mode)
|
||||
(define-key map (kbd "a") 'treemacs-filewatch-mode)
|
||||
(define-key map (kbd "n") 'treemacs-indent-guide-mode)
|
||||
(define-key map (kbd "c") 'treemacs-indicate-top-scroll-mode)
|
||||
(define-key map (kbd "d") 'treemacs-git-commit-diff-mode)
|
||||
map)
|
||||
"Keymap for commands that toggle state in `treemacs-mode'.")
|
||||
|
||||
@@ -200,6 +202,9 @@ Will be set by `treemacs--post-command'.")
|
||||
(define-key map (kbd "C") 'treemacs-cleanup-litter)
|
||||
(define-key map (kbd "=") 'treemacs-fit-window-width)
|
||||
(define-key map (kbd "W") 'treemacs-extra-wide-toggle)
|
||||
(define-key map (kbd "M-m") 'treemacs-bulk-file-actions)
|
||||
(unless (window-system)
|
||||
(define-key map [C-i] 'treemacs-TAB-action))
|
||||
map)
|
||||
"Keymap for `treemacs-mode'.")
|
||||
|
||||
@@ -225,7 +230,8 @@ Will be set by `treemacs--post-command'.")
|
||||
(doom-modeline-def-modeline 'treemacs '(bar " " major-mode))
|
||||
(doom-modeline 'treemacs))
|
||||
(t
|
||||
'(" Treemacs ")))))
|
||||
'(:eval (format " Treemacs: %s"
|
||||
(treemacs-workspace->name (treemacs-current-workspace))))))))
|
||||
|
||||
(defun treemacs--post-command ()
|
||||
"Set the default directory to the nearest directory of the current node.
|
||||
@@ -239,7 +245,12 @@ Used as a post command hook."
|
||||
(treemacs-with-writable-buffer
|
||||
(save-excursion
|
||||
(goto-char point-max)
|
||||
(insert newline-char)))))
|
||||
(insert newline-char)
|
||||
;; make sure that the projects-end marker keeps pointing at
|
||||
;; the end of the last project button
|
||||
(when (and (eq t treemacs--in-this-buffer)
|
||||
(equal (point) (marker-position (treemacs--projects-end))))
|
||||
(move-marker (treemacs--projects-end) (1- (point))))))))
|
||||
(-when-let (btn (treemacs-current-button))
|
||||
(when (treemacs-button-get btn 'invisible)
|
||||
(treemacs-next-line 1))
|
||||
@@ -251,8 +262,9 @@ Used as a post command hook."
|
||||
(setf treemacs--eldoc-msg (treemacs--get-eldoc-message path)
|
||||
default-directory (treemacs--add-trailing-slash
|
||||
(if (file-directory-p path) path (file-name-directory path)))))
|
||||
(setq treemacs--eldoc-msg nil
|
||||
default-directory "~/"))))
|
||||
(setf treemacs--eldoc-msg nil)
|
||||
(when (eq t treemacs--in-this-buffer)
|
||||
(setf default-directory "~/")))))
|
||||
|
||||
(defun treemacs--get-eldoc-message (path)
|
||||
"Set the eldoc message for given PATH.
|
||||
@@ -368,8 +380,7 @@ Will simply return `treemacs--eldoc-msg'."
|
||||
(treemacs--setup-icon-highlight)
|
||||
(treemacs--setup-icon-background-colors)
|
||||
(treemacs--setup-mode-line)
|
||||
(treemacs--reset-dom)
|
||||
(treemacs--reset-project-positions))
|
||||
(treemacs--reset-dom))
|
||||
|
||||
(defun treemacs--mode-check-advice (mode-activation &rest args)
|
||||
"Verify that `treemacs-mode' is called in the right place.
|
||||
|
||||
Reference in New Issue
Block a user