Skip to content

Latest commit

 

History

History
490 lines (328 loc) · 6.13 KB

api.options.md

File metadata and controls

490 lines (328 loc) · 6.13 KB

_module.args

Additional arguments passed to each module in addition to ones like lib, config, and pkgs, modulesPath. This option is also available to all submodules. Submodules do not inherit args from their parent module, nor do they provide args to their parent module or sibling submodules. The sole exception to this is the argument name which is provided by parent modules to a submodule and contains the attribute name the submodule is bound to, or a unique generated name if it is not bound to an attribute. Some arguments are already passed by default, of which the following cannot be changed with this option: lib: The nixpkgs library. config: The results of all options after merging the values from all modules together. options: The options declared in all modules. specialArgs: The specialArgs argument passed to evalModules. All attributes of specialArgs Whereas option values can generally depend on other option values thanks to laziness, this does not apply to imports, which must be computed statically before anything else. For this reason, callers of the module system can provide specialArgs which are available during import resolution. For NixOS, specialArgs includes modulesPath, which allows you to import extra modules from the nixpkgs package tree without having to somehow make the module aware of the location of the nixpkgs or NixOS directories. { modulesPath, ... }: { imports = [ (modulesPath + "/profiles/minimal.nix") ]; } For NixOS, the default value for this option includes at least this argument: pkgs: The nixpkgs package set according to the nixpkgs.pkgs option.

Type: lazy attribute set of raw value

cmap

Defines 'Command-line mode' mappings

Type: attribute set of null or string

Default

{}

Example

{"C-p":":FZF<CR>","abc":":FZF<CR>"}

cnoremap

Defines 'Command-line mode' mappings

Type: attribute set of null or string

Default

{}

Example

{"C-p":":FZF<CR>","abc":":FZF<CR>"}

imap

Defines 'Insert and Replace mode' mappings

Type: attribute set of null or string

Default

{}

Example

{"C-p":":FZF<CR>","abc":":FZF<CR>"}

inoremap

Defines 'Insert and Replace mode' mappings

Type: attribute set of null or string

Default

{}

Example

{"C-p":":FZF<CR>","abc":":FZF<CR>"}

lua

Lua config

Type: strings concatenated with "\n"

Default

""

nmap

Defines 'Normal mode' mappings

Type: attribute set of null or string

Default

{}

Example

{"C-p":":FZF<CR>","abc":":FZF<CR>"}

nnoremap

Defines 'Normal mode' mappings

Type: attribute set of null or string

Default

{}

Example

{"C-p":":FZF<CR>","abc":":FZF<CR>"}

omap

Defines 'Operator pending mode' mappings

Type: attribute set of null or string

Default

{}

Example

{"C-p":":FZF<CR>","abc":":FZF<CR>"}

onoremap

Defines 'Operator pending mode' mappings

Type: attribute set of null or string

Default

{}

Example

{"C-p":":FZF<CR>","abc":":FZF<CR>"}

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

{}

smap

Defines 'Select mode' mappings

Type: attribute set of null or string

Default

{}

Example

{"C-p":":FZF<CR>","abc":":FZF<CR>"}

snoremap

Defines 'Select mode' mappings

Type: attribute set of null or string

Default

{}

Example

{"C-p":":FZF<CR>","abc":":FZF<CR>"}

tmap

Defines 'Terminal mode' mappings

Type: attribute set of null or string

Default

{}

Example

{"C-p":":FZF<CR>","abc":":FZF<CR>"}

tnoremap

Defines 'Terminal mode' mappings

Type: attribute set of null or string

Default

{}

Example

{"C-p":":FZF<CR>","abc":":FZF<CR>"}

use

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

Type: attribute set of attribute set

Default

{}

vim

Represents 'vim' namespace from neovim lua api.

Type: attribute set

Default

{}

Example

{"vim":{"opt":{"clipboard":"unnamed,unnamedplus","termguicolors":true}}}

vimscript

Vimscript config

Type: strings concatenated with "\n"

Default

""

vmap

Defines 'Visual and Select mode' mappings

Type: attribute set of null or string

Default

{}

Example

{"C-p":":FZF<CR>","abc":":FZF<CR>"}

vnoremap

Defines 'Visual and Select mode' mappings

Type: attribute set of null or string

Default

{}

Example

{"C-p":":FZF<CR>","abc":":FZF<CR>"}

xmap

Defines 'Visual mode' mappings

Type: attribute set of null or string

Default

{}

Example

{"C-p":":FZF<CR>","abc":":FZF<CR>"}

xnoremap

Defines 'Visual mode' mappings

Type: attribute set of null or string

Default

{}

Example

{"C-p":":FZF<CR>","abc":":FZF<CR>"}