Skip to content

Commit

Permalink
docs: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
yujinyuz committed May 11, 2024
1 parent 1b39ea5 commit c7f8386
Showing 1 changed file with 29 additions and 8 deletions.
37 changes: 29 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,44 +2,65 @@

A minimal neovim plugin for taking down notes for git projects and per branch

![gitpad.nvim screenshot](https://user-images.githubusercontent.com/10972027/233791549-0556234c-5cce-45a8-8c35-32f91b2bd001.png)
![gitpad.nvim screenshot](https://github.com/yujinyuz/gitpad.nvim/assets/10972027/516838f5-9e14-4177-9abc-6f71a4b7feac)

## ✨ Features
- Provides a command to toggle the `gitpad.md` file in a floating window, so you can take notes while working on your code.
- Supports creating and toggling a separate `branchpad.md` file for each branch, if desired.
- Provides a per repository / per branch way of note taking while working on your code with the help
of floating windows.
- Supports creating and toggling a separate `{branch}-branchpad.md` file for each branch,
if desired.

## ⚡️ Requirements
- Neovim >= 0.7.2

Disclaimer: Plugin should work fine with Neovim > 0.6.0 but I haven't tested it yet
Disclaimer: Plugin should work fine with most neovim versions but I have not tested yet

## 📦 Installation

Use your favorite plugin manager to install gitpad.nvim. For example, using [lazy.nvim](https://github.com/folke/lazy.nvim):
Use your favorite plugin manager to install gitpad.nvim. For example,
using [lazy.nvim](https://github.com/folke/lazy.nvim):

```lua
{
'yujinyuz/gitpad.nvim',
config = function()
require("gitpad").setup {
require('gitpad').setup {
-- your configuration comes here
-- or leave it empty to use the default settings
-- refer to the configuration section below
},
keys = {
{
'<leader>pp',
function()
require('gitpad').toggle_gitpad()
end,
desc = 'gitpad project',
},
{
'<leader>pb',
function()
require('gitpad').toggle_gitpad_branch()
end,
desc = 'gitpad branch',
},
},
end
}
```

## Configuration
## Configuration

### Setup

gitpad comes with the following defaults:
gitpad.nvim comes with the following defaults:

```lua
{
border = 'single', -- The border style of the floating window. Possible values are `'single'`, `'double'`, `'shadow'`, `'rounded'`, and `''` (no border).
style = '', -- The style of the floating window. Possible values are `'minimal'` (no line numbers, statusline, or sign column. See :help nvim_open_win() '), and `''` (default Neovim style).
dir = vim.fn.stdpath('data') .. '/gitpad', -- The directory where the notes are stored. Possible value is a valid path ie '~/notes'
default_text = nil, -- Leave this nil if you want to use the default text
on_attach = function(bufnr)
-- You can also define a function to be called when the gitpad window is opened, by setting the `on_attach` option:
-- This is just an example
Expand Down

0 comments on commit c7f8386

Please sign in to comment.