mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-06-21 08:35:48 +02:00
add: lsp blade dan linter blade
This commit is contained in:
parent
fbc8a53840
commit
4bd718cab7
5 changed files with 37 additions and 1 deletions
|
@ -111,11 +111,39 @@ if pcode.active_php_config then
|
|||
opts = function(_, opts)
|
||||
opts.linters_by_ft = opts.linters_by_ft or {}
|
||||
opts.linters_by_ft.php = { "phpcs" }
|
||||
opts.linters_by_ft.blade = { "tlint" }
|
||||
end,
|
||||
config = function(_, opts)
|
||||
require("lint").linters_by_ft = opts.linters_by_ft
|
||||
end,
|
||||
},
|
||||
{
|
||||
"stevearc/conform.nvim",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
opts = function(_, opts)
|
||||
local psave = pcode.format_on_save or 0
|
||||
opts.formatters_by_ft = opts.formatters_by_ft or {}
|
||||
opts.formatters_by_ft.blade = { "blade-formatter" }
|
||||
if psave == 1 then
|
||||
opts.format_on_save = {
|
||||
timeout_ms = pcode.format_timeout_ms or 500,
|
||||
lsp_fallback = true,
|
||||
}
|
||||
end
|
||||
return opts
|
||||
end,
|
||||
config = function(_, opts)
|
||||
local conform = require("conform")
|
||||
conform.setup(opts)
|
||||
vim.keymap.set({ "n", "v" }, "<leader>lF", function()
|
||||
conform.format({
|
||||
lsp_fallback = true,
|
||||
async = false,
|
||||
timeout_ms = pcode.format_timeout_ms or 500,
|
||||
})
|
||||
end, { desc = "Format file or range (in visual mode)" })
|
||||
end,
|
||||
},
|
||||
{
|
||||
"adalessa/laravel.nvim",
|
||||
dependencies = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue