githubEdit

Neovim

circle-info

📘 The Trunk Code Quality Neovim Plugin is available for beta!

Try it out by following the instructions below.

Prerequisites

The Neovim Plugin needs the following prerequisites:

Tool
Minimum Required Version

CLI

1.17.0

Neovim

v0.9.2

Get started

Using the lazy.nvimarrow-up-right plugin manager:

require("lazy").setup({
	{
		"trunk-io/neovim-trunk",
		lazy = false,
		-- optionally pin a version
		tag = "v0.1.3",
		-- these are optional config arguments (defaults shown)
		config = {
			-- trunkPath = "trunk",
			-- lspArgs = {},
			-- formatOnSave = true,
                        -- formatOnSaveTimeout = 10, -- seconds
			-- logLevel = "info"
		},
		main = "trunk",
		dependencies = {"nvim-telescope/telescope.nvim", "nvim-lua/plenary.nvim"}
	}
})

For other plugin managers and installation methods, see our Neovim Plugin repoarrow-up-right.

Features

The Neovim Plugin is designed to mirror the VSCode extension. Supported features include:

  • Provide inline diagnostics and auto-fixes

  • Format files on save

  • Run Trunk Actions notifications

  • Display the linters that Trunk runs on a file

Limitations

The Trunk Code Quality Neovim Plugin is in beta with limited support. If you encounter any issues, feel free to reach out on Slackarrow-up-right.

For other notes and configuration, see the Neovim Plugins repoarrow-up-right.

Last updated