如何在Neovim中用null-ls配置phpcbf/phpcsfixer实现2空格缩进?
PHP/Blade 格式化配置问题(基于null-ls)
我已经查阅两款格式化工具的文档,尝试过不同编码风格及参数配置均未成功。以下是我当前的配置代码片段:
local present, null_ls = pcall(require, "null-ls") if not present then return end local b = null_ls.builtins local sources = { --php b.formatting.phpcbf.with({ extra_args = { "--tab-width=2" }, }), -- b.formatting.phpcsfixer.with { -- args = { "--no-interaction", "--quiet", "fix", "$FILENAME", "--using-cache=no" }, -- }, b.formatting.blade_formatter, } null_ls.setup({ debug = true, sources = sources, })
内容的提问来源于stack exchange,提问作者Rafael Cano
相关产品推荐
相关产品推荐

