feat: add more php support

This commit is contained in:
Devin Haska 2025-02-05 20:58:31 -08:00
parent 7eaae57abd
commit 53407e626d
3 changed files with 10 additions and 6 deletions

View file

@ -3,6 +3,7 @@ return {
"stevearc/conform.nvim", "stevearc/conform.nvim",
opts = { opts = {
formatters_by_ft = { formatters_by_ft = {
blade = { "blade-formatter" },
css = { "prettierd" }, css = { "prettierd" },
scss = { "prettierd" }, scss = { "prettierd" },
html = { "djlint" }, html = { "djlint" },
@ -12,7 +13,7 @@ return {
javascriptreact = { "prettierd" }, javascriptreact = { "prettierd" },
json = { "prettierd" }, json = { "prettierd" },
jsonc = { "prettierd" }, jsonc = { "prettierd" },
php = { "php_cs_fixer" }, php = { "pint", "php_cs_fixer", stop_after_first = true },
toml = { "taplo" }, toml = { "taplo" },
typescript = { "prettierd" }, typescript = { "prettierd" },
typescriptreact = { "prettierd" }, typescriptreact = { "prettierd" },
@ -52,7 +53,9 @@ return {
"WhoIsSethDaniel/mason-tool-installer.nvim", "WhoIsSethDaniel/mason-tool-installer.nvim",
opts = { opts = {
ensure_installed = { ensure_installed = {
"blade-formatter",
"djlint", "djlint",
"phpcs",
"php-cs-fixer", "php-cs-fixer",
"prettierd", "prettierd",
"proselint", "proselint",

View file

@ -11,7 +11,7 @@ return {
"eslint", "eslint",
"html", "html",
"lua_ls", "lua_ls",
"psalm", -- .php "phpactor", -- php
"taplo", -- .toml "taplo", -- .toml
"ts_ls", "ts_ls",
"twiggy_language_server", -- .twig "twiggy_language_server", -- .twig
@ -38,9 +38,9 @@ return {
}) })
end, end,
}, },
lua_ls = {},
html = {}, html = {},
psalm = {}, lua_ls = {},
phpactor = {},
taplo = {}, taplo = {},
ts_ls = {}, ts_ls = {},
twiggy_language_server = {}, twiggy_language_server = {},

View file

@ -4,10 +4,10 @@ return {
version = false, version = false,
build = ":TSUpdate", build = ":TSUpdate",
event = { "VeryLazy" }, event = { "VeryLazy" },
lazy = vim.fn.argc(-1) == 0, -- load treesitter early when opening a file from the cmdline lazy = vim.fn.argc(-1) == 0, -- load treesitter early when opening a file from the cmdline
opts = { opts = {
ensure_installed = { ensure_installed = {
"graphql", "graphql",
"html", "html",
"htmldjango", "htmldjango",
"javascript", "javascript",
@ -18,6 +18,7 @@ return {
"markdown", "markdown",
"markdown_inline", "markdown_inline",
"php", "php",
"php_only",
"pug", "pug",
"tsx", "tsx",
"twig", "twig",