NFrid/due.nvim

github github
note-taking plugin
star 42
stars
alert-circle 0
open issues
users 1
subscribers
git-branch 0
forks
CREATED

2021-06-14

UPDATED

4 months ago

packer

require('packer').startup(function()
  use 'NFrid/due.nvim'
end)

paq

require "paq" { 
  'NFrid/due.nvim'
}

due.nvim

Simple plugin that provides you due for the date string.

Example

Requirements

  • Neovim 0.4.4+

Installation

Using packer.nvim

use {
  'NFrid/due.nvim',
  config = function()
    require('due_nvim').setup {}
  end
}

You may use another plugin manager, Plug for example. In that case you will still need to initialize it with lua:

lua << EOF
require('due_nvim').setup {}
EOF

Settings

Pass any of these settings to setup func to overwrite the defaults:

require('due_nvim').setup {
  prescript = 'due: '           -- prescript to due data
  prescript_hi = 'Comment'      -- highlight group of it
  due_hi = 'String'             -- highlight group of the data itself
  ft = '*.md'                   -- filename template to apply aucmds :)
  today = 'TODAY'               -- text for today's due
  today_hi = 'Character'        -- highlight group of today's due
  overdue = 'OVERDUE'           -- text for overdued
  overdue_hi = 'Error'          -- highlight group of overdued
  date_hi = 'Conceal'           -- highlight group of date string
  pattern_start = '<'           -- start for a date string pattern
  pattern_end = '>'             -- end for a date string pattern
  use_clock_time = false        -- allow due.nvim to calculate hours, minutes, and seconds
  default_due_time = "midnight" -- if use_clock_time == true, calculate time until option on specified date. 
                                --   Accepts "midnight", for 23:59:59, or noon, for 12:00:00
}

Functions

These are used to make it work..

require("due_nvim").draw(0)   -- Draw it for a buffer (0 to current)
require("due_nvim").clean(0)  -- Clean the array from it
require("due_nvim").redraw(0) -- Clean, then draw

TODO

idk if I ever will develop this thing more... In case of somebody needs it, here are my 'plans' on it:

  • Option for pattern style
  • idk time?????