1
0

Move lua code to lua folder

This commit is contained in:
Stefan Rakel
2023-10-27 10:06:08 +02:00
parent 47c9f1eb74
commit 3b449c72a3

View File

@@ -20,8 +20,17 @@
-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-- SOFTWARE.
-- Initialize patterns
local prefixPatterns = {"%-", "%*", "#+", "%->", "=>", "%d+%."}
local skipPatterns = {"%-", "%*", "%->", "=>", "%d+%."}
if vim.g.checkbox_prefixPatterns then
prefixPatterns = vim.g.checkbox_prefixPatterns
end
if vim.g.checkbox_skipPatterns then
prefixPatterns = vim.g.checkbox_skipPatterns
end
-- returns indentation level, checked status and text if the line has a checbox
-- nil otherwise
local function getCheckboxFromLine(lineNum)
@@ -174,4 +183,7 @@ local function switchAndUpdateCheckbox()
end
end
vim.keymap.set("n", "<leader>x", switchAndUpdateCheckbox)
return {
checkbox = switchAndUpdateCheckbox
}