# Editor configuration
To get your editor to behave properly with code that uses cff,
you need to add -tags cff to your build tags.
The instructions for this vary on which editor you're using.
# gopls
Most editor integrations with vim, emacs, neovim, and VSCode use gopls (opens new window).
With gopls, you have to set the
buildFlags setting (opens new window)
to ["-tags", "cff"].
Editor-specific instructions for gopls follow.
# VSCode
If you're using VSCode:
Locate the gopls configuration section in your
settings.json. It might look like this:"gopls": { ... }Configure
build.buildFlagsto set the cff tag."gopls": { ... "build.buildFlags": ["-tags", "cff"] }
# vim-go
If you're using vim-go, add the following to your .vimrc.
let g:go_build_tags = 'cff'
# nvim-lspconfig
If you're using Neovim's built-in LSP client with nvim-lspconfig (opens new window):
Locate the
gopls.setupcall in yourinit.vimor.vimrc. It should look similar to one of the following:require('lspconfig')['gopls'].setup { -- ... }Add a
settings.goplssection to it if it doesn't already exist, and configurebuildFlagsto set the cff tag.require('lspconfig')['gopls'].setup { -- ... settings = { gopls = { buildFlags = {'-tags', 'cff'}, }, }, }
# JetBrains GoLand
Go to: Preferences > Go > Build Tags & Vendoring.

Set Custom tags to "cff"

← Installation Workflow →