Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

at.nvim

A tiny Neovim plugin for copying file references to AI agent CLIs.

✨ Features

  • Copy the current file as an @-mention
  • Include the selected line range in visual mode
  • Use paths relative to Neovim's current working directory
  • Choose the destination register

⚡️ Requirements

  • Neovim >= 0.8.0

📦 Installation

Install using lazy.nvim:

return {
  'chenxin-yan/at.nvim',
  opts = {},
}

⚙️ Configuration

Default Configuration:

{
  register = '+',
  keys = {
    copy = '<leader>at',
  },
}

API Reference

Function Description
require('at').setup(opts) Initialize the plugin with optional configuration
require('at').copy() Copy an @-mention for the current file

⌨️ Mappings

The default <leader>at mapping works in normal and visual mode. Set it to '' to disable it:

require('at').setup {
  keys = {
    copy = '',
  },
}
Set Keymaps Manually
require('at').setup {
  keys = {
    copy = '',
  },
}

vim.keymap.set({ 'n', 'v' }, '<leader>at', require('at').copy, {
  desc = 'Copy file @-mention',
})

🚀 Usage

Run require('at').copy() or press <leader>at.

In normal mode:

@lua/at.lua

With lines 10 through 14 selected in visual mode:

@lua/at.lua#L10-14

A single selected line omits the range end:

@lua/at.lua#L10

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages