From 9da5b9345deaed93f148ad8f3e9c531ad0010d78 Mon Sep 17 00:00:00 2001 From: alemi Date: Sat, 17 Aug 2024 16:57:38 +0200 Subject: [PATCH] docs: improved readme --- README.md | 52 ++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 48 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index f460efc..b415a7a 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,52 @@ -# codemp for nvim -an editor plugin for nvim +# codemp-nvim +> ![codemp logo](https://codemp.dev/codemp-t.png) code multiplexer for neovim -all commands are under `:MP` (with completion) +CodeMP is a **collaborative** text editing plugin to work remotely. +It seamlessly integrates in your editor providing remote cursors and instant text synchronization, +as well as a remote virtual workspace for you and your team. + +CodeMP is build with state-of-the-art CRDT technology, guaranteeing eventual consistency. +This means everyone in a workspace will always be working on the exact same file _eventually_: +even under unreliable networks or constrained resources, the underlying CRDT will always reach a +convergent state across all users. Even with this baseline, CodeMP's proto is optimized for speed +and low network footprint, meaning even slow connections can provide stable real-time editing. + +> This is the reference codemp neovim plugin maintained by [hexedtech](https://hexed.technology) + +## usage +to interact with this plugin use the `:MP` command + + * `:MP toggle` toggles the codemp sidebar + * `:MP connect [host] [username] [password]` to connect to server, user and pwd will be prompted if not given + + * `:MP disconnect` disconnects from server + * `:MP id` shows current client id + * `:MP join ` will join requested workspace; starts processing cursors, users and filetree + + * `:MP leave ` disconnect from a joined workspace + * `:MP attach ` will attach to requested buffer if it exists (opens a new local buffer and uses current window) + * `:MP detach ` detach from a buffer and stop receiving changes + * `:MP share` shares current file: creates a new buffer with local file's content, and attach to it + * `:MP sync` forces resynchronization of current buffer + * `:MP create ` will create a new empty buffer in workspace + * `:MP delete ` will delete a buffer from workspace + +### quick start + * first connect to server with `:MP connect` + * then join a workspace with `:MP join ` + * either attach directly to a buffer with `:MP attach ` or browse available buffers with `:MP toggle` + +MP command autocompletes available options for current state, so cycle if you forget any name + +### configuration +it's possible to configure global `vim.g.codemp_username` and a `vim.g.codemp_password` which will be used when connecting ## installation -this requires also getting the codemp library, download it and place it in your lua folder, then install this plugin reguarly +**currently there is no stable release available** + +an internal testing build is available here, place the whole `codemp` folder under your `.config/nvim/lua` directory + +### building +this plugin relies on the native codemp lua bindings: just compile the main `codemp` project with `lua` feature enabled +and place a `lua.so` or `lua.dll` together with the plugin lua files while bundling