From f3a7e1ea1cccbf790423ff0dbafaa83cae80d8c8 Mon Sep 17 00:00:00 2001 From: alemi Date: Tue, 17 Sep 2024 20:04:28 +0200 Subject: [PATCH] docs: explain downloader, update readme --- README.md | 8 ++++++-- build.lua | 11 +++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index fa59672..141c5ac 100644 --- a/README.md +++ b/README.md @@ -13,9 +13,13 @@ as well as a remote virtual workspace for you and your team. This is the reference codemp [neovim](https://neovim.io) plugin maintained by [hexedtech](https://hexed.technology) # installation -Currently only [lazy.nvim](https://github.com/folke/lazy.nvim) is supported, but codemp should work with any plugin manager able to run `build.lua` upon installation and update. +Just add `hexedtech/codemp-nvim` to your plugin spec. -Just add `hexedtech/codemp-nvim` in your plugin spec. +If you're using [`lazy.nvim`](https://github.com/folke/lazy.nvim), everything will be configured automatically! + +If you're using something else to load `codemp-nvim`, you need to also do the following: + * run `build.lua` during installation and every update + * invoke `require('codemp-nvim').setup({ ... })` after loading, pass your config Note that the native codemp lua library will be downloaded automatically on each update. diff --git a/build.lua b/build.lua index 39103bc..2bb02df 100644 --- a/build.lua +++ b/build.lua @@ -1,3 +1,14 @@ +-- this is the codemp updater for nvim +-- +-- it basically detects your operating system and architecture to +-- decide which native extension to download, then it downloads +-- from https://codemp.dev/release/lua/. If this doesn't work for +-- you or you don't trust periodic binary downloads, feel free to +-- remove this file (or its content). remember to place the +-- `native.(so|dll|dylib)` file in this plugin folder, next to +-- the `loader.lua` file. + + local plugin_dir = vim.fn.fnamemodify(debug.getinfo(1, "S").source:sub(2), ":p:h") -- got this from https://lazy.folke.io/developers#building local os_uname = vim.loop.os_uname()