Remove Rust code, delegate server to nuwiki-rs repo
Delete all Rust crates (crates/) and Cargo files. The nuwiki-ls binary is now built in the separate nuwiki-rs repository and downloaded at install time from the Gitea release assets, with a cargo build fallback that clones nuwiki-rs. Update all documentation to reflect the split repo layout.
This commit is contained in:
@@ -6,7 +6,8 @@ nuwiki replaces the original [vimwiki](https://github.com/vimwiki/vimwiki)
|
||||
plugin while keeping its file format, keymaps, and `:Vimwiki*` command
|
||||
surface intact. The substantive work happens in a Rust LSP daemon — Vim
|
||||
and Neovim are thin client layers that wire up keystrokes and display
|
||||
results.
|
||||
results. The `nuwiki-ls` binary is distributed separately in the
|
||||
[nuwiki-rs](https://code.gfran.co/gffranco/nuwiki-rs) repository.
|
||||
|
||||
## Features
|
||||
|
||||
@@ -72,9 +73,12 @@ results.
|
||||
|
||||
The plugin ships a `nuwiki-ls` binary that the editor talks to over LSP
|
||||
stdio. The `install()` helper downloads a pre-built release for your
|
||||
platform, falling back to `cargo build --release` if no asset matches.
|
||||
You can run it any time with `:NuwikiInstall` (works in both Vim and
|
||||
Neovim) instead of relying on a plugin-manager build hook.
|
||||
platform from the [nuwiki-rs](https://code.gfran.co/gffranco/nuwiki-rs)
|
||||
repository. If the download fails (or `curl`/`tar` are unavailable), it
|
||||
falls back to cloning nuwiki-rs and building with `cargo` — which requires
|
||||
a Rust toolchain (1.83+ stable). You can run install manually any time with
|
||||
`:NuwikiInstall` (works in both Vim and Neovim) instead of relying on a
|
||||
plugin-manager build hook.
|
||||
|
||||
### Requirements
|
||||
|
||||
@@ -86,8 +90,10 @@ Neovim) instead of relying on a plugin-manager build hook.
|
||||
[`coc.nvim`](https://github.com/neoclide/coc.nvim) — both
|
||||
auto-registered, no manual config (see [Vim LSP client
|
||||
setup](#vim-lsp-client-setup)).
|
||||
- **Rust toolchain (1.83+ stable)** — only needed when building the
|
||||
binary from source; pre-built release downloads skip this.
|
||||
- **curl + tar** — for downloading pre-built release binaries.
|
||||
- **Rust toolchain (1.83+ stable)** — only needed when building
|
||||
the binary from source as a fallback (when no pre-built asset matches
|
||||
your platform or curl/tar are unavailable).
|
||||
|
||||
### lazy.nvim
|
||||
|
||||
@@ -126,10 +132,13 @@ call dein#add('gffranco/nuwiki', {
|
||||
|
||||
```sh
|
||||
git clone https://code.gfran.co/gffranco/nuwiki ~/.vim/pack/gffranco/start/nuwiki
|
||||
cd ~/.vim/pack/gffranco/start/nuwiki && cargo build --release -p nuwiki-ls
|
||||
mkdir -p bin && cp target/release/nuwiki-ls bin/
|
||||
cd ~/.vim/pack/gffranco/start/nuwiki && vim -e -s -c "source scripts/download_bin.vim" -c "q"
|
||||
```
|
||||
|
||||
If the download fails, `download_bin.vim` will clone
|
||||
[nuwiki-rs](https://code.gfran.co/gffranco/nuwiki-rs) and build from source
|
||||
(requires `cargo`).
|
||||
|
||||
### Vim LSP client setup
|
||||
|
||||
Neovim 0.11+ registers the server through its built-in LSP client
|
||||
@@ -196,9 +205,13 @@ aliases.
|
||||
./development/start-vim.sh # same, for plain Vim (clones vim-lsp on first run)
|
||||
```
|
||||
|
||||
Both scripts build the LSP binary, seed a scratch wiki, and launch the
|
||||
Both scripts download the LSP binary, seed a scratch wiki, and launch the
|
||||
editor against an isolated state dir under `$XDG_CACHE_HOME/nuwiki-dev`.
|
||||
|
||||
Alternatively, set `g:nuwiki_binary_path` to point at a `nuwiki-ls`
|
||||
binary built from the [nuwiki-rs](https://code.gfran.co/gffranco/nuwiki-rs)
|
||||
repository.
|
||||
|
||||
---
|
||||
|
||||
## Configuration
|
||||
@@ -441,7 +454,6 @@ For users configuring without Lua.
|
||||
| `g:nuwiki_no_folding` | `0` | `1` skips foldexpr setup |
|
||||
| `g:nuwiki_mouse_mappings` | `0` | `1` enables mouse maps |
|
||||
| `g:nuwiki_binary_path` | _(auto)_ | path to a prebuilt `nuwiki-ls` binary, bypassing the bundled one |
|
||||
| `g:nuwiki_build_from_source` | `0` | `1` builds the binary with `cargo` instead of downloading a release |
|
||||
| `g:nuwiki_no_calendar` | `0` | `1` opts out of calendar-vim integration |
|
||||
| `g:nuwiki_auto_chdir` | `0` | `1` `:lcd` into the wiki root when a wiki buffer becomes current |
|
||||
| `g:nuwiki_auto_header` | `0` | `1` insert a level-1 header from the filename on new wiki pages |
|
||||
|
||||
Reference in New Issue
Block a user