Skip to content

Commit 7f86bf6

Browse files
committed
Extract nvim-allium to standalone repo
The Neovim plugin now lives at github.com/juxt/nvim-allium. Remove packages/nvim-allium/, neovim scripts, and the neovim spec. Update docs and config to link to the new repo.
1 parent 5d44ad5 commit 7f86bf6

30 files changed

Lines changed: 12 additions & 2219 deletions

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ artifacts/
1919
.eslintcache
2020
.pre-commit-cache/
2121
.emacs-test/
22-
.nvim-demo/
23-
.nvim-test/
2422

2523
# Logs
2624
npm-debug.log*

AGENTS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,11 @@ extensions/allium/ VS Code extension (LSP client launcher)
7878
packages/allium-lsp/ Language Server Protocol server (wraps language-tools/)
7979
packages/allium-cli/ Standalone CLI package (allium-check, allium-format, etc.)
8080
packages/tree-sitter-allium/ Tree-sitter grammar for the Allium language
81-
packages/nvim-allium/ Neovim plugin (lazy.nvim compatible)
8281
packages/allium-mode/ Emacs major mode package
8382
```
8483

84+
> **Note:** The Neovim plugin lives in its own repo: [juxt/nvim-allium](https://github.com/juxt/nvim-allium).
85+
8586
### Architecture
8687

8788
The core language intelligence lives in `extensions/allium/src/language-tools/` — pure TypeScript with **zero editor API dependencies**. All functions accept plain text and return plain data.
@@ -92,7 +93,6 @@ language-tools/ Pure analysis engine: parser, analyzer, hover, definitions, re
9293
├── packages/allium-lsp/ LSP server: wraps language-tools/ over JSON-RPC (stdio)
9394
| |
9495
| ├── extensions/allium/ VS Code launcher
95-
| ├── packages/nvim-allium/ Neovim plugin
9696
| └── packages/allium-mode/ Emacs major mode
9797
|
9898
└── packages/allium-cli/ CLI tools: direct consumers of language-tools/

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,7 @@ rule DispatchOrder {
7171

7272
### Neovim
7373

74-
1. Install `allium-lsp` via your favorite plugin manager or from release artifacts.
75-
2. Configure `nvim-lspconfig` to point to the `allium-lsp` binary.
76-
3. See the [Neovim Setup Guide](docs/editors/neovim.md) for details.
74+
Install [nvim-allium](https://github.com/juxt/nvim-allium) with your plugin manager. It handles LSP, tree-sitter highlighting and filetype detection.
7775

7876
### Emacs
7977

@@ -136,7 +134,7 @@ Run the full test matrix locally:
136134
npm run test:all
137135
```
138136

139-
`test:all` runs fastest-to-slowest: `test`, `test:nvim`, `test:emacs`, `test:nvim:integration`, `test:emacs:integration`.
137+
`test:all` runs fastest-to-slowest: `test`, `test:emacs`, `test:emacs:integration`.
140138

141139
The `pre-push` hook runs `npm run test:all` before allowing a push.
142140

docs/editors/neovim.md

Lines changed: 3 additions & 166 deletions
Original file line numberDiff line numberDiff line change
@@ -1,168 +1,5 @@
1-
# Neovim Setup Guide for Allium
1+
# Neovim
22

3-
This guide explains how to set up Allium language support in Neovim using `allium-lsp` and `nvim-allium`.
3+
The Neovim plugin has moved to its own repository: [juxt/nvim-allium](https://github.com/juxt/nvim-allium).
44

5-
## Prerequisites
6-
7-
- **Neovim** >= 0.9.0
8-
- **lazy.nvim** (recommended plugin manager)
9-
- **nvim-lspconfig** (LSP client configuration)
10-
- **nvim-treesitter** (Syntax highlighting)
11-
12-
## 1. Install Allium LSP Server
13-
14-
The LSP server must be available in your system path as `allium-lsp`.
15-
16-
### From Release Artifacts
17-
18-
1. Download the `allium-lsp-<version>.tar.gz` for your platform from [GitHub Releases](https://github.com/juxt/allium-tools/releases).
19-
2. Extract the archive and move the `allium-lsp` binary to a directory in your `$PATH` (e.g., `/usr/local/bin`).
20-
21-
### From Source
22-
23-
If you have the repository cloned:
24-
25-
```bash
26-
cd packages/allium-lsp
27-
npm install
28-
npm run build
29-
# The binary is in dist/bin.js. You can link it:
30-
ln -s $(pwd)/dist/bin.js /usr/local/bin/allium-lsp
31-
```
32-
33-
## 2. Install nvim-allium Plugin
34-
35-
Add `nvim-allium` to your Neovim configuration. Below is an example using `lazy.nvim`:
36-
37-
```lua
38-
-- Example init.lua configuration
39-
require("lazy").setup({
40-
{
41-
"juxt/allium-tools",
42-
-- Note: During pre-release, you may need to point to the specific subdirectory
43-
-- or install from a local checkout.
44-
config = function()
45-
require("allium").setup({
46-
-- Custom LSP options
47-
lsp = {
48-
cmd = { "allium-lsp", "--stdio" },
49-
}
50-
})
51-
end,
52-
dependencies = {
53-
"neovim/nvim-lspconfig",
54-
"nvim-treesitter/nvim-treesitter",
55-
},
56-
}
57-
})
58-
```
59-
60-
## 3. Install Tree-sitter Parser
61-
62-
`nvim-allium` handles the registration of the Allium parser with `nvim-treesitter`. After installing the plugin, you can install the parser by running:
63-
64-
```vim
65-
:TSInstall allium
66-
```
67-
68-
Ensure that you have enabled `highlight` in your `nvim-treesitter` configuration:
69-
70-
```lua
71-
require('nvim-treesitter.configs').setup {
72-
highlight = {
73-
enable = true,
74-
},
75-
}
76-
```
77-
78-
## 4. Verify Setup
79-
80-
Run the following command in Neovim to check the health of the Allium integration:
81-
82-
```vim
83-
:checkhealth allium
84-
```
85-
86-
This will verify that the `allium-lsp` binary is found and that the Tree-sitter parser is correctly installed.
87-
88-
## Quick Isolated Demo
89-
90-
From the monorepo root, you can launch a repo-local Neovim demo session that
91-
does not use your normal Neovim config/state:
92-
93-
```bash
94-
npm run demo:nvim-allium
95-
```
96-
97-
Tree-sitter variant:
98-
99-
```bash
100-
npm run demo:nvim-allium:ts
101-
```
102-
103-
The demo stores runtime data in `.nvim-demo/`.
104-
105-
## Plugin Tests
106-
107-
Run repo-local Neovim plugin tests in headless mode:
108-
109-
```bash
110-
npm run test:nvim
111-
```
112-
113-
The test suite uses `nvim -u NONE` and stubs external dependencies for fast, deterministic checks.
114-
115-
Install repo-local integration test dependencies once:
116-
117-
```bash
118-
npm run test:nvim:install
119-
```
120-
121-
Run integration tests with real `nvim-lspconfig`, real `nvim-treesitter`, and real `allium-lsp`:
122-
123-
```bash
124-
npm run test:nvim:integration
125-
```
126-
127-
## Feature Reference
128-
129-
| Feature | Description | Standard Keymap |
130-
| :--- | :--- | :--- |
131-
| **Hover** | Show documentation for symbol | `K` |
132-
| **Go to Definition** | Jump to declaration | `gd` |
133-
| **Find References** | List all usages | `gr` |
134-
| **Rename** | Rename symbol across files | `<leader>rn` |
135-
| **Code Actions** | Apply quick fixes / refactors | `<leader>ca` |
136-
| **Formatting** | Format current buffer | `<leader>f` |
137-
| **Diagnostics** | Show inline errors and warnings | `[d` / `]d` |
138-
139-
## What Is Available Today
140-
141-
`nvim-allium` currently provides:
142-
143-
- Filetype + LSP client wiring for `allium` buffers.
144-
- Default LSP keymaps on attach.
145-
- Tree-sitter parser registration for `allium` (local grammar path in this repo).
146-
- Health checks via `:checkhealth allium`.
147-
148-
To access functionality in a buffer:
149-
150-
1. Open an `.allium` file.
151-
2. Confirm filetype: `:set filetype?` should show `filetype=allium`.
152-
3. Confirm LSP attached: `:LspInfo`.
153-
4. Use default keymaps or standard LSP commands:
154-
- Hover: `K` or `:lua vim.lsp.buf.hover()`
155-
- Definition: `gd` or `:lua vim.lsp.buf.definition()`
156-
- References: `gr` or `:lua vim.lsp.buf.references()`
157-
- Rename: `<leader>rn` or `:lua vim.lsp.buf.rename()`
158-
- Code actions: `<leader>ca` or `:lua vim.lsp.buf.code_action()`
159-
- Format: `<leader>f` or `:lua vim.lsp.buf.format({ async = true })`
160-
- Diagnostics nav: `[d` / `]d`, list via `<leader>q`
161-
162-
There are no extra user commands defined by `nvim-allium` at the moment; functionality is exposed through built-in Neovim LSP and diagnostic APIs plus configured keymaps.
163-
164-
## Troubleshooting
165-
166-
- **LSP not starting**: Ensure `allium-lsp` is in your `$PATH`. You can test this by running `allium-lsp --version` in your terminal.
167-
- **No syntax highlighting**: Ensure `nvim-treesitter` is installed and you've run `:TSInstall allium`. Check that the filetype is correctly detected as `allium` with `:set filetype?`.
168-
- **Logs**: Check LSP logs with `:LspLog` for detailed error messages from the server.
5+
It provides LSP client configuration, tree-sitter syntax highlighting, diagnostics and standard LSP keymaps. Supports native LSP on Neovim 0.11+ and lspconfig on 0.9+.

docs/project/specs/allium-neovim-mode-behaviour.allium

Lines changed: 0 additions & 51 deletions
This file was deleted.

docs/versioning.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Editor plugins are thin integration layers that delegate to the LSP and tree-sit
3131
|---|---|
3232
| allium-vscode | `extensions/allium/package.json` |
3333
| allium-mode | `packages/allium-mode/allium-mode.el` and `allium-mode-pkg.el` |
34-
| nvim-allium | No version declared (distributed via plugin managers) |
34+
| nvim-allium | Separate repo: [juxt/nvim-allium](https://github.com/juxt/nvim-allium) |
3535

3636
Editor plugins should document which core version they're compatible with in their README.
3737

@@ -55,10 +55,10 @@ When the Allium language version changes (e.g. v1 → v2), the following steps a
5555

5656
1. **Core tier.** Run `scripts/version-bump.sh <new-version>` to update all core-tier manifests.
5757
2. **This document.** Update the language version statement at the top of this file.
58-
3. **Editor plugins.** Check whether each editor plugin has changes on the release branch (`git diff main --stat -- extensions/ packages/allium-mode/ packages/nvim-allium/`). If a plugin has changed, bump its version:
58+
3. **Editor plugins.** Check whether each editor plugin has changes on the release branch (`git diff main --stat -- extensions/ packages/allium-mode/`). If a plugin has changed, bump its version:
5959
- allium-vscode: `extensions/allium/package.json`
6060
- allium-mode: `packages/allium-mode/allium-mode.el` and `allium-mode-pkg.el`
61-
- nvim-allium: no declared version (skip)
61+
- nvim-allium: lives in [juxt/nvim-allium](https://github.com/juxt/nvim-allium), versioned independently
6262
4. **Compatibility notes.** Update the "Compatibility" line in each editor plugin README to reference the new core version.
6363
5. **Homebrew.** After CI publishes the release, run `scripts/update-homebrew-formula.sh <version>` and push the tap repo. See `docs/releasing.md` for the full steps.
6464

package.json

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,13 @@
1313
"prepare": "bash -lc 'if command -v pre-commit >/dev/null 2>&1; then pre-commit install && pre-commit install --hook-type pre-push; else echo \"pre-commit not found; skipping hook install\"; fi'",
1414
"build": "npm run --workspaces build",
1515
"test": "npm run --workspaces test",
16-
"test:all": "npm run test && npm run test:nvim && npm run test:emacs && npm run test:nvim:integration && npm run test:emacs:integration",
16+
"test:all": "npm run test && npm run test:emacs && npm run test:emacs:integration",
1717
"test:emacs:install": "./scripts/run-emacs-test-install.sh",
1818
"test:emacs": "./scripts/run-emacs-tests.sh",
1919
"test:emacs:integration": "./scripts/run-emacs-integration-tests.sh",
20-
"test:nvim:install": "./scripts/run-neovim-test-install.sh",
21-
"test:nvim": "./scripts/run-neovim-tests.sh",
22-
"test:nvim:integration": "./scripts/run-neovim-integration-tests.sh",
2320
"demo:allium-mode": "./scripts/run-emacs-demo.sh classic",
2421
"demo:allium-mode:classic": "./scripts/run-emacs-demo.sh classic",
2522
"demo:allium-mode:ts": "./scripts/run-emacs-demo.sh ts",
26-
"demo:nvim-allium": "./scripts/run-neovim-demo.sh classic",
27-
"demo:nvim-allium:classic": "./scripts/run-neovim-demo.sh classic",
28-
"demo:nvim-allium:ts": "./scripts/run-neovim-demo.sh ts",
2923
"lint": "eslint . && npm run --workspaces lint",
3024
"lint:fix": "eslint . --fix",
3125
"format": "biome format --write .",

0 commit comments

Comments
 (0)