Skip to content

Latest commit

 

History

History
71 lines (50 loc) · 2.03 KB

File metadata and controls

71 lines (50 loc) · 2.03 KB

projectnote.nvim (WIP)

Quickly take notes for your projects in Neovim without worrying about where to put them.

Lua Neovim

Projectnote Scrennshot

Installation

Using lazy

{
  'icemau/projectnote.nvim',
}

Usage

After installing you can start requiring this plugin and configure your own keymaps.

A basic setup, where you assign a single keymap for toggling the note window, would look something like this.

{
  'icemau/projectnote.nvim',
  config = function()
    local note = require('projectnote').setup {}
    vim.keymap.set('n', '<leader>tn', function () note:toggle() end, {})
  end
}

Options

There are a few options to set when calling setup.

require('projectnote').setup {
    -- These are the default values

    -- Where to store your notes
    data_path = string.format("%s/projectnote", vim.fn.stdpath("data")),

    -- When `true` close the note window automatically on `:w`
    close_write = false,

    -- Where to draw the note window.
    -- Allowed values are "CENTER", "RIGHT", "LEFT", and "FULLSCREEN".
    window_layout = "CENTER",
}

API

The Note table returned by require('projectnote').setup {} provides a few functions for you to customize your experience.

Method Description
note:toggle() Toggles (open/close) the note window
note:open() Opens the note window
note:close() Closes the note window
note:is_open() Returns true if the note is open

Please note that there are more functions but please do not use them. They will change and I can not assure you that nothing will break if you use them.