diff --git a/lazy-lock.json b/lazy-lock.json index ed36629..1ad3ac6 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -19,6 +19,7 @@ "friendly-snippets": { "branch": "main", "commit": "682157939e57bd6a2c86277dfd4d6fbfce63dbac" }, "gitsigns.nvim": { "branch": "main", "commit": "0b04035bb7b3c83e999b9676e2fb46fd0aa9f910" }, "indent-blankline.nvim": { "branch": "master", "commit": "65e20ab94a26d0e14acac5049b8641336819dfc7" }, + "laravel.nvim": { "branch": "main", "commit": "8aaf614b5c8fc045f75ebc2ba69d68e33847b06d" }, "lazy.nvim": { "branch": "main", "commit": "ec95702ae617308df35f35ad93c469c86d47346f" }, "lsp-progress.nvim": { "branch": "main", "commit": "55a04895ea20c365b670051a3128265d43bdfa3d" }, "lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" }, @@ -28,17 +29,14 @@ "mini.indentscope": { "branch": "main", "commit": "56d42be090e8fcc68eda69cfe55af8c5e562300e" }, "neoscroll.nvim": { "branch": "master", "commit": "a731f66f1d39ec6175fd201c5bf849e54abda99c" }, "neotest": { "branch": "master", "commit": "f30bab1faef13d47f3905e065215c96a42d075ad" }, - "neotest-golang": { "branch": "main", "commit": "b31607b6936f7965eb14355e7f4f2ac8d71f820a" }, "neotest-java": { "branch": "main", "commit": "320f31c71b183f2c584198f33f93542fd0e5a768" }, - "neotest-plenary": { "branch": "master", "commit": "dcaf5ed67a9e28a246e9783319e5aa6c9ea1c584" }, - "neotest-vim-test": { "branch": "master", "commit": "75c4228882ae4883b11bfce9b8383e637eb44192" }, + "neotest-phpunit": { "branch": "main", "commit": "baae8dfa0a3aaacd9f0bb6845d6348f5bcdc48bb" }, "noice.nvim": { "branch": "main", "commit": "03c6a75661e68012e30b0ed81f050358b1e2233c" }, "nui.nvim": { "branch": "main", "commit": "a0fd35fcbb4cb479366f1dc5f20145fd718a3733" }, "nvim-autopairs": { "branch": "master", "commit": "c15de7e7981f1111642e7e53799e1211d4606cb9" }, "nvim-cmp": { "branch": "main", "commit": "a110e12d0b58eefcf5b771f533fc2cf3050680ac" }, "nvim-colorizer.lua": { "branch": "master", "commit": "85855b38011114929f4058efc97af1059ab3e41d" }, "nvim-dap": { "branch": "master", "commit": "5ba8ceace596360321cf33fa4b56d9d46e057ce9" }, - "nvim-dap-go": { "branch": "main", "commit": "a0c5a2b991d7e9304a9a032cf177e22a4b0acda1" }, "nvim-dap-ui": { "branch": "master", "commit": "f7d75cca202b52a60c520ec7b1ec3414d6e77b0f" }, "nvim-dap-virtual-text": { "branch": "master", "commit": "d7c695ea39542f6da94ee4d66176f5d660ab0a77" }, "nvim-jdtls": { "branch": "master", "commit": "a5c6f38f8151d7b4f5b32c005a95022fa66f4c9d" }, @@ -68,6 +66,7 @@ "vim-startuptime": { "branch": "master", "commit": "97a88e688482a09c3c4b777d07b509b328a5ec29" }, "vim-visual-multi": { "branch": "master", "commit": "b84a6d42c1c10678928b0bf8327f378c8bc8af5a" }, "virt-column.nvim": { "branch": "master", "commit": "b62b4ef0774d19452d4ed18e473e824c7a756f2f" }, + "vscode-php-debug": { "branch": "main", "commit": "3025d1f01b5b7725e7c1c213d63f3de45f0534b3" }, "which-key.nvim": { "branch": "main", "commit": "0539da005b98b02cf730c1d9da82b8e8edb1c2d2" }, "yanky.nvim": { "branch": "main", "commit": "9268018e92d02650a94e39dd5f5903c542f7ea11" } } \ No newline at end of file diff --git a/lua/custom/default.lua b/lua/custom/default.lua index 36db02e..570846b 100644 --- a/lua/custom/default.lua +++ b/lua/custom/default.lua @@ -167,8 +167,8 @@ pcode.active_javascript_config = { jest_command = "npm test -- ", jest_config = "jest.config.mjs", } -pcode.active_php_config = false -pcode.active_golang_config = true +pcode.active_php_config = true +pcode.active_golang_config = false pcode.active_python_config = false pcode.active_cpp_config = false pcode.active_java_config = { diff --git a/lua/plugins/phpcfg.lua b/lua/plugins/phpcfg.lua index bc46a45..87a8484 100644 --- a/lua/plugins/phpcfg.lua +++ b/lua/plugins/phpcfg.lua @@ -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, diff --git a/lua/plugins/themes/_globalvar.lua b/lua/plugins/themes/_globalvar.lua index 2d515c5..16c5eec 100644 --- a/lua/plugins/themes/_globalvar.lua +++ b/lua/plugins/themes/_globalvar.lua @@ -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" }