Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yuchanns/ccr.nvim
A tiny tool provides Copy Code Reference.
https://github.com/yuchanns/ccr.nvim
code-reference lua neovim neovim-plugin nvim nvim-plugin
Last synced: 15 days ago
JSON representation
A tiny tool provides Copy Code Reference.
- Host: GitHub
- URL: https://github.com/yuchanns/ccr.nvim
- Owner: yuchanns
- License: mit
- Created: 2024-05-10T05:01:36.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-05-10T10:56:51.000Z (6 months ago)
- Last Synced: 2024-05-11T07:29:18.029Z (6 months ago)
- Topics: code-reference, lua, neovim, neovim-plugin, nvim, nvim-plugin
- Language: Lua
- Homepage:
- Size: 4.88 KB
- Stars: 5
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ccr.nvim
A tiny tool provides Copy Code Reference inspired by [AdamWhittingham/vim-copy-filename](https://github.com/AdamWhittingham/vim-copy-filename).
https://github.com/yuchanns/ccr.nvim/assets/25029451/d07fd9d5-43dc-4b34-aac3-83a78b032a68
## ⚡️ Requirements
- Neovim >= 0.7.0
## ✨ Installation
Install the plugin with [lazy.nvim](https://github.com/folke/lazy.nvim):
```lua
-- Lua
{
"yuchanns/ccr.nvim",
}
```Or any package manager you preferred.
## 🚀 Usage
Call ccr.nvim api in lua:
```lua
local ccr = require("ccr")ccr.copy_rel_path_and_line() -- the mostly used. Copy the relative file path and line number of the code.
ccr.copy_rel_path() -- just copy the relative file path of the code.
ccr.copy_abs_path_and_line() -- copy the absolute file path and line number of the code.
ccr.copy_abs_path() -- just the absolute file path.
ccr.copy_file_name() -- copy the name of the file.
ccr.copy_dir_path() -- copy the absolute parent path of the file.
```## 🙌 Contributing
Bug reports and feature requests are welcome! Feel free to make PRs!