Skip to content

Commit

Permalink
fix: missing steps in README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
shortcuts committed Dec 29, 2022
1 parent db7ea4c commit 6ac7c6f
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 7 deletions.
40 changes: 34 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@
- Linting with [Stylua](/~https://github.com/JohnnyMorganz/StyLua)
- Changelog with [git-chglog](/~https://github.com/git-chglog/git-chglog)

## 📋 Installation

> **Note**:
> This section is only required if you wish to setup the same linter and changelog generator as I do.
- [Install Stylua linter](/~https://github.com/JohnnyMorganz/StyLua#installation)
- [Install git-chglog generator](/~https://github.com/git-chglog/git-chglog)

## ☄ Usage

The following checklist is all your need to do to start writing your first plugin.
Expand All @@ -29,10 +37,10 @@ The following checklist is all your need to do to start writing your first plugi

```sh
# via HTTPs
/~https://github.com/shortcuts/neovim-plugin-boilerplate.git ~/my-awesome-plugin.nvim
git clone /~https://github.com/shortcuts/neovim-plugin-boilerplate.git ~/my-awesome-plugin.nvim

# via SSH
git@github.com:shortcuts/neovim-plugin-boilerplate.git ~/my-awesome-plugin.nvim
git clone git@github.com:shortcuts/neovim-plugin-boilerplate.git ~/my-awesome-plugin.nvim

```

Expand All @@ -41,13 +49,25 @@ git@github.com:shortcuts/neovim-plugin-boilerplate.git ~/my-awesome-plugin.nvim
> **Note**:
> The placeholder names are purposely written with different casing. Make sure to keep it.
#### Go to your plugin folder and open Neovim
#### File names

```sh
mv plugin/YOUR_PLUGIN_NAME.lua plugin/my-awesome-plugin.lua
mv README_TEMPLATE.md README.md

```

#### References

##### Go to the plugin directory and open Neovim:

```sh
cd ~/my-awesome-plugin.nvim && nvim .
```

#### Search and Replace
##### Search and replace placeholder occurrences:

> For Lua and README.md files
```vim
:vimgrep /YourPluginName/ **/*
Expand All @@ -57,12 +77,20 @@ cd ~/my-awesome-plugin.nvim && nvim .
:cfdo %s/your-plugin-name/my-awesome-plugin/g | update
```

> For GitHub action files
```vim
:vimgrep /your-plugin-name/ .github/**
:cfdo %s/your-plugin-name/my-awesome-plugin/g | update
```

### 3 - Code

You can now start writing your plugin, make sure the following commands work:
1. `make deps` to install docs/tests dependencies
2. `make documentation` to generate the documentation
3. `make tests` to run the tests
2. `make lint` to format the code
3. `make documentation` to generate the documentation
4. `make test` to run the tests

Enjoy!

Expand Down
2 changes: 1 addition & 1 deletion lua/your-plugin-name/init.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
local YourPluginName = {}

--- Toggle the plugin by calling the `enable`/`disable` methods respectively.
-- Toggle the plugin by calling the `enable`/`disable` methods respectively.
function YourPluginName.toggle()
-- when the config is not set to the global object, we set it
if YourPluginName.config == nil then
Expand Down

0 comments on commit 6ac7c6f

Please sign in to comment.