Custom Mason registry for installing JETLS.jl
- Julia (v1.12.0 or higher)
- Git
- Neovim with Mason installed
Add the Mason configuration to your Neovim setup.
For LazyVim, create or update lua/plugins/mason.lua:
return {
"mason-org/mason.nvim",
opts = function(_, opts)
opts.registries = opts.registries or {
"github:mason-org/mason-registry",
}
-- Add custom JETLS registry
table.insert(opts.registries, 1, "github:ultimatile/mason-jetls-registry")
return opts
end,
}Open Neovim and run:
:MasonSearch for jetls and install it using i.
Alternatively, install from command line:
:MasonInstall jetlsThe registry installs the prebuilt JETLS app via Pkg.Apps:
- Runs
julia --startup-file=no -e 'using Pkg; Pkg.Apps.add(; url="https://github.com/aviatesk/JETLS.jl", rev="<version>")'. Pkg.Appsplaces the executable in~/.julia/bin/jetls(orjetls.cmdon Windows).- Mason links that executable into its own
bin/jetls, so the app can run without a local project checkout.
Mason exposes ~/.local/share/nvim/mason/bin/jetls, which simply forwards to the Pkg.Apps binary under ~/.julia/bin/jetls.
After installation, configure the LSP in your Neovim setup.
For LazyVim with nvim-lspconfig:
return {
"neovim/nvim-lspconfig",
opts = {
servers = {
jetls = {
-- Server-specific settings can be added here
},
},
},
}Make sure Julia is installed and available in your PATH:
which julia
julia --versionCheck Mason logs:
:MasonLogVerify the installation:
~/.local/share/nvim/mason/bin/jetls --helpOr check if the wrapper script exists:
ls -la ~/.local/share/nvim/mason/packages/jetls/bin/mason-jetls-registry/
├── .github/
│ └── workflows/
│ └── release.yml # Automated releases via GitHub Actions
├── packages/
│ └── jetls/
│ └── package.yaml # JETLS package definition
└── README.md
For rapid development and testing, use the file: registry to test changes without pushing to GitHub:
return {
"mason-org/mason.nvim",
opts = function(_, opts)
opts.registries = opts.registries or {
"github:mason-org/mason-registry",
}
-- Use local file registry for development
table.insert(opts.registries, 1, "file:/path/to/mason-jetls-registry")
return opts
end,
}After making changes to packages/jetls/package.yaml, restart Neovim and reinstall:
:MasonUninstall jetls
:MasonInstall jetlsThe package is defined in packages/jetls/package.yaml using:
- Source:
pkg:github/aviatesk/JETLS.jl@<version> - Build Instructions: Platform-specific scripts for Unix and Windows
- Bin: Wrapper script location
Releases are automatically created via GitHub Actions when packages/jetls/package.yaml is modified. The workflow:
- Detects changes to package definitions
- Generates a timestamped tag (e.g.,
2026-01-18-adjective-noun) - Compiles
package.yamltoregistry.json - Creates a GitHub release with:
registry.jsonregistry.json.zipchecksums.txt
Note: The release workflow uses
mason-org/actions/registry-release, which requires non-merge commits to detect changes. When merging PRs, use Squash and merge instead of regular merge to ensure releases are created correctly.
To trigger a manual release:
gh workflow run release.ymlOr via GitHub UI: Actions → Release → Run workflow
Note: Manual triggers will only create a release if the latest commit is a non-merge commit that modified
packages/.