Neovim support for GoX: Tree-sitter highlighting and GoX language-server integration for completion, diagnostics, go-to-definition, and refactors across both .gox and .go buffers.
Beta: This plugin is in beta. You may encounter bugs or incomplete behavior, and features/configuration may change between releases. Please share feedback and file issues on GitHub (include your GoX version and minimal repro steps).
- Filetype
- Detects
*.goxand setsfiletype=gox.
- Detects
- LSP
- Configures and starts the GoX language server for
.goxand.go.
- Configures and starts the GoX language server for
- Tree-sitter
- Installs/configures the
goxTree-sitter parser (and any required dependent parsers).
- Installs/configures the
- Neovim 0.11.0+
nvim-treesitteron the main branch — used to install required parsers (archived 2026-04-03 but still works; remains recommended until Neovim core ships its own installer). If you prefer to manage Tree-sitter yourself, settreesitter.enabled = falseinsetup().gitcurlorwget(Windows: PowerShell)tarfor.tar.gzarchives (Windows: PowerShell)go
GoX proxies
goplsfunctionality for both.goand.goxfiles, so any standalonegoplsclient must be disabled.
On startup, the plugin can run a health check that:
- Ensures required Tree-sitter parsers are installed (unless disabled).
- Ensures
goxandgoplsare installed at the required versions (unless disabled or custom binaries are provided). - Enables the parser and language server.
Actions are always confirmed before applying changes.
Language servers are installed into the plugin’s own directory.
:GoxHealth— run the health check.
{
"doors-dev/nvim-gox",
config = function()
-- setup is required
require("gox").setup({
-- everything is optional
treesitter = {
-- enable Tree-sitter setup (default: true)
enabled = true,
-- enable Tree-sitter folding (default: true)
fold = true,
-- enable Tree-sitter indent (default: true)
indent = true,
-- attach Tree-sitter to .go files (default: false)
-- enable if you don't already have Go highlighting configured
start_go = true,
},
lsp = {
-- enable LSP setup (default: true)
enabled = true,
-- optional GoX server logging
log = {
-- path to the GoX log file
file = "/tmp/nvim.gox.log",
-- log level passed to `gox srv -log.level`
level = "debug",
},
},
-- override binaries (defaults to ones installed in the plugin directory)
bin = {
gox = "gox",
go = "go",
},
})
end,
}-
You see a message about disabling standalone
gopls- GoX stops any separately configured
goplsclient because GoX runsgoplsinternally. - Disable your standalone
goplssetup to avoid the message and duplicate configuration.
- GoX stops any separately configured
-
GoX can’t download/install tools
- Ensure you have:
git,curl/wget(or PowerShell on Windows), andtar/unzipas appropriate. - Alternatively, set
opts.bin.gox/opts.bin.goplsto use your system binaries.
- Ensure you have:
-
Unsupported platform/arch for GoX release
- The built-in installer only supports:
linux/darwin/windowsandamd64/arm64. - Install
goxmanually and pointopts.bin.goxat it.
- The built-in installer only supports:
- GoX language server and library: https://github.com/doors-dev/gox
- Tree-sitter grammar: https://github.com/doors-dev/tree-sitter-gox