FIRST COMMIT.
I refactored the functions to an API module so that structure is cleaner and easily maintainable: if more workflows are added they can go here (CreateGistFromMultipleFiles may go in create.lua, or ListGistsFromUser in list.lua or something else).
Now the init.lua file holds the plugin option and the setup function which the user need to call if they want to change the default options.
The advantage of having the API folder is that in the future wrappers can be added around the functions so that someone can reference them via :lua require("gist.api.create").from_buffer(bufnr) instead of the normal flow via CreateGist etc.
SECOND COMMIT.
I added the MIT license file
THIRD COMMIT.
I added to the options of the plugin setup the possibility to customize the mapping that I set up in ListGists when multiple files are present in a gist and one wishes to cycle between them.
Quite a big PR actually.
FIRST COMMIT. I refactored the functions to an API module so that structure is cleaner and easily maintainable: if more workflows are added they can go here (
CreateGistFromMultipleFiles
may go increate.lua
, orListGistsFromUser
inlist.lua
or something else). Now theinit.lua
file holds the plugin option and the setup function which the user need to call if they want to change the default options. The advantage of having the API folder is that in the future wrappers can be added around the functions so that someone can reference them via:lua require("gist.api.create").from_buffer(bufnr)
instead of the normal flow viaCreateGist
etc.SECOND COMMIT. I added the MIT license file
THIRD COMMIT. I added to the options of the plugin setup the possibility to customize the mapping that I set up in
ListGists
when multiple files are present in a gist and one wishes to cycle between them.