kiwi.nvim icon indicating copy to clipboard operation
kiwi.nvim copied to clipboard

Feature request: Manage dangling/unlinked files

Open iameru opened this issue 1 year ago • 5 comments

While I like the minimal approach of this plugin, I think it would be useful to have a mechanism to see unlinked files. Might be that I linked to ./some/cool/project/text.md some months ago but deleted the reference.

I have some Ideas in mind for this feature to be minimal:

  • have one unlinked-articles.md or .unlinked-articles.md in the root of the wiki project
  • have a command which scrapes all *.md files in the project except for unlinked-articles.md
    • scrape all files for [links](./to/some/project/page.md)
    • compare to actually existing files
    • put the result of missing links in a sorted list in unlinked-articles.md with some format like 2024-03-23 [links](./to/some/project/page.md) (with the date being the last modification time of the file as a hint)
  • build a command which unlinks AND deletes the file under cursor (this would be useful independent of this issue

this way one could build the unlinked-articles sometimes and go through and delete what is not needed anymore

iameru avatar Jan 18 '25 10:01 iameru

True. This would be a really useful tool for all the power users. Thanks for the suggestion! If you would like to take this up, you can assign it to yourself. I'll think of the implementation as you described as well.

serenevoid avatar Jan 20 '25 12:01 serenevoid

I don't have much time on my hands and other oss projects. The need for this grows though, as I now use kiwi.nvim daily and already have this situation.

In case I ever find time, could you point me in the right direction to develop lua plugins for nvim and how to test them?

iameru avatar Feb 25 '25 13:02 iameru

Sure I'd be happy to

serenevoid avatar Mar 18 '25 11:03 serenevoid

With all respect and kiwi.nvim is the true inspiration of my neowiki.nvim - come here to share that such action is available in neowiki.nvim through 1 of the 2 days:

  1. a function to scan and clean broken links from current page: send to quickfix or directly remove
  2. when a user decide to remove any wiki-page, it find all broken backlinks: send to quickfix or directly remove

echaya avatar Jul 06 '25 05:07 echaya

Oh this is awesome! Glad to see a new project based on kiwi. Keep up the good work @echaya

serenevoid avatar Jul 06 '25 06:07 serenevoid