Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

devidw/vem

Repository files navigation

vem

vim + semantic search

runs a local vec db and embedding model and watches configured directories of your fs to reindex on change and provides an api for semantic search + telescope frontend

setup

  • chromadb

    python -m venv venv
    source ./venv/bin/activate
    pip install -r ./requirements.txt
    
  • lm studio

  • node project

    pnpm install
    

nvim

with lazy.vim

{
    "vem",
    dir = "/users/devidw/desktop/code/vem",
    dependencies = {
        'nvim-telescope/telescope.nvim',
    },
    config = function()
        require("telescope").load_extension("vem")

        vim.keymap.set("n", "<leader>v", function()
            require("telescope").extensions.vem.search({
                repo_path = "/Users/devidw/Desktop/code/vem",
                config_path = "/Users/devidw/Desktop/code/vem/config.json",
            })
        end)
    end
},
  • hit control + space to search
    • (why not enter? bc once results are there, enter is already reserved for opening them)

run daemon

for configuration see ./config.ts

pnpm dev ./path/to/my/config.json
  • starts the vec db
  • maybe loads the emb model
  • reindex all collections
  • start fs watchers to re-embed

macos launch agent setup:

# first update vem.plist to point to your daemon script, then:
cp vem.plist ~/Library/LaunchAgents/gdn.wolf.vem.plist
launchctl load ~/Library/LaunchAgents/gdn.wolf.vem.plist

  • run chromadb
  • run some embedding model
  • watch folder and index into db
  • api to query
  • telescope plugin

About

semantic search for nvim

Topics

Resources

Code of conduct

Contributing

Stars

Watchers

Forks

Sponsor this project