Twig
info
You can enable the extra with the :LazyExtras
command.
Plugins marked as optional will only be configured if they are installed.
Below you can find a list of included plugins and their default settings.
caution
You don't need to copy the default settings to your config. They are only shown here for reference.
nvim-treesitter
- Options
- Full Spec
opts = { ensure_installed = { "twig" } }
{
"nvim-treesitter/nvim-treesitter",
opts = { ensure_installed = { "twig" } },
}
mason.nvim
- Options
- Full Spec
opts = {
ensure_installed = {
"twigcs",
"twig-cs-fixer",
},
}
{
"mason-org/mason.nvim",
opts = {
ensure_installed = {
"twigcs",
"twig-cs-fixer",
},
},
}
nvim-lspconfig
- Options
- Full Spec
opts = {
servers = {
twiggy_language_server = {
enabled = true,
},
},
}
{
"neovim/nvim-lspconfig",
opts = {
servers = {
twiggy_language_server = {
enabled = true,
},
},
},
}
none-ls.nvim (optional)
- Options
- Full Spec
opts = function(_, opts)
local nls = require("null-ls")
opts.sources = opts.sources or {}
table.insert(opts.sources, nls.builtins.diagnostics.twigcs)
-- Twig-CS-Fixer builtin not available in none-ls
end
{
"nvimtools/none-ls.nvim",
optional = true,
opts = function(_, opts)
local nls = require("null-ls")
opts.sources = opts.sources or {}
table.insert(opts.sources, nls.builtins.diagnostics.twigcs)
-- Twig-CS-Fixer builtin not available in none-ls
end,
}
nvim-lint (optional)
- Options
- Full Spec
opts = {
linters_by_ft = {
twig = { "twigcs" },
},
}
{
"mfussenegger/nvim-lint",
optional = true,
opts = {
linters_by_ft = {
twig = { "twigcs" },
},
},
}
conform.nvim (optional)
- Options
- Full Spec
opts = {
formatters_by_ft = {
twig = { "twig-cs-fixer" },
},
}
{
"stevearc/conform.nvim",
optional = true,
opts = {
formatters_by_ft = {
twig = { "twig-cs-fixer" },
},
},
}