mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-08-18 16:28:37 +02:00
feat(extras): added twig language
This commit is contained in:
parent
83bf6360a1
commit
f7905adec6
1 changed files with 44 additions and 0 deletions
44
lua/lazyvim/plugins/extras/lang/twig.lua
Normal file
44
lua/lazyvim/plugins/extras/lang/twig.lua
Normal file
|
@ -0,0 +1,44 @@
|
|||
return {
|
||||
{
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
opts = { ensure_installed = { 'twig' } },
|
||||
},
|
||||
{
|
||||
'williamboman/mason.nvim',
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
'twiggy-language-server',
|
||||
'twigcs',
|
||||
'twig-cs-fixer',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
'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,
|
||||
},
|
||||
{
|
||||
'mfussenegger/nvim-lint',
|
||||
optional = true,
|
||||
opts = {
|
||||
linters_by_ft = {
|
||||
twig = { 'twigcs' },
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
'stevearc/conform.nvim',
|
||||
optional = true,
|
||||
opts = {
|
||||
formatters_by_ft = {
|
||||
twig = { 'twig-cs-fixer' },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue