Skip to content

Commit

Permalink
add docu in readme to install/setup using vim-plug
Browse files Browse the repository at this point in the history
  • Loading branch information
fabridamicelli committed May 2, 2024
1 parent 3cfc000 commit fbdd215
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,15 @@ return {
}
```

Using [vim-plug](https://github.com/junegunn/vim-plug)

```viml
Plug 'fabridamicelli/cronex.nvim'
lua <<EOF
require("cronex").setup({})
EOF
```

## Usage
Calling setup makes the explainer available and set explanations when leaving insert mode.
Expand Down Expand Up @@ -102,6 +111,18 @@ require("cronex").setup({
})
```

To embed the above configuration code snippet in a `.vim` file
(for example in `init.vim`),
wrap it in `lua << EOF code-snippet EOF`:

```lua
lua << EOF
require('cronex').setup{
-- ...
}
EOF
```

### Extractor
Logic of the default extractor can be found here in `/cronex/cron_from_line.lua`.
Default extractor searches for at most 1 expression per line of length 7, 6 or 5 (in that order).
Expand Down

0 comments on commit fbdd215

Please sign in to comment.