Replace the `package-options` test with a stricter implementation.
When evaluating modules for use in the docs, provide them with a stubbed
`pkgs` instance that throws an error whenever a package is evaluated.
This ensures we don't accidentally use any packages in defaults or
examples.
Strip `lib` from `lib.types.`
Co-authored-by: Gaétan Lepage <33058747+GaetanLepage@users.noreply.github.com>
Fix settingsExample expression
Co-authored-by: Matt Sturgeon <matt@sturgeon.me.uk>
Use '-version of options for better examples
Fix indentation in example lua code
Remove trailing space
Replace use of literalLua with strings
Revert to use literalLua
Use lib.mkDefault
Co-authored-by: Gaétan Lepage <33058747+GaetanLepage@users.noreply.github.com>
Allow `test.warnings` and `test.assertions` to be defined as either a
list, or a function coerced to a list.
When defined as a function, it is supplied an `expect` function which
provides some syntactic-sugar for defining simple expectations.
This is an alternative to the current approach of defining that `expect`
function on an ad-hoc basis.
I prefer this to adding `expect` to nixvim's lib because:
1. That would require having access to `lib`
2. IDK where in `lib` such a specialized function should live
This should be separate from `test-sources` because we want to re-use a
common instance of nixpkgs throughout those tests.
Also, moved the existing nixpkgs module test from `test-sources`.
This partially reverts commit c4ad4d0b2e.
Wrap code in backticks
Co-authored-by: Gaétan Lepage <33058747+GaetanLepage@users.noreply.github.com>
Surround right_aling with backticks
Co-authored-by: Gaétan Lepage <33058747+GaetanLepage@users.noreply.github.com>
Set default of `inline` to true since we are on nvim >= 0.10
Document `highlights`
Use `mkUnsignedInt`
Co-authored-by: Gaétan Lepage <33058747+GaetanLepage@users.noreply.github.com>
Improve warning
Co-authored-by: Gaétan Lepage <33058747+GaetanLepage@users.noreply.github.com>
Readd deprecated options
Document icons
Rename removed-options.nix to deprecations.nix
Reformat raw string
Co-authored-by: Gaétan Lepage <33058747+GaetanLepage@users.noreply.github.com>
Don't specify rawLua
Co-authored-by: Gaétan Lepage <33058747+GaetanLepage@users.noreply.github.com>
Use mkDefault and make utf-16 workaround leaner
Don't wrap warning
Co-authored-by: Matt Sturgeon <matt@sturgeon.me.uk>
Change by -> after
Co-authored-by: Matt Sturgeon <matt@sturgeon.me.uk>
Document border options
Restrict no nonnegative numbers
Co-authored-by: Gaétan Lepage <33058747+GaetanLepage@users.noreply.github.com>
chore: include optionsRenamedToSettings in TODO
Merge imports
Co-authored-by: Gaétan Lepage <33058747+GaetanLepage@users.noreply.github.com>
Add support for treesj, a plugin that splits and joins blocks of code,
such as arrays and argument lists.
Remove package field
Co-authored-by: Gaétan Lepage <33058747+GaetanLepage@users.noreply.github.com>
Finish sentence with full stop
Co-authored-by: Gaétan Lepage <33058747+GaetanLepage@users.noreply.github.com>
Add a blank line between options
Co-authored-by: Gaétan Lepage <33058747+GaetanLepage@users.noreply.github.com>
Rename `opts` to `langs`
Shorten example settings
Add blanklines between option declarations
Add blank line between enable and settings
Co-authored-by: Gaétan Lepage <33058747+GaetanLepage@users.noreply.github.com>
Add blank line between enable and settings
Co-authored-by: Gaétan Lepage <33058747+GaetanLepage@users.noreply.github.com>
Use mkEnumFirstDefault instead of mkStr
Co-authored-by: Gaétan Lepage <33058747+GaetanLepage@users.noreply.github.com>
Use mkRaw instead of mkLuaFn
Co-authored-by: Gaétan Lepage <33058747+GaetanLepage@users.noreply.github.com>
Simplify langs option