Skip to main content
Aquavium.nvim integrates with two Tree-sitter-related plugins: nvim-treesitter for enhanced syntax highlighting and nvim-treesitter-context for the sticky context window at the top of the buffer.
nvim-treesitter significantly improves syntax highlighting accuracy by using language-aware parse trees instead of regex patterns. It is listed as an optional dependency and is highly recommended.

nvim-treesitter

nvim-treesitter is an optional dependency. You can use Aquavium.nvim without it, but installing nvim-treesitter enables a richer set of highlight captures that the theme assigns specific colors to.

Extended highlight groups

The following Tree-sitter capture groups receive explicit colors in lua/Aquavium/highlights.lua:
Capture groupColor
@operatorsky
@keyword.conditionalorange
@keyword.repeatorange
@keyword.returnorange
@keyword.exceptionorange
@keyword.coroutineorange
These groups extend the base Operator and Keyword highlights already defined for plain Vim syntax, giving Tree-sitter-powered buffers a more precise color mapping.

Installation

-- lazy.nvim
{
    "T-b-t-nchos/Aquavium.nvim",
    lazy = false,
    priority = 1000,
    config = function()
        require("Aquavium").setup()
        vim.cmd("colorscheme Aquavium")
    end,
},
{
    "nvim-treesitter/nvim-treesitter",
    build = ":TSUpdate",
    config = function()
        require("nvim-treesitter.configs").setup({
            highlight = { enable = true },
        })
    end,
},

nvim-treesitter-context

nvim-treesitter-context pins a small context panel at the top of the buffer showing the enclosing function, class, or block as you scroll. Aquavium.nvim styles this panel so it integrates with the rest of the editor rather than standing out as a separate element.

Highlight groups applied

The integration (defined in lua/Aquavium/integrations/treesitter_context.lua) sets the following groups:
Highlight groupEffect
TreesitterContextContext panel background — matches bg1
TreesitterContextLineNumberLine numbers in the context panel — gray text on bg1
TreesitterContextBottomBottom border of the context panel — lightblue underline (sp)
TreesitterContextSeparatorSeparator between context entries — blue foreground on bg1
The TreesitterContextBottom group uses the sp (special/underline color) attribute rather than fg so the underline color is set without changing the text color of that line.

Installation

-- lazy.nvim
{
    "nvim-treesitter/nvim-treesitter-context",
    config = function()
        require("treesitter-context").setup()
        -- Aquavium.nvim applies highlight groups automatically
    end,
},
The integration activates automatically when nvim-treesitter-context is present. No additional configuration is needed.

Build docs developers (and LLMs) love