aboutsummaryrefslogtreecommitdiff
path: root/nvim/lua/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'nvim/lua/plugins')
-rw-r--r--nvim/lua/plugins/editing.lua2
-rw-r--r--nvim/lua/plugins/format.lua12
2 files changed, 8 insertions, 6 deletions
diff --git a/nvim/lua/plugins/editing.lua b/nvim/lua/plugins/editing.lua
index d1c3447..d2acd8e 100644
--- a/nvim/lua/plugins/editing.lua
+++ b/nvim/lua/plugins/editing.lua
@@ -20,6 +20,6 @@ return {
20 20
21 { 21 {
22 "preservim/vim-markdown", 22 "preservim/vim-markdown",
23 ft = "markdown" 23 ft = "markdown",
24 }, 24 },
25} 25}
diff --git a/nvim/lua/plugins/format.lua b/nvim/lua/plugins/format.lua
index b8b0256..9334465 100644
--- a/nvim/lua/plugins/format.lua
+++ b/nvim/lua/plugins/format.lua
@@ -5,18 +5,17 @@ return {
5 { 5 {
6 "<leader>cf", 6 "<leader>cf",
7 function() 7 function()
8 require("conform").format({ 8 require("conform").format({ async = true })
9 async = true,
10 lsp_fallback = true,
11 })
12 end, 9 end,
13 desc = "Format file", 10 desc = "Format file",
14 }, 11 },
15 }, 12 },
16 opts = { 13 opts = {
17 formatters_by_ft = { 14 formatters_by_ft = {
15 awk = { "gawk" }, -- pkg install gawk
18 bash = { "shfmt" }, 16 bash = { "shfmt" },
19 -- cpp = { "clang_format" }, 17 c = {}, -- clangd
18 cpp = {}, -- clangd
20 javascript = { "prettier" }, 19 javascript = { "prettier" },
21 json = { "jq" }, -- brew install jq, pkg install jq 20 json = { "jq" }, -- brew install jq, pkg install jq
22 lua = { "stylua" }, -- brew install stylua, pkg install stylua 21 lua = { "stylua" }, -- brew install stylua, pkg install stylua
@@ -27,6 +26,9 @@ return {
27 xsd = { "xmllint" }, 26 xsd = { "xmllint" },
28 yaml = { "yamlfmt" }, -- brew install yamlfmt, pkg install yamlfmt 27 yaml = { "yamlfmt" }, -- brew install yamlfmt, pkg install yamlfmt
29 }, 28 },
29 default_format_opts = {
30 lsp_format = "fallback",
31 },
30 }, 32 },
31 33
32 config = function(_, opts) 34 config = function(_, opts)