Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/itsvinayak/nvim-notes.nvim

nvim-notes is a simple Neovim plugin for managing notes.
https://github.com/itsvinayak/nvim-notes.nvim

linux lua notes nvim nvim-configs nvim-plugin plugin vim

Last synced: 2 months ago
JSON representation

nvim-notes is a simple Neovim plugin for managing notes.

Awesome Lists containing this project

README

        

# nvim-notes.nvim
[![Lua Format](https://github.com/itsvinayak/nvim-notes.nvim/actions/workflows/stylua.yml/badge.svg)](https://github.com/itsvinayak/nvim-notes.nvim/actions/workflows/stylua.yml)

![nvim-notes](images/nvim-notes.nvim.png)

nvim-notes is a simple Neovim plugin for managing notes. It integrates with Telescope.nvim to help you create, search, and manage notes easily within Neovim

## Features

- Create Notes: Quickly create notes with :Notes write.
- Search Notes: Search through your notes with :Notes find using Telescope.
- List Notes: Retrieve a list of all notes with :Notes get.
- Custom Setup: Configure note paths, logging, and more with :Notes setup.

## Installation (Using Lazy.nvim)

Add the following lines to your init to install the plugin with Lazy.nvim.lua:

- Add nvim-notes to your Lazy.nvim setup:

```lua
require('lazy').setup {
{
'itsvinayak/nvim-notes.nvim',
dependencies = {
'nvim-telescope/telescope.nvim', -- Add Telescope as a dependency
'folke/which-key.nvim', -- Add WhichKey as a dependency (optional)
},
config = function()
require('notes').setup {
-- Optional configurations
path = '~/.my_notes', -- Custom path for notes (default is '~/.notes')
log_enabled = true, -- Enable logging (default is false)
log_level = 'INFO', -- Set log level to INFO
filetype = 'txt', -- Sets the notes filetype default is 'md'
}

-- Add WhichKey mappings (optional)
if pcall(require, 'which-key') then
local wk = require 'which-key'
wk.add {
{ 'nw', 'New Note' },
{ 'nf', 'Find Note' },
{ 'ng', 'Get Note' },
}
end
end,
},
}
```
- Synchronize Plugins: After adding the above, run:

```
:Lazy sync
```
## Commands
- :Notes write
Opens a new buffer to create a note. The note is saved in the specified notes directory.
- :Notes find
Searches for notes using Telescope.
- :Notes get
Lists all the notes in the notes directory.

## Key Mappings

You can add key mappings to your init.lua or Neovim configuration to make working with the plugin easier:

```lua
vim.api.nvim_set_keymap('n', 'nw', ':Notes write', { noremap = true, silent = true })
vim.api.nvim_set_keymap('n', 'nf', ':Notes find', { noremap = true, silent = true })
vim.api.nvim_set_keymap('n', 'ng', ':Notes get', { noremap = true, silent = true })
```

## Configuration

The plugin comes with default settings, which you can customize during setup:

```lua
require('notes').setup {
path = '~/.notes', -- Directory where notes are saved
log_level = 'INFO', -- Log level: INFO, DEBUG, ERROR, etc.
log_enabled = false, -- Enable or disable logging
filetype = 'txt', -- Sets the notes filetype
}
```

## Dependencies

- Neovim 0.5+: Make sure you're running Neovim 0.5 or higher.
- Telescope.nvim: This plugin requires Telescope to perform note searches.

## Contributors



vinayak
vinayak

💻 📖
Michael Connell
Michael Connell

📖
Georgi Chochev
Georgi Chochev

💻 📖

## License

This project is licensed under the GNU License. See the LICENSE file for more information.