Trying local emacs crdt server for collaboration

This commit is contained in:
Emmet 2024-05-27 14:22:21 -05:00
parent 3141f4bfaa
commit 696d2d5a29
2 changed files with 70 additions and 0 deletions

View file

@ -626,6 +626,40 @@ If the path from LINK does not exist, nil is returned."
"e" #'org-jekyll-rename-post
)
(require 'crdt)
(setq crdt-default-tls nil)
(setq crdt-default-name "Emmet")
(if (file-exists-p "~/.emacs.d/crdt-private.el") (load! "~/.emacs.d/crdt-private.el"))
(defun crdt-connect-default ()
(interactive)
(crdt-connect crdt-default-server-address crdt-default-name)
)
(map! :leader
:desc "crdt"
:prefix ("C")
:desc "Connect to a crdt server"
"c" #'crdt-connect-default
:desc "Connect to default crdt server"
"C" #'crdt-connect-default
:desc "Disconnect from a crdt server"
"d" #'crdt-disconnect
:desc "Add buffer to a session"
"a" #'crdt-share-buffer
:desc "Stop sharing buffer to session"
"s" #'crdt-stop-share-buffer
:desc "List crdt buffers in a session"
"l" #'crdt-list-buffers
:desc "List crdt users in a session"
"u" #'crdt-list-users
)
;;;------ Org roam configuration ------;;;
(require 'org-roam)
(require 'org-roam-dailies)

View file

@ -756,6 +756,42 @@ exit
"e" #'org-jekyll-rename-post
)
#+end_src
*** Crdt
#+begin_src emacs-lisp :tangle config.el
(require 'crdt)
(setq crdt-default-tls nil)
(setq crdt-default-name "Emmet")
(if (file-exists-p "~/.emacs.d/crdt-private.el") (load! "~/.emacs.d/crdt-private.el"))
(defun crdt-connect-default ()
(interactive)
(crdt-connect crdt-default-server-address crdt-default-name)
)
(map! :leader
:desc "crdt"
:prefix ("C")
:desc "Connect to a crdt server"
"c" #'crdt-connect-default
:desc "Connect to default crdt server"
"C" #'crdt-connect-default
:desc "Disconnect from a crdt server"
"d" #'crdt-disconnect
:desc "Add buffer to a session"
"a" #'crdt-share-buffer
:desc "Stop sharing buffer to session"
"s" #'crdt-stop-share-buffer
:desc "List crdt buffers in a session"
"l" #'crdt-list-buffers
:desc "List crdt users in a session"
"u" #'crdt-list-users
)
#+end_src
** Org Roam Configuration
*** Standard Org Roam Configuration