A simple Neovim plugin for managing a personal wiki with SQLite-based metadata storage.
- Store and manage wiki entries with metadata.
- Uses SQLite for efficient metadata querying.
- Customizable metadata fields.
- Supports direct title-based completion in
cmp, which improves workflow efficiency by allowing you to focus on writing instead of remembering the exact title or tags you've used.
use lazy.nvim:
-- wiki.lua
{
"TyrannosaurusLjx/wiki.nvim",
opts = {
root_path = vim.fn.expand("your wiki path"),
author = "your name",
meta_template = {
title = "title",
tags = "tags",
category = "category",
date = "date",
author = "author",
summary = "summary",
},
db_path = vim.fn.expand("your db path"), -- default is root_path/wiki.db
-- Metadatakeys. You can delete some of these
meta_keys = { "author", "title", "tags", "summary", "id", "alias" },
}
}-- blink.cmp
require('blink.cmp').setup({
providers = {
wiki = {
name = 'wiki',
module = 'nvimwiki.blink_cmp',
opts = {},
filetypes = { 'markdown', 'text' },
}
}
})vim.keymap.set("n", "<leader>nt", "<CMD>lua require'nvimwiki.journal'.journal(0)<CR>", {desc = "open today's journal"})
vim.keymap.set("n", "<leader>ny", "<CMD>lua require'nvimwiki.journal'.jounal(-1)<CR>", {descc = "open yesterday's journal"})MIT