Features • Installation • Usage & Syntax • Customization • Contributing
FKNotes.nvim brings powerful, inline note-taking and task management directly into your Neovim workflow. It combines the convenience of todo-comments.nvim with a persistent task database and a modern UI, all tightly integrated with the FKvim ecosystem.
- Flexible Inline Syntax: Capture tasks and notes naturally with
@fknotes. - Smart Parsing: Recognizes priorities, due dates, and tags in any order.
- Relative Due Dates: Set deadlines with intuitive formats like
-2d(2 days from now),-3w(3 weeks), or-1m(1 month). - Flexible Priorities: Specify priority with
@highor as a tag like#medium. - Granular Highlighting:
todo-comments.nvim-style highlighting for each part of your note. - Persistent Storage: Inline tasks are saved to a JSON file and won't be lost when you close the buffer.
- UI for Management: A clean and modern UI to browse, create, and manage tasks and notebooks.
- Gutter Signs & Diagnostics: Get instant visual feedback for your notes in the sign column and diagnostics panel.
- Theme Aware: Dynamically adapts to your colorscheme for a native look and feel.
FkNotes.nvim requires the following plugin to work:
Install with your favorite plugin manager.
{
'flashcodes-themayankjha/Fknotes.nvim',
dependencies = { "MunifTanjim/nui.nvim" },
config = function()
require('fknotes').setup({
-- your configuration here
})
end
}Here are the default settings. You only need to include the keys you wish to override in your setup() call.
require('fknotes').setup({
-- General settings
default_note_dir = vim.fn.expand('~/notes'), -- Default directory for notes and tasks
-- UI settings
ui = {
border_style = 'rounded', -- 'rounded', 'single', 'double', 'solid'
-- Window dimensions
menu_width = 55,
menu_height = 15,
task_browser_width = 80,
task_browser_height = 20,
},
-- Keybindings
keymaps = {
open_menu = "<leader>fn",
new_task = "<leader>nt",
browse_tasks = "<leader>ln",
new_notebook = "<leader>nn",
}
})The power of FKNotes lies in its flexible inline syntax. Start a line with @fknotes followed by a TAG and a colon.
@fknotes <TAG>: <Your Title> [@priority | #priority] [-<date>] [#tags...]
- TAG:
TODO,FIX,NOTE,PERF,WARN,HACK,TASK. This is required. - Title: The description of your task.
- Priority: Optional. Use either
@<level>or#<level>(e.g.,@high,#medium). - Due Date: Optional. Use an absolute date (
-YYYY-MM-DD) or a relative one (-2d,-3w,-1m,-1y). - Tags: Optional. Add as many
#tagsas you like.
The metadata (priority, date, tags) can be in any order after the title.
-- A simple TODO
-- @fknotes TODO: Implement the new feature
-- A complex task with metadata in a different order
-- @fknotes FIX: Bug in the API response -2d #fkvim @high
-- A note with a relative date and a tag
-- @fknotes NOTE: Review the documentation -1w #docs
-- A performance task with a priority tag
-- @fknotes PERF: Optimise database queries #high #db| Command | Description |
|---|---|
:FkNotes |
Open the main FKNotes menu. |
:FkNewTask |
Open the form to create a new task. |
:FkAllTasks |
Open the task browser to view all tasks. |
:FkNewNotebook |
Open the form to create a new notebook. |
FKNotes provides granular highlight groups so you can customize the look and feel to match your theme perfectly.
For a note like @fknotes FIX: Critical bug @high -2d #auth:
@fknotesis highlighted withFkNotesKeyword(Yellow)FIX:is highlighted withFkNotesTagFIX(Red Background, White Text)Critical bugis highlighted withFkNotesTitleFIX(Red Text)@highis highlighted withFkNotesPriorityHigh(Red Text)-2dis highlighted withFkNotesMeta(White/Grey Text)#authis highlighted withFkNotesMeta(White/Grey Text)
You can override any of these groups using vim.api.nvim_set_hl.
| Group | Description |
|---|---|
FkNotesKeyword |
The initial @fknotes keyword. |
FkNotesTag<TAG> |
The tag itself (e.g., FkNotesTagFIX). |
FkNotesTitle<TAG> |
The title text (e.g., FkNotesTitleFIX). |
FkNotesPriorityHigh |
High priority text (@high or #high). |
FkNotesPriorityMedium |
Medium priority text. |
FkNotesPriorityLow |
Low priority text. |
FkNotesMeta |
Due dates and #tags. |
Contributions, issues, and feature requests are welcome! Feel free to check the issues page.
This project is licensed under the MIT License. See the LICENSE file for details.