mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-06-24 09:48:51 +02:00
enc: default config for php developer
This commit is contained in:
parent
0d0de22c7b
commit
32cf770bbd
4 changed files with 49 additions and 17 deletions
|
@ -1,6 +1,39 @@
|
|||
local M = {}
|
||||
if pcode.active_php_config then
|
||||
M = {
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = function(_, opts)
|
||||
opts.ensure_installed = opts.ensure_installed or {}
|
||||
vim.list_extend(opts.ensure_installed, { "html", "php_only", "php", "bash", "blade" })
|
||||
end,
|
||||
},
|
||||
{
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
opts = function(_, opts)
|
||||
opts.ensure_installed = opts.ensure_installed or {}
|
||||
vim.list_extend(opts.ensure_installed, { "intelephense", "stimulus_ls" })
|
||||
end,
|
||||
},
|
||||
{
|
||||
"stevearc/conform.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = function(_, opts)
|
||||
local package = "php-cs-fixer"
|
||||
require("user.utils.masoncfg").try_install(package)
|
||||
require("user.utils.masoncfg").try_install("blade-formatter")
|
||||
opts.formatters_by_ft.php = { "easy-coding-standard" }
|
||||
opts.formatters_by_ft.blade = { "blade-formatter" }
|
||||
end,
|
||||
},
|
||||
{
|
||||
"mfussenegger/nvim-lint",
|
||||
opts = function(_, opts)
|
||||
opts.linters_by_ft = opts.linters_by_ft or {}
|
||||
require("user.utils.masoncfg").try_install("phpcs")
|
||||
opts.linters_by_ft.php = { "phpcs" }
|
||||
end,
|
||||
},
|
||||
{
|
||||
"rcarriga/nvim-dap-ui",
|
||||
lazy = true,
|
||||
|
|
|
@ -69,17 +69,17 @@ if pcode.active_javascript_config.active then
|
|||
table.insert(pcode.null_ls_ensure_installed, "prettier")
|
||||
end
|
||||
-- run if php config true
|
||||
if pcode.active_php_config then
|
||||
local lst_ts = { "html", "php_only", "php", "bash", "blade" }
|
||||
for _, ts in pairs(lst_ts) do
|
||||
table.insert(pcode.treesitter_ensure_installed, ts)
|
||||
end
|
||||
table.insert(pcode.mason_ensure_installed, "intelephense")
|
||||
table.insert(pcode.mason_ensure_installed, "stimulus_ls")
|
||||
table.insert(pcode.null_ls_ensure_installed, "php-cs-fixer")
|
||||
table.insert(pcode.null_ls_ensure_installed, "blade_formatter")
|
||||
table.insert(pcode.null_ls_ensure_installed, "phpcs")
|
||||
end
|
||||
-- if pcode.active_php_config then
|
||||
-- local lst_ts = { "html", "php_only", "php", "bash", "blade" }
|
||||
-- for _, ts in pairs(lst_ts) do
|
||||
-- table.insert(pcode.treesitter_ensure_installed, ts)
|
||||
-- end
|
||||
-- table.insert(pcode.mason_ensure_installed, "intelephense")
|
||||
-- table.insert(pcode.mason_ensure_installed, "stimulus_ls")
|
||||
-- table.insert(pcode.null_ls_ensure_installed, "php-cs-fixer")
|
||||
-- table.insert(pcode.null_ls_ensure_installed, "blade_formatter")
|
||||
-- table.insert(pcode.null_ls_ensure_installed, "phpcs")
|
||||
-- end
|
||||
-- run if golang config true
|
||||
-- if pcode.active_golang_config then
|
||||
-- local lst_ts = { "go", "gomod", "gosum", "gotmpl", "gowork" }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue