chip / telescope-software-licenses.nvim

View and paste common software licenses into your project
MIT License
23 stars 5 forks source link
extension freesoftware fsf license-management licenses lua neovim nvim plugin software-license software-licensing telescope-extension

telescope-software-licenses.nvim

telescope-software-licenses.nvim DEMO

This telescope.nvim extension allows you to view common software licenses and paste them into a buffer.

Currently supports the following licenses:

Requirements

Install

You can install the extension by using your plugin manager of choice or by cloning this repository somewhere on your filepath, and then adding the following somewhere after telescope in your configuration file (init.vim or init.lua).

Using Paq

require "paq" {
  "nvim-lua/plenary.nvim";
  "nvim-telescope/telescope.nvim";
  "chip/telescope-software-licenses.nvim";
}
require("telescope").load_extension("software-licenses");

Using packer.nvim

use "nvim-lua/plenary.nvim"
use "nvim-telescope/telescope.nvim"
use "chip/telescope-software-licenses.nvim"
require("telescope").load_extension("software-licenses")

Setup

Commands

" Prompts user for Github user/repo
" Prompts for file argument, but uses README.md as default
:Telescope software-licenses find

Bind to Keys:

" Replace <Leader>sl with whatever you prefer
nnoremap <Leader>sl :Telescope software-licenses find<CR>

Development

$ git clone git@github.com:chip/telescope-software-licenses.nvim.git
$ cd telescope-software-licenses.nvim/lua/telescope/_extensions

See plugin/dev.vim for details.