Skip to content

JensynLo/wiki.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Wiki.nvim

A simple Neovim plugin for managing a personal wiki with SQLite-based metadata storage.

中文

Features

  • 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.

Installation

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' },
    }
  }
})

Usage

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"})

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors