https://github.com/ryoppippi/vim-ray-so
Generate a beautiful code image with https://ray.so on your Neovim/Vim
https://github.com/ryoppippi/vim-ray-so
neovim neovim-plugin typescript vim vim-denops vim-plugin
Last synced: 6 months ago
JSON representation
Generate a beautiful code image with https://ray.so on your Neovim/Vim
- Host: GitHub
- URL: https://github.com/ryoppippi/vim-ray-so
- Owner: ryoppippi
- License: mit
- Created: 2024-06-23T12:15:14.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-02T10:21:53.000Z (almost 2 years ago)
- Last Synced: 2025-10-03T21:53:41.282Z (9 months ago)
- Topics: neovim, neovim-plugin, typescript, vim, vim-denops, vim-plugin
- Language: TypeScript
- Homepage:
- Size: 4.1 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# vim-ray-so
This plugin allows you to easily generate beautiful code images using the
[Ray.so](https://ray.so) service directly from your Vim or Neovim editor.

## Features
- Generate code images from selected text or entire buffer
- Customize image settings such as theme, padding, background, and dark mode
- Automatic language detection based on filetype
- Opens the generated image URL in your default browser
## Installation
Using your preferred plugin manager, add the following to your configuration:
```vim
" For vim-plug
Plug 'ryoppippi/vim-ray-so'
Plug 'vim-denops/denops.vim'
```
```lua
-- For lazy.nvim
{
"ryoppippi/vim-ray-so",
dependencies = {
"vim-denops/denops.vim",
},
}
```
Make sure you have [Deno](https://deno.land/) installed on your system, as this
plugin uses Deno for its runtime.
## Usage
Use the `:RaySo` command to generate a code image:
- Without a visual selection: `:RaySo` will use the entire buffer
- With a visual selection: Select the desired code and use `:RaySo`
- Custom title: `:RaySo my_custom_title`
- Directly Copy to clipboard: `:RaySoClipboard`
The generated image URL will automatically open in your default browser.
## Configuration
You can customize the default settings in your Vim/Neovim configuration:
```vim
" Theme (default: 'vercel')
let g:ray_so_theme = 'supabase'
" Padding (default: 16)
let g:ray_so_padding = 32
" Background (default: v:true)
let g:ray_so_background = v:false
" Dark mode (default: v:true)
let g:ray_so_darkmode = v:false
```
you can see the available options at [`types.ts`](./denops/ray-so/types.ts)
## Requirements
- Vim or Neovim with Deno support
- [Deno](https://deno.land/) installed on your system
## Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
## Related Projects
- [rayso.nvim](https://github.com/TobinPalmer/rayso.nvim)
- [carbon-now.nvim](https://github.com/ellisonleao/carbon-now.nvim)
- [vim-carbon-now-sh](https://github.com/kristijanhusak/vim-carbon-now-sh)
- [denops-silicon.vim](https://github.com/skanehira/denops-silicon.vim)
- [sillicon.nvim](https://github.com/krivahtoo/silicon.nvim)
- [vim-sillicon](https://github.com/segeljakt/vim-silicon)
- [freeze.nvim](https://github.com/ethanholz/freeze.nvim)
## License
This project is licensed under the [MIT License](./LICENSE).