|
2 | 2 |
|
3 | 3 | A minimal neovim plugin for taking down notes for git projects and per branch
|
4 | 4 |
|
5 |
| - |
| 5 | + |
6 | 6 |
|
7 | 7 | ## ✨ Features
|
8 |
| -- Provides a command to toggle the `gitpad.md` file in a floating window, so you can take notes while working on your code. |
9 |
| -- Supports creating and toggling a separate `branchpad.md` file for each branch, if desired. |
| 8 | +- Provides a per repository / per branch way of note taking while working on your code with the help |
| 9 | +of floating windows. |
| 10 | +- Supports creating and toggling a separate `{branch}-branchpad.md` file for each branch, |
| 11 | + if desired. |
10 | 12 |
|
11 | 13 | ## ⚡️ Requirements
|
12 | 14 | - Neovim >= 0.7.2
|
13 | 15 |
|
14 |
| -Disclaimer: Plugin should work fine with Neovim > 0.6.0 but I haven't tested it yet |
| 16 | +Disclaimer: Plugin should work fine with most neovim versions but I have not tested yet |
15 | 17 |
|
16 | 18 | ## 📦 Installation
|
17 | 19 |
|
18 |
| -Use your favorite plugin manager to install gitpad.nvim. For example, using [lazy.nvim](https://github.com/folke/lazy.nvim): |
| 20 | +Use your favorite plugin manager to install gitpad.nvim. For example, |
| 21 | +using [lazy.nvim](https://github.com/folke/lazy.nvim): |
19 | 22 |
|
20 | 23 | ```lua
|
21 | 24 | {
|
22 | 25 | 'yujinyuz/gitpad.nvim',
|
23 | 26 | config = function()
|
24 |
| - require("gitpad").setup { |
| 27 | + require('gitpad').setup { |
25 | 28 | -- your configuration comes here
|
26 | 29 | -- or leave it empty to use the default settings
|
27 | 30 | -- refer to the configuration section below
|
| 31 | + }, |
| 32 | + keys = { |
| 33 | + { |
| 34 | + '<leader>pp', |
| 35 | + function() |
| 36 | + require('gitpad').toggle_gitpad() |
| 37 | + end, |
| 38 | + desc = 'gitpad project', |
| 39 | + }, |
| 40 | + { |
| 41 | + '<leader>pb', |
| 42 | + function() |
| 43 | + require('gitpad').toggle_gitpad_branch() |
| 44 | + end, |
| 45 | + desc = 'gitpad branch', |
| 46 | + }, |
| 47 | + }, |
28 | 48 | end
|
29 | 49 | }
|
30 | 50 | ```
|
31 | 51 |
|
32 |
| -## ⚙️ Configuration |
| 52 | +## ⚙︎ Configuration |
33 | 53 |
|
34 | 54 | ### Setup
|
35 | 55 |
|
36 |
| -gitpad comes with the following defaults: |
| 56 | +gitpad.nvim comes with the following defaults: |
37 | 57 |
|
38 | 58 | ```lua
|
39 | 59 | {
|
40 | 60 | border = 'single', -- The border style of the floating window. Possible values are `'single'`, `'double'`, `'shadow'`, `'rounded'`, and `''` (no border).
|
41 | 61 | 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).
|
42 | 62 | dir = vim.fn.stdpath('data') .. '/gitpad', -- The directory where the notes are stored. Possible value is a valid path ie '~/notes'
|
| 63 | + default_text = nil, -- Leave this nil if you want to use the default text |
43 | 64 | on_attach = function(bufnr)
|
44 | 65 | -- You can also define a function to be called when the gitpad window is opened, by setting the `on_attach` option:
|
45 | 66 | -- This is just an example
|
|
0 commit comments