Giter Club home page Giter Club logo

suit.nvim's Introduction

suit.nvim

A neovim plugin that replaces the default vim.ui.input and vim.ui.select implementations with floating windows.

Install

Use your plugin manager

require('paq')({
  -- ...
  'doums/suit.nvim',
})

Configuration

require('suit').setup({
  input = {
    -- default prompt value
    default_prompt = 'Input: ',
    -- border of the window (see `:h nvim_open_win`)
    border = 'single',
    -- highlight group for the input UI window
    -- links to NormalFloat
    hl_win = 'suitWin',
    -- highlight group for the prompt text
    -- links to NormalFloat
    hl_prompt = 'suitPrompt',
    -- highlight group for the window border
    -- links to FloatBorder
    hl_border = 'suitBorder',
    -- input width (in addition to the default value)
    width = 20,
    -- override arguments passed to `nvim_open_win` (see `:h nvim_open_win`)
    nvim_float_api = nil,
  },
  select = {
    -- default prompt value
    default_prompt = 'Select one of: ',
    -- border of the window (see `:h nvim_open_win`)
    border = 'single',
    -- highlight group for the select UI window
    -- links to NormalFloat
    hl_win = 'suitWin',
    -- highlight group for the prompt text
    -- links to NormalFloat
    hl_prompt = 'suitPrompt',
    -- highlight group for the selected item
    -- links to PmenuSel
    hl_sel = 'suitSel',
    -- highlight group for the window border
    -- links to FloatBorder
    hl_border = 'suitBorder',
    -- override arguments passed to `nvim_open_win` (see `:h nvim_open_win`)
    nvim_float_api = nil,
  },
})

All default configuration values are listed here.

Usage

Keymaps should be intuitive.

For input:

<cr> to confirm
<esc> to cancel

For select:

<cr> and left mouse double click to confirm the selected item
<esc>, q to cancel
j, k, <up>, <down> to navigate

License

Mozilla Public License 2.0

suit.nvim's People

Contributors

danilshvalov avatar doums avatar

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.