mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
fix: Remove missed mentions of rawType (#875)
This commit is contained in:
parent
4d14c098b6
commit
8b8a1c0f4b
5 changed files with 5 additions and 5 deletions
|
@ -74,7 +74,7 @@ There are a number of helpers to help you correctly implement them:
|
|||
- `helpers.mkPlugin`: This helper is useful for simple plugins that are configured through (vim) global variables.
|
||||
- `helpers.defaultNullOpts.{mkBool,mkInt,mkStr,...}`: This family of helpers takes a default value and a description, and sets the Nix default to `null`. These are the main functions you should use to define options.
|
||||
- `helpers.defaultNullOpts.mkNullable`: This takes a type, a default and a description. This is useful for more complex options.
|
||||
- `helpers.rawType`: A type to represent raw lua code. The values are of the form `{ __raw = "<code>";}`. This should not be used if the option can only be raw lua code, `mkStr` should be used in this case.
|
||||
- `helpers.nixvimTypes.rawLua`: A type to represent raw lua code. The values are of the form `{ __raw = "<code>";}`. This should not be used if the option can only be raw lua code, `mkLua`/`mkLuaFn` should be used in this case.
|
||||
|
||||
You will then need to map the Nix options to lua code. This can be done through `helpers.toLuaObject`. This function takes a Nix expression, and converts it to a lua string.
|
||||
|
||||
|
|
|
@ -371,7 +371,7 @@ with lib; rec {
|
|||
in
|
||||
{
|
||||
rawLua = mkOptionType {
|
||||
name = "rawType";
|
||||
name = "rawLua";
|
||||
description = "raw lua code";
|
||||
descriptionClass = "noun";
|
||||
merge = mergeEqualOption;
|
||||
|
|
|
@ -214,7 +214,7 @@ in {
|
|||
''
|
||||
''
|
||||
Actions to be triggered for specified keybindings. It can take either action name i.e `toggle_preview`
|
||||
Or it can a `rawType`.
|
||||
Or it can a `rawLua`.
|
||||
'';
|
||||
|
||||
lsp = {
|
||||
|
|
|
@ -84,7 +84,7 @@ in {
|
|||
)
|
||||
''
|
||||
The type of `content` depends on the secton `type`:
|
||||
- "text" -> a list of strings or a function (`rawType`) that requires a function that returns a table of strings
|
||||
- "text" -> a list of strings or a function (`rawLua`) that requires a function that returns a table of strings
|
||||
- "mapping" -> a list of list of strings in the format:
|
||||
```nix
|
||||
[
|
||||
|
|
|
@ -77,7 +77,7 @@ in {
|
|||
after cursor.
|
||||
|
||||
This is either:
|
||||
- a `rawType` value (`action.__raw = "function() foo end";`).
|
||||
- a `rawLua` value (`action.__raw = "function() foo end";`).
|
||||
- a string. In this case, Nixvim will automatically interpret it as a builtin yanky
|
||||
action.
|
||||
Example: `action = "put('p')";` will translate to
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue