Furkanzmc / zettelkasten.nvim

A Vim Philosophy Oriented Zettelkasten Note Taking Plugin
The Unlicense
227 stars 10 forks source link

Unable to setlocal option: 'isfname', which is a global option #13

Closed lukamanitta closed 2 years ago

lukamanitta commented 2 years ago

If a markdown file is opened with this plugin installed, the following error appears (both w/ and w/o custom setup)

Error detected while processing /home/luka/.local/share/nvim/site/pack/packer/start/zettelkasten.nvim/ftplugin/markdown.lua:
E5113: Error while calling lua chunk: vim/_meta.lua:164: Unable to setlocal option: 'isfname', which is a global option.
stack traceback:
    [C]: in function 'error'
    vim/_meta.lua:164: in function 'set_scoped_option'
    vim/_meta.lua:682: in function 'append'
    ...ack/packer/start/zettelkasten.nvim/ftplugin/markdown.lua:11: in main chunk
Error detected while processing FileType Autocommands for "markdown":
E5108: Error executing lua ...m/site/pack/packer/start/packer.nvim/lua/packer/load.lua:165: Vim(echomsg):E114: Missing quote: "Error in packer_compiled: ...m/site/pack/packer/start/packer.nvim/lua/packer/load.lua:112: Vim(runtime):E5113: Error while calling lua chunk: vim/_meta.lua:164: Unable to setlocal option: 'isfname', which is a global option.
stack traceback:
    [C]: in function 'cmd'
    ...m/site/pack/packer/start/packer.nvim/lua/packer/load.lua:165: in function <...m/site/pack/packer/start/packer.nvim/lua/packer/load.lua:161>
    [string ":lua"]:1: in main chunk

This error also occurs when :ZkNew is called, and the new note is not created.

I'm also getting E13: File exists (add ! to override) (caused by read errors), for files in my notes_path. This magically goes away when the plugin is disabled. For some reason, this isn't occurring for files in a new notes_path, but continues to occur in the old directory? Very confusing but might be related to the above issue.

In Neovim 0.6.1

Furkanzmc commented 2 years ago

Just pushed a fix for the isfname option. I'm not sure why the second error is happening but it may very well be related to the isfname error since the execution is interrupted there. Let me know if you still get the error after fetching latest master.

lukamanitta commented 2 years ago

All fixed! Thank you very much, excited to start using the plugin for real now!