filemention.nvim

skill
Guvenlik Denetimi
Gecti
Health Gecti
  • License — License: MIT
  • Description — Repository has a description
  • Active repo — Last push 0 days ago
  • Community trust — 25 GitHub stars
Code Gecti
  • Code scan — Scanned 1 files during light audit, no dangerous patterns found
Permissions Gecti
  • Permissions — No dangerous permissions requested

Bu listing icin henuz AI raporu yok.

SUMMARY

@ file mentions in neovim. for prompts, notes, commits.

README.md


filemention.nvim

type @ in insert mode.
fuzzy-pick a file.

get a @path/to/file mention — native to nvim.

filemention.nvim demo


install

with lazy.nvim (the event is optional - just lazy-loads on first insert):

{ "not-manu/filemention.nvim", event = "InsertEnter", opts = {} }

then wire it into your completion engine:

nvim-cmp
sources = cmp.config.sources({
  { name = "filemention" },
  -- ...your other sources
})
blink.cmp
sources = {
  default = { "filemention", "lsp", "path", "snippets", "buffer" },
  providers = {
    filemention = {
      name = "filemention",
      module = "filemention.sources.blink",
    },
  },
}

heads up: by default filemention only activates in markdown, text, and gitcommit files. trying it in a .lua buffer and seeing nothing? set filetypes = "*" (see config below).

config

defaults are sensible. but if you must:

require("filemention").setup({
  trigger = "@",                  -- the magic key
  root = "git",                   -- "git" | "cwd" | function() return path end
  respect_gitignore = true,       -- don't surface your node_modules sins
  include_hidden = false,
  format = "bare",                -- "bare" | "markdown" | function(path, name)
  filetypes = { "markdown", "text", "gitcommit" },  -- or "*" if you live dangerously
  max_items = 500,
  finder = "auto",                -- "auto" | "fd" | "rg" | "vim"
})

the [@ trick

type [@ instead of @ and you get a real markdown link:

[@README.md](README.md)

handy when you're writing actual prose and the bare @path looks ugly.

under the hood

  • file discovery via fdrg → pure-lua vim.fs.dir (whichever it finds first)
  • git root by default, falls back to cwd
  • only activates in text-ish filetypes so it doesn't pop up while you're writing real code
  • no dependencies beyond your completion engine



...yet another one of manu's creations  •  MIT

Yorumlar (0)

Sonuc bulunamadi