Skip to content

Latest commit

 

History

History
72 lines (57 loc) · 2.08 KB

README.md

File metadata and controls

72 lines (57 loc) · 2.08 KB

telescope-code-fence.nvim

telescope-code-fence.nvim DEMO

This telescope.nvim extension will fetch and parse text files from Github and provide a list of Markdown Code Fences that you can paste into an nvim buffer. It will fetch a README.md file by default, but this can be changed when prompted by the plugin. (see Commands section below for details.)

Requirements

  • Neovim (v0.6.0)
  • telescope.nvim (required)
  • Only tested on MacOS 11.6.1

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-code-fence.nvim", run = "make install" };
}
require("telescope").load_extension("telescope-code-fence");
use "nvim-lua/plenary.nvim"
use "nvim-telescope/telescope.nvim"
use {
  "chip/telescope-code-fence.nvim",
  run = "make install"
}
require("telescope").load_extension("telescope-code-fence")

Setup

Commands

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

Bind to Keys:

" Replace <Leader>cf with whatever you prefer
nnoremap <Leader>cf <cmd>Telescope telescope-code-fence find

Development

$ git clone [email protected]:chip/telescope-code-fence.nvim.git
$ cd telescope-code-fence/lua/telescope/_extensions
$ nvim --cmd "set rtp+=$(pwd)" -u plugin/dev.vim

TODO

  • Add social template per Github Pages