Skip to content

Partysun/cheat.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

cheat.nvim

This is a minimal battle-used vim plugin to work with cheat sheet from cheat.sh. Plugin is based on nui (modern UI toolkit) and lua only approach for making a nvim plugin.

Plugin inspired by cppman.nvim

Installation

Install using packer. Note that nui.nvim is a requirement.

-- cheat.nvim
use {
  'Partysun/cheat.nvim',
    requires = {
      "MunifTanjim/nui.nvim"
    },
    -- Config part is optional
    config = function()
      local cheat = require"cheat"
      cheat.setup()

      -- Make a keymap to open the word under cursor in Cheat
      vim.keymap.set("n", "<leader>SS", function()
        cheat.open_chtsh_popup(vim.fn.expand("<cword>"))
      end)

      -- Open search box
      vim.keymap.set("n", "<leader>S", function()
        cheat.input()
      end)
    end
}

Usage

Run :Cheat without any arguments to get a search prompt

or with an argument to search for a term: :Cheat python torch create a tensor scalar

About

Minimal Neovim plugin for **cht.sh** based on modern ui for nvim and lua only approach.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages