summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md33
-rw-r--r--org-roam-ui.el25
2 files changed, 51 insertions, 7 deletions
diff --git a/README.md b/README.md
index 092ccfc..29362b7 100644
--- a/README.md
+++ b/README.md
@@ -30,7 +30,7 @@ When you open a note in Emacs, org-roam-ui will move to the corresponding node o
### Theme syncing
-Because why not? If you set `org-roam-ui-sync-theme` to `t`, org-roam-ui will automagically detect your current theme and match the ui to it! This works best with doom-themes, as those provide a variable from which we can easily read theme info, but should work with any theme (results may vary).
+Your gruvbox is only a `M-x org-roam-ui-sync-theme` away.
## Installation
@@ -175,9 +175,15 @@ Fewer forces fewer worries
#### Favor 2D over 3D
+I know, it looks cool, but man is it slow.
+
#### Don't drag the dang thing around so much!
-In our experience, once the graph has actually settled and nothing needs to be rendered again, looking around should pose little trouble. Atm there is no way of "saving" the graph configuration, but we are exploring the possibility.
+In our experience, once the graph has actually settled and nothing needs to be rendered again, looking around should pose little trouble. At the moment there is no way of "saving" the graph configuration, but we are exploring the possibility. The graph layout algorithm is deterministic however, so barring any changes to the data it should produce the same results each time.
+
+### Q: Some of my links are not showing up?
+
+At the moment we aren't showing citation links made with `org-roam-bibtex` yet, but we will soon!
### Q: Will you implement X?
@@ -187,6 +193,29 @@ Hopefully, yeah! But time is limited, and so is the amount of features we can cr
Correct! We only support org-roam v2!
+## Planned features
+
+### Graph
+
+In no particular order
+
+- Citation links + customization
+- Tag filtering/coloring
+- Local graph show Nth neighbor
+- More colors
+- Colorization options (by neighbors, centrality, etc)
+-
+
+### UI in general
+
+- File viewing using AST parsing
+- Displaying notes Andy Matushak style
+- Discovery options, e.g. "show shortest path between X and Y"
+
+### Beyond
+
+- Discuss the future of org-roam-ui with us (here!)[https://github.com/org-roam/org-roam-ui/discussions/6]
+
# Contribute 💪
[GitHub Community Guidelines
diff --git a/org-roam-ui.el b/org-roam-ui.el
index 5ecc704..4ab2513 100644
--- a/org-roam-ui.el
+++ b/org-roam-ui.el
@@ -81,7 +81,13 @@ E.g. '((bg . '#1E2029')
:group 'org-roam-ui
:type 'list)
-(defvar org-roam-ui--ws-current-node nil)
+(defcustom org-roam-ui-follow t
+ "If true, org-roam-ui will follow you around in the graph."
+ :group 'org-roam-ui
+ :type 'boolean)
+
+(defvar org-roam-ui--ws-current-node nil
+ "Var to keep track of which node you are looking at.")
(defvar oru-ws nil
"The websocket for org-roam-ui.")
@@ -108,12 +114,12 @@ This serves the web-build and API over HTTP."
(org-roam-ui--send-graphdata)
(add-hook 'after-save-hook #'org-roam-ui--on-save)
(message "Connection established with org-roam-ui")
- (add-hook 'post-command-hook #'org-roam-ui--update-current-node)))
+ (when org-roam-ui-follow
+ (add-hook 'post-command-hook #'org-roam-ui--update-current-node))))
:on-close (lambda (_websocket)
(remove-hook 'post-command-hook #'org-roam-ui--update-current-node)
(remove-hook 'after-save-hook #'org-roam-ui--on-save)
(message "Connection with org-roam-ui closed succesfully."))))
-
(if
(boundp 'counsel-load-theme)
(advice-add 'counsel-load-theme :after #'org-roam-ui-sync-theme--advice)
@@ -242,7 +248,7 @@ ROWS is the sql result, while COLUMN-NAMES is the columns to use."
;;;; commands
-(defun orui-zoom-to-node (&optional id speed padding)
+(defun orui-node-zoom (&optional id speed padding)
"Move the view of the graph to the node at points, or optionally a node of your choosing.
Optionally takes three arguments:
The id of the node you want to travel to.
@@ -254,7 +260,16 @@ The padding around the nodes in the viewport."
((commandName . "zoom") (id . ,node) (speed . ,speed) (padding . ,padding)))))))
(message "No node found."))
-(defun orui-toggle-following ()
+
+(defun orui-node-local (&optional id speed padding)
+ "Open the local graph view of the current node, or optionally of a node of your choosing."
+ (interactive)
+ (if-let ((node (or id (org-roam-id-at-point))))
+ (websocket-send-text oru-ws (json-encode `((type . "command") (data .
+ ((commandName . "local") (id . ,node)))))))
+ (message "No node found."))
+
+(defun orui-toggle-follow ()
"Set whether ORUI should follow your every move in emacs. Default yes."
(interactive)
(if (member 'org-roam-ui--update-current-node (default-value 'post-command-hook))