From 9478c57e16516cf971fccf47f9d2e49f715708e0 Mon Sep 17 00:00:00 2001 From: Hawtian Wang Date: Wed, 29 Nov 2023 15:03:40 +0800 Subject: [PATCH] fix: todo-comments regex --- src/conf/plugins/edit/todo-comments-nvim.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/conf/plugins/edit/todo-comments-nvim.ts b/src/conf/plugins/edit/todo-comments-nvim.ts index 1d371e0b..d6b7d33d 100644 --- a/src/conf/plugins/edit/todo-comments-nvim.ts +++ b/src/conf/plugins/edit/todo-comments-nvim.ts @@ -34,7 +34,7 @@ function actions() { id: "todo-comments.goto-next-todo", title: "Goto next todo", callback: () => { - luaRequire("todo-comments").just_next(); + luaRequire("todo-comments").jump_next(); }, keys: "]t", description: "jump-next-todo", @@ -43,7 +43,7 @@ function actions() { id: "todo-comments.goto-previous-todo", title: "Goto previous todo", callback: () => { - luaRequire("todo-comments").just_prev(); + luaRequire("todo-comments").jump_prev(); }, keys: "[t", description: "jump-prev-todo", @@ -56,14 +56,17 @@ const spec: PluginOpts = { lazy: { event: "BufReadPost", cmd: ["TodoTrouble", "TodoTelescope"], + dependencies: ["nvim-lua/plenary.nvim"], opts: { - highlight: { keyword: "wide_bg", pattern: "(KEYWORDS)([^)]*):" }, - search: { pattern: "(KEYWORDS)([^)]*):" }, + highlight: { keyword: "wide_bg", pattern: "(KEYWORDS)\\([^)]*\\):" }, + search: { pattern: "(KEYWORDS)\\([^)]*\\):" }, keywords: { HACK: { alt: ["UNSAFE"] }, }, }, - config: true, + config: (_, opts) => { + luaRequire("todo-comments").setup(opts); + }, }, };