diff --git a/README.md b/README.md index aaefd4a..4de0b1a 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ your `init.lua`: require("esqueleto").setup( { -- Directory where templates are stored - directory = "~/.config/nvim/skeletons/", + directories = {"~/.config/nvim/skeletons/"} -- Patterns to match when creating new file -- Can be either (i) file names or (ii) file types. @@ -55,6 +55,14 @@ require("esqueleto").setup( For more information, refer to docs (`:h esqueleto`). For example skeleton files, check [the `skeletons` folder](skeletons/). +The default options of `esqueleto` are +~~~lua + { + directories = { vim.fn.stdpath("config") .. "/skeletons" }, + patterns = { } + } +~~~ + ## Roadmap `esqueleto.nvim` is in its infancy (therefore, expect breaking changes from time to time). @@ -62,7 +70,6 @@ I intend on extending this plugin with some functionality I would like for a tem manager. At some point `esqueleto.nvim` should have the following (ordered by priority): - Template creation interface -- Handle multiple template folders - Project specific templates - Template preview via [Telescope](https://github.com/nvim-telescope/telescope.nvim) - User customizable prompt and insertion rules diff --git a/doc/esqueleto.txt b/doc/esqueleto.txt index 6b9100c..d3a77ad 100644 --- a/doc/esqueleto.txt +++ b/doc/esqueleto.txt @@ -42,7 +42,7 @@ To setup |esqueleto|, tow things must be done: First, |esqueleto| setup in the `init.lua` file is as follows: > require('esqueleto').setup({ -- Default templates directory - directory = '~/.config/nvim/skeleton/' + directories = { '~/.config/nvim/skeleton/' }, -- Patterns to detect for template insetion (empty by default, -- adding as an example) @@ -114,11 +114,11 @@ setup({patterns}, {directory}) Setup for specific file {patterns} using the templates inside a given {directory}. - Example: > + Defaults: > esqueleto.setup( { - patterns = { 'README.md', 'python' }, - directory = '~/.config/nvim/skeleton/' + directories = {vim.fn.stdpath("config") .. "/skeletons"}, + patterns = { }, } ) <