diff --git a/nvim/lua/settings/lazy/plugins/nvim-lint.lua b/nvim/lua/settings/lazy/plugins/nvim-lint.lua index 26a201b..b0c1f63 100644 --- a/nvim/lua/settings/lazy/plugins/nvim-lint.lua +++ b/nvim/lua/settings/lazy/plugins/nvim-lint.lua @@ -8,14 +8,33 @@ return { local lint = require("lint") vim.api.nvim_create_autocmd( - { "TextChanged", "TextChangedI", "BufEnter", "BufReadPre", "BufWritePost", "CursorHold", "CursorHoldI" }, { - callback = function() - lint.try_lint() - end, - }) + { "TextChanged", "TextChangedI", "BufEnter", "BufReadPre", "BufWritePost", "CursorHold", "CursorHoldI" }, + { + callback = function() + lint.try_lint() + end, + } + ) end, config = function() local lint = require("lint") + local phpcs = lint.linters.phpcs + local phpstan = lint.linters.phpstan + + phpcs.args = { + "-q", + -- <- Add a new parameter here + "--standard=PSR12", + "--report=json", + "-", + } + + phpstan.args = { + "analyze", + "--error-format=json", + "--no-progress", + "--level-max" + } lint.linters_by_ft = { lua = { "luacheck" }, @@ -26,11 +45,11 @@ return { vue = { "eslint" }, sh = { "shellcheck" }, fish = { "fish" }, - json = { "jsonlint", }, + json = { "jsonlint" }, markdown = { "markdownlint" }, php = { "php", "phpcs", "phpstan" }, css = { "stylelint" }, - yaml = { "yamllint" } + yaml = { "yamllint" }, } - end + end, }