Neovim plugin for the Allium language. Provides LSP client configuration, tree-sitter syntax highlighting, diagnostics and standard LSP keymaps.
Requires allium-lsp to be installed and in your $PATH. Install it from allium-tools releases or build from source.
No plugin manager needed for LSP and filetype support. The plugin adds tree-sitter highlighting, default keymaps and health checks on top.
-- lazy.nvim
{
"juxt/nvim-allium",
ft = { "allium" },
opts = {},
dependencies = {
"nvim-treesitter/nvim-treesitter",
},
}On 0.11+, nvim-lspconfig is not required. The plugin uses vim.lsp.config() and vim.lsp.enable() directly.
-- lazy.nvim
{
"juxt/nvim-allium",
ft = { "allium" },
opts = {},
dependencies = {
"neovim/nvim-lspconfig",
"nvim-treesitter/nvim-treesitter",
},
}After installing the plugin, run :TSInstall allium to compile the parser. Enable highlighting in your nvim-treesitter config:
require("nvim-treesitter.configs").setup({
highlight = { enable = true },
})All options are optional. Pass them to setup() or use lazy.nvim's opts:
require("allium").setup({
lsp = {
cmd = { "allium-lsp", "--stdio" }, -- LSP server command
filetypes = { "allium" },
root_markers = { "allium.config.json", ".git" }, -- 0.11+ native LSP
settings = {},
},
keymaps = {
enabled = true, -- set false to handle your own mappings
definition = "gd",
hover = "K",
references = "gr",
rename = "<leader>rn",
code_action = "<leader>ca",
format = "<leader>f",
prev_diagnostic = "[d",
next_diagnostic = "]d",
loclist = "<leader>q",
},
}):checkhealth alliumVerifies Neovim version, allium-lsp binary, dependencies and tree-sitter parser status.
Run unit tests (headless Neovim, no external dependencies):
./scripts/test.shRun integration tests (requires allium-lsp in PATH and test dependencies installed):
./scripts/test-install.sh
./scripts/test-integration.shAllium Tools core 3.x
MIT