home
NOTE: Under Construction - I'm in the middle of upgrading my site and lots of stuff is kinda broken. Please forgive the mess.

Neovim Grimoire

The Neovim interface to my Grimoire (aka notes app)

March 2023

In Progress

Currently in progress is work to get code blocks to execute

TODO: Move the code block exporter into this project

Overview

This is my personal extension for the Telescope Neovim plugin that powers my Grimoire (aka notes app). It calls out to a bridge process I setup (called grimoire_search) that in turn queries my files via Meilisearch.

Usage

I keep the plugin source file in an my workshop directory at:

Code
~/workshop/nvim-grimoire/lua/telescope/_extensions/grimoire.lua

I use lazy for plugins and load it with:

Code
require('lazy').setup({
  { dir = "~/workshop/nvim-grimoire" },
  -- etc...
}, {})

pcall(require('telescope').load_extension, 'grimoire')

At some point I'll probably move the plugin into the prod neovim config directory (or at least sym link it), but this works fine for now.

Searching

The extension makes a call to an external process for every character. I looked at a half dozen extensions an none of them worked that way. It took some source code diving to figure this out. Hopefully posting this will help if you're interested in trying something similar.

═══ § ═══

Footnotes And References

  • nvim-grimoire repo

    The repo for the project. There's not a lot of code but it took a long time to figure out. Posting it partially in hopes that anyone else how's looking to do the same thing can use it as a starter

  • grimoire_search

    The bridge tool that connect the extension to meilisearch

  • Telescope

    "The highly extendable fuzzy finder for Neovim."

    I made an earlier plugin without using Telescope because I couldn't figure out how to extend it the way I needed. It works, but I alwasy felt a little uneasy about it since I didn't really know what I was doing when I made it. I've got a lot more confidence with this version since Telescope does the heavy lifting and I'm just laying a plugin on top of it (now that I figured out how)

  • Meilisearch

    "A super fast, open-source search engine written in Rust."

    Telescope offers some ways to search files. None of them worked well for the type of text searches I do in my notes. I ended up install Meilisearch and making a little bridge script that this extension calls to get search results

  • lazy.nvim

    "a modern plugin manager for Neovim"

    I'm using this because it's what came down in the kickstart config I use. Works great