serenevoid / kiwi.nvim

A stripped down VimWiki for Neovim
https://serenevoid.github.io/blog/my-note-taking-plugin
GNU General Public License v3.0
177 stars 9 forks source link

Specify use of path as diary and/or wiki #2

Closed clanktron closed 9 months ago

clanktron commented 11 months ago

I'd love the ability to have my diary and wiki in two different places. Meaning I'd like to specify in my config whether or not a filepath is meant to be used for a wiki or diary or both.

Since this is meant to be a stripped down version of vimwiki I understand features are supposed to be minimal, but I feel like toggling an existing feature on or off is still in scope.

I'm pretty comfortable with lua and might draft a PR adding this functionality if this seems desirable to @serenevoid and/or other users.

Some examples of how this might look in the lua config.

booleans for each:

require('kiwi').setup({
  {
    name = "personal",
    path = "/home/username/personal-wiki",
    -- for diary and wiki (current default)
    wiki = true,
    diary = true
  },
  {
    name = "work",
    path = "/other/wiki/path"
    -- for just wiki
    wiki = true,
    diary = false
  },
  {
    name = "work",
    path = "/other/diary/path"
    -- for just diary
    wiki = false,
    diary = true
  }
})

OR

lua table with options:

require('kiwi').setup({
  {
    name = "personal",
    path = "/home/username/personal-wiki",
    -- for diary and wiki (current default)
    usage = { "diary", "wiki" }
  },
  {
    name = "work",
    path = "/other/wiki/path"
    -- for just wiki
    usage = { "wiki" }
  },
  {
    name = "work",
    path = "/other/diary/path"
    -- for just diary
    usage = { "diary" }
  }
})
serenevoid commented 11 months ago

Thank you for showing interest in kiwi.nvim. I myself had the same thought about just implementing the journal and wiki as two separate plugins when I started. But I combined it anyway since I thought I could just use the same format VimWiki uses since it works for almost all the people using it.

I have a few points since you're interested in bringing this feature to life.

  1. What happens if a user chooses to use a directory as just a diary? Will the folder structure be followed, like ..../wiki/diary/ ? Or will it just be ..../diary/? This was one thing that confused me back then. I couldn't decide.
  2. I like the look of the first first case where we specify things with Boolean. By default, both wiki and diary can be true, like in VimWiki. But if the user wants to turn off one of the features, they can add disable it in the config. It adds less overhead to the end-user.
  3. Do you think it can affect any of the existing wiki if we add this feature? I don't think it will, but just wanted to see if I missed any edge cases.

Once again, thank you for the offer to help in developing this plugin. I hope this plugin gets useful to more people in the neovim community.

serenevoid commented 9 months ago

I have been thinking about this and I understood that most of the users I know barely use the diary feature of the plugin. Also it is not aligning with the philosophy of "stripped" VimWiki. Since it can stay as a minimal note taking plugin, I'm thinking about removing the diary feature and then adding a few more improvements to the wiki part. I hope that's okay. Just commenting here so that everyone can see.