From 516900c4100271f2da73090a2267b92d9677a3f9 Mon Sep 17 00:00:00 2001 From: phanium Date: Fri, 8 Mar 2024 17:44:44 +0800 Subject: [PATCH 1/2] doc: update README.md --- README.md | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index ab04f7a..3d4d7c0 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,20 @@ [![CI](https://github.com/phanen/toggle-checkbox.nvim/actions/workflows/ci.yml/badge.svg)](https://github.com/phanen/toggle-checkbox.nvim/actions/workflows/ci.yml) -# toggle-checkbox.nvim +# mder.nvim -A Neovim plugin for checking and unchecking Markdown checkboxes, written in Lua. - -Inspired by [jkramer/vim-checkbox](https://github.com/jkramer/vim-checkbox). - - -## install - -use `lazy.nvim` ```lua { - "phanen/toggle-checkbox.nvim", + "phanen/mder.nvim", ft = "markdown", - keys = { { mode = { "n", "x" }, "", "lua require('toggle-checkbox').toggle()" }, }, - opts = {}, + config = function() + au("Filetype", { + pattern = { "markdown" }, + callback = function() + map({ "n", "x" }, "", require("mder").line, { buffer = 0 }) + map("x", "", require("mder").codeblock, { buffer = 0 }) + map("n", "o", require("mder").listdn, { expr = true, buffer = 0 }) + map("n", "O", require("mder").listup, { expr = true, buffer = 0 }) + end, + }) + end, }, ``` From 7a4b73a8b11ce0f506ba9e47077aa1ab42eb538f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 8 Mar 2024 09:46:34 +0000 Subject: [PATCH 2/2] chore(build): auto-generate vimdoc --- doc/mder.nvim.txt | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/doc/mder.nvim.txt b/doc/mder.nvim.txt index 49f2ae6..30be368 100644 --- a/doc/mder.nvim.txt +++ b/doc/mder.nvim.txt @@ -3,26 +3,24 @@ ============================================================================== Table of Contents *mder.nvim-table-of-contents* - - install |mder.nvim-install| # -toggle-checkbox.nvim - -A Neovim plugin for checking and unchecking Markdown checkboxes, written in -Lua. - -Inspired by jkramer/vim-checkbox . - - -INSTALL *mder.nvim-install* - -use `lazy.nvim` +mder.nvim >lua { - "phanen/toggle-checkbox.nvim", + "phanen/mder.nvim", ft = "markdown", - keys = { { mode = { "n", "x" }, "", "lua require('toggle-checkbox').toggle()" }, }, - opts = {}, + config = function() + au("Filetype", { + pattern = { "markdown" }, + callback = function() + map({ "n", "x" }, "", require("mder").line, { buffer = 0 }) + map("x", "", require("mder").codeblock, { buffer = 0 }) + map("n", "o", require("mder").listdn, { expr = true, buffer = 0 }) + map("n", "O", require("mder").listup, { expr = true, buffer = 0 }) + end, + }) + end, }, <