forked from Snoweuph/Dotfiles_nvim
31 lines
927 B
Lua
31 lines
927 B
Lua
local T = require('toolchain')
|
|
local M = {}
|
|
|
|
function M.setup()
|
|
T.add_highlighter_autoinstalls('php', 'phpdoc', 'twig')
|
|
|
|
T.add_null_ls_module(function(null_ls)
|
|
return {
|
|
-- Diagnostics
|
|
null_ls.builtins.diagnostics.phpstan,
|
|
null_ls.builtins.diagnostics.phpcs,
|
|
null_ls.builtins.diagnostics.twigcs,
|
|
-- Formatter
|
|
null_ls.builtins.formatting.phpcsfixer.with({
|
|
prefer_local = 'vendor/bin/php-cs-fixer',
|
|
args = { 'fix', '--allow-risky=yes', '$FILENAME' },
|
|
}),
|
|
}
|
|
end)
|
|
|
|
T.add_lsp_autoinstalls('phpactor', 'twiggy_language_server', 'stimulus_ls')
|
|
T.add_lsps(function(lspconfig, capabilities)
|
|
local config = { capabilities = capabilities }
|
|
lspconfig.phpactor.setup(config)
|
|
lspconfig.stimulus_ls.setup(config)
|
|
end)
|
|
|
|
--TODO: move Dap config here
|
|
end
|
|
|
|
return M
|