mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-07-10 01:14:41 +02:00
feat(conform): added new keymap (leader-cF) to format injected languages
This commit is contained in:
parent
7c5a458761
commit
86d3694672
1 changed files with 10 additions and 0 deletions
|
@ -4,6 +4,16 @@ return {
|
||||||
dependencies = { "mason.nvim" },
|
dependencies = { "mason.nvim" },
|
||||||
lazy = true,
|
lazy = true,
|
||||||
cmd = "ConformInfo",
|
cmd = "ConformInfo",
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
"<leader>cF",
|
||||||
|
function()
|
||||||
|
require("conform").format({ formatters = { "injected" } })
|
||||||
|
end,
|
||||||
|
mode = { "n", "v" },
|
||||||
|
desc = "Format Injected Langs",
|
||||||
|
},
|
||||||
|
},
|
||||||
init = function()
|
init = function()
|
||||||
vim.o.formatexpr = "v:lua.require'conform'.formatexpr()"
|
vim.o.formatexpr = "v:lua.require'conform'.formatexpr()"
|
||||||
-- Install the conform formatter on VeryLazy
|
-- Install the conform formatter on VeryLazy
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue