docs: explain downloader, update readme

This commit is contained in:
əlemi 2024-09-17 20:04:28 +02:00
parent 9d7410b725
commit f3a7e1ea1c
Signed by: alemi
GPG key ID: A4895B84D311642C
2 changed files with 17 additions and 2 deletions

View file

@ -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.

View file

@ -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()