diff --git a/nvim/lazy-lock.json b/nvim/lazy-lock.json index 6e584ce..364976d 100644 --- a/nvim/lazy-lock.json +++ b/nvim/lazy-lock.json @@ -15,7 +15,7 @@ "flash.nvim": { "branch": "main", "commit": "34c7be146a91fec3555c33fe89c7d643f6ef5cf1" }, "friendly-snippets": { "branch": "main", "commit": "00ebcaa159e817150bd83bfe2d51fa3b3377d5c4" }, "fzf-lua": { "branch": "main", "commit": "73bdec9ac5da578376bdc5a705ea80a19baa4942" }, - "gitsigns.nvim": { "branch": "main", "commit": "564849a17bf5c5569e0bae98c8328de9c7a1ed29" }, + "gitsigns.nvim": { "branch": "main", "commit": "58bd9e98d8e3c5a1c98af312e85247ee1afd3ed2" }, "grug-far.nvim": { "branch": "main", "commit": "3e491ca05c50f87d02543adb010aed9dfb1e12c1" }, "inc-rename.nvim": { "branch": "main", "commit": "8ba77017ca468f3029bf88ef409c2d20476ea66b" }, "indent-blankline.nvim": { "branch": "master", "commit": "65e20ab94a26d0e14acac5049b8641336819dfc7" }, @@ -24,8 +24,8 @@ "lualine.nvim": { "branch": "master", "commit": "544dd1583f9bb27b393f598475c89809c4d5e86b" }, "luvit-meta": { "branch": "main", "commit": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60" }, "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, - "markdown.nvim": { "branch": "main", "commit": "9cdfae29259f2c7bef3c9c13d9e09b506020d5ca" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "fd69d5c782a28420d51b648a3d7fe88df569d391" }, + "markdown.nvim": { "branch": "main", "commit": "aeb5cec617c3bd5738ab82ba2c3f9ccdc27656c2" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "62360f061d45177dda8afc1b0fd1327328540301" }, "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, "mini.ai": { "branch": "main", "commit": "45587078f323eaf41b9f701bbc04f8d1ab008979" }, "mini.animate": { "branch": "main", "commit": "320fb35460238c436407cd779f63abad98e84870" }, @@ -45,7 +45,7 @@ "nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" }, "nvim-snippets": { "branch": "main", "commit": "56b4052f71220144689caaa2e5b66222ba5661eb" }, "nvim-treesitter": { "branch": "master", "commit": "d7353a6b72008b38aa873ace49aa97bea257941b" }, - "nvim-treesitter-textobjects": { "branch": "master", "commit": "5a5458bc6202d5ae5c04331763a1bce0265a6a3a" }, + "nvim-treesitter-textobjects": { "branch": "master", "commit": "d45a1150580745a1905d74185b544af3ea6f709d" }, "nvim-ts-autotag": { "branch": "main", "commit": "dc5e1687ab76ee02e0f11c5ce137f530b36e98b3" }, "persistence.nvim": { "branch": "main", "commit": "f6aad7dde7fcf54148ccfc5f622c6d5badd0cc3d" }, "plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" }, diff --git a/nvim/lua/plugins/markdownpreview.lua b/nvim/lua/plugins/markdownpreview.lua new file mode 100644 index 0000000..9c52ab5 --- /dev/null +++ b/nvim/lua/plugins/markdownpreview.lua @@ -0,0 +1,21 @@ +return { + { + -- Install markdown preview, use npx if available. + "iamcco/markdown-preview.nvim", + cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" }, + ft = { "markdown" }, + build = function(plugin) + if vim.fn.executable("npx") then + vim.cmd("!cd " .. plugin.dir .. " && cd app && npx --yes yarn install") + else + vim.cmd([[Lazy load markdown-preview.nvim]]) + vim.fn["mkdp#util#install"]() + end + end, + init = function() + if vim.fn.executable("npx") then + vim.g.mkdp_filetypes = { "markdown" } + end + end, + }, +}