mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-06-22 17:03:36 +02:00
enc: update modal npm runner
This commit is contained in:
parent
23a8cf07bf
commit
7450625ba8
6 changed files with 588 additions and 161 deletions
|
@ -1,40 +1,43 @@
|
|||
return {
|
||||
"pojokcodeid/auto-conform.nvim",
|
||||
dependencies = {
|
||||
"williamboman/mason.nvim",
|
||||
"stevearc/conform.nvim",
|
||||
},
|
||||
event = "VeryLazy",
|
||||
opts = function(_, opts)
|
||||
opts.formatters = opts.formatters or {}
|
||||
opts.formatters_by_ft = opts.formatters_by_ft or {}
|
||||
opts.ensure_installed = opts.ensure_installed or {}
|
||||
-- vim.list_extend(opts.ensure_installed, { "stylua" })
|
||||
opts.lang_maps = opts.lang_maps or {}
|
||||
opts.name_maps = opts.name_maps or {}
|
||||
opts.add_new = opts.add_new or {}
|
||||
opts.ignore = opts.ignore or {}
|
||||
opts.format_on_save = opts.format_on_save or true
|
||||
opts.format_timeout_ms = opts.format_timeout_ms or 5000
|
||||
end,
|
||||
config = function(_, opts)
|
||||
require("auto-conform").setup(opts)
|
||||
-- other conform config
|
||||
local conform = require("conform")
|
||||
if opts.format_on_save then
|
||||
conform.setup({
|
||||
format_on_save = {
|
||||
lsp_fallback = true,
|
||||
timeout_ms = opts.format_timeout_ms or 5000,
|
||||
},
|
||||
})
|
||||
end
|
||||
vim.keymap.set({ "n", "v" }, "<leader>lF", function()
|
||||
conform.format({
|
||||
lsp_fallback = true,
|
||||
async = false,
|
||||
timeout_ms = opts.format_timeout_ms or 5000,
|
||||
})
|
||||
end, { desc = "Format file or range (in visual mode)" })
|
||||
end,
|
||||
"pojokcodeid/auto-conform.nvim",
|
||||
dependencies = {
|
||||
"williamboman/mason.nvim",
|
||||
"stevearc/conform.nvim",
|
||||
},
|
||||
event = "VeryLazy",
|
||||
opts = function(_, opts)
|
||||
opts.formatters = opts.formatters or {}
|
||||
opts.formatters_by_ft = opts.formatters_by_ft or {}
|
||||
opts.ensure_installed = opts.ensure_installed or {}
|
||||
-- vim.list_extend(opts.ensure_installed, { "stylua" })
|
||||
opts.lang_maps = opts.lang_maps or {}
|
||||
opts.name_maps = opts.name_maps or {}
|
||||
opts.add_new = opts.add_new or {}
|
||||
opts.ignore = opts.ignore or {}
|
||||
opts.format_on_save = opts.format_on_save or true
|
||||
opts.format_timeout_ms = opts.format_timeout_ms or 5000
|
||||
end,
|
||||
config = function(_, opts)
|
||||
require("auto-conform").setup(opts)
|
||||
-- other conform config
|
||||
local conform = require("conform")
|
||||
if opts.format_on_save then
|
||||
conform.setup({
|
||||
format_on_save = {
|
||||
lsp_fallback = true,
|
||||
timeout_ms = opts.format_timeout_ms or 5000,
|
||||
},
|
||||
})
|
||||
end
|
||||
vim.keymap.set({ "n", "v" }, "<leader>lF", function()
|
||||
conform.format({
|
||||
lsp_fallback = true,
|
||||
async = false,
|
||||
timeout_ms = opts.format_timeout_ms or 5000,
|
||||
})
|
||||
end, { desc = "Format file or range (in visual mode)" })
|
||||
end,
|
||||
keys = {
|
||||
{ "<leader>l", "", desc = " Lsp" },
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue