feat(lsp): add list.removeCheckbox and link.catUrl commands

removeCheckbox strips the `[ ]` marker (plus its trailing space) from
the current item or every item in the list. catUrl returns the
`file://` URL of the current page's HTML export, mirroring vimwiki's
:VimwikiCatUrl.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-30 17:32:41 -03:00
parent b1155dee6a
commit 8d8d85daf9
3 changed files with 160 additions and 1 deletions
+5 -1
View File
@@ -28,7 +28,11 @@ fn parse(src: &str) -> nuwiki_core::ast::DocumentNode {
#[test]
fn commands_list_advertises_link_helpers() {
let names: Vec<&str> = nuwiki_lsp::commands::COMMANDS.to_vec();
for name in ["nuwiki.link.pasteWikilink", "nuwiki.link.pasteUrl"] {
for name in [
"nuwiki.link.pasteWikilink",
"nuwiki.link.pasteUrl",
"nuwiki.link.catUrl",
] {
assert!(names.contains(&name), "missing: {name}");
}
}