mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-06-21 08:35:48 +02:00
add: conform ensure instaled
This commit is contained in:
parent
4ead9b7dd3
commit
fecc32cc9e
2 changed files with 10 additions and 3 deletions
|
@ -25,7 +25,7 @@
|
|||
"mason-lspconfig.nvim": { "branch": "main", "commit": "9ae570e206360e47d30b4c35a4550c165f4ea7b7" },
|
||||
"mason-nvim-dap.nvim": { "branch": "main", "commit": "4ba55f9755ebe8297d92c419b90a946123292ae6" },
|
||||
"mason.nvim": { "branch": "main", "commit": "c43eeb5614a09dc17c03a7fb49de2e05de203924" },
|
||||
"mini.indentscope": { "branch": "main", "commit": "56d42be090e8fcc68eda69cfe55af8c5e562300e" },
|
||||
"mini.indentscope": { "branch": "main", "commit": "1222393d9c5e8d92b913ccab6701a7164b21781c" },
|
||||
"neoscroll.nvim": { "branch": "master", "commit": "a731f66f1d39ec6175fd201c5bf849e54abda99c" },
|
||||
"noice.nvim": { "branch": "main", "commit": "03c6a75661e68012e30b0ed81f050358b1e2233c" },
|
||||
"nui.nvim": { "branch": "main", "commit": "a0fd35fcbb4cb479366f1dc5f20145fd718a3733" },
|
||||
|
@ -43,7 +43,7 @@
|
|||
"nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" },
|
||||
"nvim-scrollview": { "branch": "main", "commit": "06563ae0c9928a2df42aefe66f2aed2f2943e32e" },
|
||||
"nvim-tree.lua": { "branch": "master", "commit": "2086e564c4d23fea714e8a6d63b881e551af2f41" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "7ff0b8d3d21b15eb7231fcbd2acfded8987f5efd" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "4ee5fdd666f46fb379302a32750f932d25448d98" },
|
||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "34867c69838078df7d6919b130c0541c0b400c47" },
|
||||
"nvim-ts-autotag": { "branch": "main", "commit": "ddfccbf0df1b9349c2b9e9b17f4afa8f9b6c1ed1" },
|
||||
"nvim-ts-context-commentstring": { "branch": "main", "commit": "cb064386e667def1d241317deed9fd1b38f0dc2e" },
|
||||
|
|
|
@ -6,12 +6,14 @@ end
|
|||
if disable then
|
||||
M = {
|
||||
"stevearc/conform.nvim",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
event = { "BufReadPre", "BufNewFile", "VeryLazy" },
|
||||
opts = function(_, opts)
|
||||
local mason_reg = require("mason-registry")
|
||||
|
||||
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, pcode.null_ls_ensure_installed or {})
|
||||
|
||||
-- add diff langue vs filetype
|
||||
local keymap = {
|
||||
|
@ -111,6 +113,7 @@ if disable then
|
|||
local onsave = pcode.format_on_save or false
|
||||
if onsave then
|
||||
return {
|
||||
ensure_installed = opts.ensure_installed,
|
||||
format_on_save = {
|
||||
lsp_fallback = true,
|
||||
timeout_ms = pcode.format_timeout_ms or 5000,
|
||||
|
@ -120,12 +123,16 @@ if disable then
|
|||
}
|
||||
else
|
||||
return {
|
||||
ensure_installed = opts.ensure_installed,
|
||||
formatters = opts.formatters,
|
||||
formatters_by_ft = opts.formatters_by_ft,
|
||||
}
|
||||
end
|
||||
end,
|
||||
config = function(_, opts)
|
||||
for _, value in pairs(opts.ensure_installed) do
|
||||
require("user.utils.masoncfg").try_install(value)
|
||||
end
|
||||
local conform = require("conform")
|
||||
conform.setup(opts)
|
||||
vim.keymap.set({ "n", "v" }, "<leader>lF", function()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue