Skip to content

Latest commit

 

History

History
457 lines (281 loc) · 5.13 KB

api.options.md

File metadata and controls

457 lines (281 loc) · 5.13 KB

cmap

Defines 'Command-line mode' mappings

Type: attribute set of (null or string)

Default: { }

Example:

{
  RH = "Gitsigns reset_hunk";
}

cnoremap

Defines 'Command-line mode' mappings

Type: attribute set of (null or string)

Default: { }

Example:

{
  RH = "Gitsigns reset_hunk";
}

function

Attribute set representing -> pairs

Type: attribute set of string

Default: { }

Example:

{
  # Gets parsed to:
  # function abc()
  #   print 'hello world'
  # end
  abc = "print 'hello world'";
}

imap

Defines 'Insert and Replace mode' mappings

Type: attribute set of (null or string)

Default: { }

Example:

{
  "<C-BS>" = "<C-W>";
  "<C-h>" = "<Left>";
  "<C-j>" = "<Down>";
  "<C-k>" = "<Up>";
  "<C-l>" = "<Right>";
}

inoremap

Defines 'Insert and Replace mode' mappings

Type: attribute set of (null or string)

Default: { }

Example:

{
  "<C-BS>" = "<C-W>";
  "<C-h>" = "<Left>";
  "<C-j>" = "<Down>";
  "<C-k>" = "<Up>";
  "<C-l>" = "<Right>";
}

lua

Lua config

Type: strings concatenated with "\n"

Default: ""

Example:

''
  local hooks = require "ibl.hooks"
  hooks.register(
    hooks.type.WHITESPACE,
    hooks.builtin.hide_first_space_indent_level
  )
''

lua'

Lua config which is placed after lua script. Unfortunatelly sometimes config requires certain ordering

Type: strings concatenated with "\n"

Default: ""

Example:

''
  local hooks = require "ibl.hooks"
  hooks.register(
    hooks.type.WHITESPACE,
    hooks.builtin.hide_first_space_indent_level
  )
''

nmap

Defines 'Normal mode' mappings

Type: attribute set of (null or string)

Default: { }

Example:

{
  "<leader>/" = ":nohl<cr>";
}

nnoremap

Defines 'Normal mode' mappings

Type: attribute set of (null or string)

Default: { }

Example:

{
  "<leader>/" = ":nohl<cr>";
}

omap

Defines 'Operator pending mode' mappings

Type: attribute set of (null or string)

Default: { }

Example:

{
  imma-be-real-with-ya = "I have no idea what for one may use this";
}

onoremap

Defines 'Operator pending mode' mappings

Type: attribute set of (null or string)

Default: { }

Example:

{
  imma-be-real-with-ya = "I have no idea what for one may use this";
}

set

'vim.opt' alias. Acts same as vimscript 'set' command

Type: attribute set of (boolean or floating point number or signed integer or string)

Default: { }

Example:

{
  set = {
    clipboard = "unnamed,unnamedplus";
    termguicolors = true;
  };
}

setup

Results in 'require().setup()'.

Type: attribute set of (attribute set)

Default: { }

Example:

setup.lsp_signature = {
  bind = true;
  hint_enable = false;
  hi_parameter = "Visual";
  handler_opts.border = "single";
};

smap

Defines 'Select mode' mappings

Type: attribute set of (null or string)

Default: { }

Example:

{
  "<CR>" = "a<BS>";
}

snoremap

Defines 'Select mode' mappings

Type: attribute set of (null or string)

Default: { }

Example:

{
  "<CR>" = "a<BS>";
}

tmap

Defines 'Terminal mode' mappings

Type: attribute set of (null or string)

Default: { }

Example:

{
  "<Esc>" = "<C-><C-n>";
}

tnoremap

Defines 'Terminal mode' mappings

Type: attribute set of (null or string)

Default: { }

Example:

{
  "<Esc>" = "<C-><C-n>";
}

use

Allows requiring modules. Gets parset to "require('')."

Type: attribute set of (attribute set)

Default: { }

Example:

use.which-key.register = dsl.callWith {
  q = cmd "bdelete" "Delete buffer";
}

vim

Represents 'vim' namespace from neovim lua api.

Type: anything

Default: { }

Example:

{
  vim = {
    opt = {
      clipboard = "unnamed,unnamedplus";
      termguicolors = true;
    };
  };
}

vimscript

Vimscript config

Type: strings concatenated with "\n"

Default: ""

Example:

"set number"

vimscript'

Vimscript config which is placed after lua script. Unfortunatelly sometimes config requires certain ordering

Type: strings concatenated with "\n"

Default: ""

Example:

"set number"

vmap

Defines 'Visual and Select mode' mappings

Type: attribute set of (null or string)

Default: { }

Example:

{
  "<" = "<gv";
  ">" = ">gv";
}

vnoremap

Defines 'Visual and Select mode' mappings

Type: attribute set of (null or string)

Default: { }

Example:

{
  "<" = "<gv";
  ">" = ">gv";
}

xmap

Defines 'Visual mode' mappings

Type: attribute set of (null or string)

Default: { }

Example:

{
  "<" = "<gv";
  ">" = ">gv";
}

xnoremap

Defines 'Visual mode' mappings

Type: attribute set of (null or string)

Default: { }

Example:

{
  "<" = "<gv";
  ">" = ">gv";
}