The words Under construction in black text on a yellow background with diagonal black stipes surrounding it
I'm in the process of moving my site. It's still a work in progress. Please excuse the mess and broken links.

Neovim Grimoire

TODO: Pull subtitle into page object

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_start_default_section code_end_default_section

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.

Debugging Stuff

I'm moving stuff around right now. All this below is helping me figure out where to put stuff

        -- title

Neovim Grimoire 

The Neovim interface to my Grimoire (aka notes app)

-- h2

In Progress

Currently in progress is work to get code blocks 
to execute

TODO: Move the code block exporter into this
project


-- h2

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. 

-- h2

Usage

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

-- code

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

-- p

I use `lazy`` for plugins and load it with:

-- code/
-- lua
-- title: ~/.config/nvim/init.lua

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

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

-- /code

-- p

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.


-- h2

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. 


-- ref
-- title: nvim-grimoire repo
-- url: https://github.com/alanwsmith/nvim-grimoire

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

-- ref
-- title: grimoire_search
-- url: /grimoire-search/

The bridge tool that connect the extension to 
meilisearch

-- ref 
-- title: Telescope
-- url: https://github.com/nvim-telescope/telescope.nvim

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

-- ref
-- title: Meilisearch 
-- url: https://www.meilisearch.com/

"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

-- ref
-- title: lazy.nvim
-- url: https://github.com/folke/lazy.nvim

"a modern plugin manager for Neovim"

I'm using this because it's what came down in the 
<<link|kickstart|https://github.com/nvim-lua/kickstart.nvim>> 
config I use. Works great

-- categories
-- Neovim
-- Lua
-- Grimoire

-- metadata 
-- date: 2023-03-21 01:09:04
-- id: 2wxq2sgw
-- site: aws
-- type: post
-- path: /nvim-grimoire
-- status: published