From c2ceb4838927835d695f3b814cee2b8408a2a5d5 Mon Sep 17 00:00:00 2001 From: Mykhailo Nikiforov Date: Tue, 17 Oct 2023 13:54:25 +0300 Subject: [PATCH 1/2] fix(conform): provide configuration as its expected by lazyvim --- nvim/lua/config/lazy.lua | 2 +- nvim/lua/plugins/lang/markdown.lua | 44 ------------------------------ nvim/lua/plugins/lang/shell.lua | 11 ++++---- 3 files changed, 6 insertions(+), 51 deletions(-) delete mode 100644 nvim/lua/plugins/lang/markdown.lua diff --git a/nvim/lua/config/lazy.lua b/nvim/lua/config/lazy.lua index ba0edb3..1bc6306 100644 --- a/nvim/lua/config/lazy.lua +++ b/nvim/lua/config/lazy.lua @@ -19,10 +19,10 @@ require("lazy").setup({ { import = "lazyvim.plugins.extras.lang.python" }, { import = "lazyvim.plugins.extras.lang.terraform" }, { import = "lazyvim.plugins.extras.lang.yaml" }, + { import = "lazyvim.plugins.extras.lang.markdown" }, { import = "lazyvim.plugins.extras.ui.mini-animate" }, { import = "plugins.tokyonight" }, { import = "plugins.telescope" }, - { import = "plugins.lang.markdown" }, { import = "plugins.lang.shell" }, }, defaults = { diff --git a/nvim/lua/plugins/lang/markdown.lua b/nvim/lua/plugins/lang/markdown.lua deleted file mode 100644 index b358212..0000000 --- a/nvim/lua/plugins/lang/markdown.lua +++ /dev/null @@ -1,44 +0,0 @@ -return { - { - "williamboman/mason.nvim", - opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { - "marksman", - "mdformat", - }) - end, - }, - { - "stevearc/conform.nvim", - event = { "BufWritePre" }, - cmd = { "ConformInfo" }, - opts = { - formatters_by_ft = { - ["md"] = { "mdformat" }, - ["markdown"] = { "mdformat" }, - ["markdown.mdx"] = { "mdformat" }, - }, - format_on_save = { timeout_ms = 500, lsp_fallback = true }, - }, - }, - { - "neovim/nvim-lspconfig", - opts = { - servers = { - marksman = {}, - }, - }, - }, - { - "nvim-treesitter/nvim-treesitter", - opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { - "markdown", - "markdown_inline", - }) - end - end, - }, -} diff --git a/nvim/lua/plugins/lang/shell.lua b/nvim/lua/plugins/lang/shell.lua index 94c2a46..e694b75 100644 --- a/nvim/lua/plugins/lang/shell.lua +++ b/nvim/lua/plugins/lang/shell.lua @@ -19,13 +19,12 @@ return { ["sh"] = { "shfmt" }, ["command"] = { "shfmt" }, }, - format_on_save = { timeout_ms = 500, lsp_fallback = true }, + formatters = { + shfmt = { + prepend_args = { "-i", "2", "-ci" }, + }, + }, }, - config = function(_, opts) - local util = require("conform.util") - util.add_formatter_args(require("conform.formatters.shfmt"), { "-i", "2" }) - require("conform").setup(opts) - end, }, { "neovim/nvim-lspconfig", -- 2.49.1 From 1aef22f64a4dd8af6122c048514196bf7015d4cc Mon Sep 17 00:00:00 2001 From: Mykhailo Nikiforov Date: Tue, 17 Oct 2023 13:57:13 +0300 Subject: [PATCH 2/2] chore(flake): update flake.lock --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index 1f9e80c..41b3976 100644 --- a/flake.lock +++ b/flake.lock @@ -20,11 +20,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1696983906, - "narHash": "sha256-L7GyeErguS7Pg4h8nK0wGlcUTbfUMDu+HMf1UcyP72k=", + "lastModified": 1697226376, + "narHash": "sha256-cumLLb1QOUtWieUnLGqo+ylNt3+fU8Lcv5Zl+tYbRUE=", "owner": "nixos", "repo": "nixpkgs", - "rev": "bd1cde45c77891214131cbbea5b1203e485a9d51", + "rev": "898cb2064b6e98b8c5499f37e81adbdf2925f7c5", "type": "github" }, "original": { -- 2.49.1