Code Monkey home page Code Monkey logo

telescope-terraform-doc.nvim's Introduction

pre-commit pre-commit.ci status Commitizen friendly

telescope-terraform-doc.nvim

telescope-terraform-doc.nvim is an extension for telescope.nvim that provides its users with ability to search and browse terraform providers docs.

Demo

Installation

vim-plug

Plug 'nvim-lua/plenary.nvim'
Plug 'nvim-telescope/telescope.nvim'
Plug 'ANGkeith/telescope-terraform-doc.nvim'

Packer

use {
    "nvim-telescope/telescope.nvim",
    requires = {
        { "nvim-lua/plenary.nvim" },
        { "nvim-telescope/telescope-terraform-doc.nvim" },
    },
}

Setup

Add the following to your init.vim:

require('telescope').load_extension('terraform_doc')

Usage

Browse the official hashicorp providers:

:Telescope terraform_doc

Browse resources from the latest hashicorp/aws provider:

:Telescope terraform_doc full_name=hashicorp/aws

Browse resources from the v3.74.0 hashicorp/aws provider:

:Telescope terraform_doc full_name=hashicorp/aws version=3.74.0

Browse all terraform modules:

:Telescope terraform_doc modules

Keymap ideas

nnoremap <space>ott :Telescope terraform_doc<cr>
nnoremap <space>otm :Telescope terraform_doc modules<cr>
nnoremap <space>ota :Telescope terraform_doc full_name=hashicorp/aws<cr>
nnoremap <space>otg :Telescope terraform_doc full_name=hashicorp/google<cr>
nnoremap <space>otk :Telescope terraform_doc full_name=hashicorp/kubernetes<cr>

Configurable settings

Keys Description Options
url_open_command The shell command to open the url string (default: open)
latest_provider_symbol The symbol for indicating that the current version is the latest string (default: *)
wincmd Command to open documentation in a split window string (default: botright vnew)
wrap Wrap lines in a documentation in a split window string (default: nowrap)
require("telescope").setup({
  extensions = {
    terraform_doc = {
      url_open_command = "xdg-open",
      latest_provider_symbol = " ๎ฐ ",
      wincmd = "botright vnew",
      wrap = "nowrap",
    }
  }
})

Telescope key mappings

key Usage
<cr> Open documentation with url_open_command
<c-d> Open documentation in a split window

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.