From 8b8a1c0f4b668e070d1777e56fff7ef6397eb622 Mon Sep 17 00:00:00 2001 From: traxys Date: Tue, 2 Jan 2024 00:26:41 +0100 Subject: [PATCH] fix: Remove missed mentions of rawType (#875) --- CONTRIBUTING.md | 2 +- lib/helpers.nix | 2 +- plugins/utils/navbuddy.nix | 2 +- plugins/utils/startup.nix | 2 +- plugins/utils/yanky.nix | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 34401cfc..82f3b2ea 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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 = "";}`. 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 = "";}`. 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. diff --git a/lib/helpers.nix b/lib/helpers.nix index 7dcc305c..dfdae29e 100644 --- a/lib/helpers.nix +++ b/lib/helpers.nix @@ -371,7 +371,7 @@ with lib; rec { in { rawLua = mkOptionType { - name = "rawType"; + name = "rawLua"; description = "raw lua code"; descriptionClass = "noun"; merge = mergeEqualOption; diff --git a/plugins/utils/navbuddy.nix b/plugins/utils/navbuddy.nix index 9e55271e..0faa9375 100644 --- a/plugins/utils/navbuddy.nix +++ b/plugins/utils/navbuddy.nix @@ -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 = { diff --git a/plugins/utils/startup.nix b/plugins/utils/startup.nix index ddf1947a..0ce3a0f2 100644 --- a/plugins/utils/startup.nix +++ b/plugins/utils/startup.nix @@ -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 [ diff --git a/plugins/utils/yanky.nix b/plugins/utils/yanky.nix index 34ab49b0..493ae38f 100644 --- a/plugins/utils/yanky.nix +++ b/plugins/utils/yanky.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