Automatically chooses whether to create a new link or go to an existing
file, depending on the existence of a link in the current context (i.e.
under the cursor or in selection).
Should prepare the differentiation between a 'new' link and linking an
existing zetttel -- one is 'new_link' and one just 'makes_link' to
something else.
Switched out manual BIGNUMBER creation for the lua inbuilt `math.huge`.
Refactored `open_selected` a tiny bit in preparation for automatic link
creation.
Renamed to 'files.lua' since it is the only module actively working on
the underlying filesystem so far -- gathering existing files and zettel
in the directories.
Action module contains the interactions the user can take directly with
the zettelkasten, and which in turn act on the editor.
First action to be taken is the opening of zettel links.
`action.open(mytext)` allows the user to pass in a md/wikilink-formatted
string from which the function will open the first found in the current
buffer.
`action.open_selected()` does the same, but looks at the cursor context
to get its string (the link under current cursor position as of now; in
the future probably also the next link on current line, and the first
link in visual selection)
Options were previously set ad-hoc in the initialize function, but
re-set and overwritten at various places.
Options now live in one central module (options.lua), where they
directly access the neovim options set, and re-access them on any run.
That means options can be changed while the plugin is running and it
will use their newer versions, without requiring any re-initialization.
Moved list functionality into separate file list.lua.
Moved zettelkasten options from local variables to table-scoped
variables, initialized in ZK.init().