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

Can't save file on Windows #17

Closed vLeov closed 5 months ago

vLeov commented 5 months ago

So i installed the plugin with lazy.nvim:

{
    'serenevoid/kiwi.nvim',
    dependencies = {
        "nvim-lua/plenary.nvim"
    },
    opts = {
        {
            name = "wiki",
            path = "C:\\Users\\leogo\\vimwiki"
        },
    },
    keys = {
        { "<leader>www", ":lua require(\"kiwi\").open_wiki_index()<cr>", desc = "Open Wiki index" },
        { "<leader>wp", ":lua require(\"kiwi\").open_wiki_index(\"personal\")<cr>", desc = "Open index of personal wiki" },
        { "T", ":lua require(\"kiwi\").todo.toggle()<cr>", desc = "Toggle Markdown Task" }
    },
    lazy = true
  },

My Problem is when i create a new markdown file and wont to safe it, it says: "~\vimwikiC:/Users/leogo/vimwiki/test.md" E212: Can't open file for writing: no such file or directory

Maybe someone can help me :)

serenevoid commented 5 months ago

Change the second keymap to { "<leader>wp", ":lua require(\"kiwi\").open_wiki_index(\"wiki\")<cr>", desc = "Open index of personal wiki" },

That is, the string passed to the open_wiki_index() should be the name of your wiki. Please see if this works and let me know.

vLeov commented 5 months ago

I replaced the keymap but i doesnt change. I can go to my index.md but the Problem is when i want to create a new .md file for example test.md i cant safe the test.md file because of this error:

"~\vimwikiC:/Users/leogo/vimwiki/test.md"
E212: Can't open file for writing: no such file or directory
serenevoid commented 5 months ago

Can you post the details of the system you are using? Windows or linux? WSL or Git Bash or powershell? (If using windows)

vLeov commented 5 months ago

i use windows with poweshell

serenevoid commented 5 months ago

Can you check if it works now? Remember to update to the latest changes

vLeov commented 5 months ago

Yoo, it works now thank you :)

serenevoid commented 5 months ago

Awesome!