Phantasimay / cheat-sh-nvim

A simple vim plugin that uses cht.sh to retrieve information based on word under cursor or command.

Repository from Github https://github.comPhantasimay/cheat-sh-nvimRepository from Github https://github.comPhantasimay/cheat-sh-nvim

cheat-sh-nvim

A simple plugin for getting information from Cheat Sheet

What is cheat-sh-nvim?

It is a plugin which allows you to get cht.sh functionality right with in neovim. It currently supports two types of functionality which are cheat sheet with command and cheat sheet for current word. The new floating windows follow the same theme as the one you have set.

Command Mode Preview

Preview Preview

Under Cursor Mode Preview

Preview

Getting Started

Installation

Using vim-plug

Plug 'BitsuMamo/cheat-sh-nvim'

Usage

" Use Cheat Sheat using command line
nnoremap <leader>cs :call CheatSheetCommand()<CR>
nnoremap <leader>cc :call CheatSheetCursor()<CR>

" Using Lua functions
nnoremap <leader>cs :lua require('cheat-sh-nvim').cheatSheet()<CR>
nnoremap <leader>cc :lua require('cheat-sh-nvim').cheatSheetCommand(vim.fn.input("Cheat Sheet> "))<CR>

Project Inspiration

This project was inspired by ThePrimeagen's "Writing Neovim Plugins" seires. If it weren't for that it wouldn't have been created. The border ASCI code was taken from Telescope repository.

About

A simple vim plugin that uses cht.sh to retrieve information based on word under cursor or command.

License:MIT License


Languages

Language:Lua 81.6%Language:Vim Script 18.4%