Skip to content

Commit

Permalink
docs(README): directory -> directories
Browse files Browse the repository at this point in the history
  • Loading branch information
cvigilv committed Jan 3, 2023
1 parent f0d50de commit 8997db4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -55,14 +55,21 @@ 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).
I intend on extending this plugin with some functionality I would like for a template
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
Expand Down
8 changes: 4 additions & 4 deletions doc/esqueleto.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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 = { },
}
)
<
Expand Down

0 comments on commit 8997db4

Please sign in to comment.