Commit graph

60 commits

Author SHA1 Message Date
Matt Sturgeon
1b7efacdf4
wrappers: bootstrap "helpers" directly
We don't need to pass a `getHelpers` function in, since we can just
import `../lib/helpers.nix`.
2024-07-08 16:24:06 +01:00
Matt Sturgeon
cfa44bbb66
wrappers: make _shared.nix return a module 2024-07-08 16:24:06 +01:00
Matt Sturgeon
086873bed9
modules: refactor extraFiles
Moved `extraFiles` from `modules/output.nix` into its own file `modules/files.nix`.

Users should now assign text to a `text` attribute, however they could
also assign a file path to a `source` attribute instead.

The old method of directly assigning a string still works, and is
coerced to the new type along with a deprecation warning.
2024-07-07 16:42:47 +01:00
traxys
367380bd84 modules/output: Remove the initContent option
This (internal) option introduces IFD, and can be substituted internally
with the `initPath` option easily.
If the content is required somewhere users can use readFile on the
initPath, though it will result in an IFD in their project.
2024-07-05 22:08:25 +02:00
Matt Sturgeon
517648dac0
wrappers/standalone: move module to wrappers/modules 2024-07-05 18:28:19 +01:00
Matt Sturgeon
2deb61f6a5
modules/top-level: move out of wrappers/modules 2024-07-05 17:20:28 +01:00
Matt Sturgeon
d2afb176ff
modules: refactor module bootstrapping
Let's simplify things by defining all modules in `./plugins`, `./modules`
and `./wrappers/modules`.

Instead of currying `pkgs` into a bootstrapping module, we can require
`defaultPkgs` be provided as a special arg.

This refactor allows us to completely remove `flake-modules/modules.nix`!
2024-07-02 19:58:30 +01:00
Matt Sturgeon
3d96960348 wrappers: simplify modules 2024-07-02 14:15:51 +00:00
Matt Sturgeon
55fee7051f
standalone: rename nixvimExtend to extend
This is our scope, so there's no need to be explicit.

This also follows the precedent set by `lib.extend`, although that takes
an overlay function.
2024-07-01 15:54:29 +01:00
Sandro Jäckel
662a0e1bdb wrappers: use system from stdenv.hostPlatform
`pgs.system` is a flaky alias and it is more reliable to directly use
`pkgs.stdenv.hostPlatform.system`
2024-06-30 09:54:24 +02:00
Gaetan Lepage
514413f631 wrappers/hm: add vimdiffAlias option 2024-06-03 00:29:52 +02:00
Matt Sturgeon
883d21d866
wrappers/output: omit blank neovimRcContent 2024-05-26 00:00:51 +01:00
Matt Sturgeon
1cc2e02fca
wrappers/output: fix initContent formatting
Originally introduced in 21c233919d
2024-05-25 22:52:03 +01:00
traxys
e035d22b64 standalone: Expose options
This can be used to teach `nixd` about NixVim options.
2024-05-15 09:41:21 +02:00
Michael Franzl
b731bedfb9 expose withRuby option 2024-05-07 16:46:16 +02:00
traxys
62f32bfc71 treewide: Reformat with nixfmt 2024-05-05 22:00:40 +02:00
Matt Sturgeon
21c233919d
output: format init.lua 2024-04-13 12:46:25 +01:00
Matt Sturgeon
3f7e6ce850
wrappers: expose config in standalone output (#1356) 2024-04-01 17:12:25 +02:00
traxys
6d1ef5864b
docs: Add a section on module specific options (#1355)
This commit only adds Home-Manager specific options, we should add
sections for the different kind of modules too.

This is _not_ added to the man docs, as it is more complex. If need
arises we could look into how to do it.
2024-03-30 14:52:32 +01:00
Aaron Adams
40286bf9b0
expose withNodeJs option (#1198) 2024-03-03 22:59:53 +01:00
Gabriel Arazas
d6a66851fe
wrappers: add env-specific config as part of NixVim module (#1075)
* wrappers: add env-specific config as part of NixVim module

* docs: add section for env-specific module arguments
2024-02-22 08:24:13 +01:00
traxys
9cd3721adf
standalone: Allow to extend a standalone derivation with a new module (#1142)
This adds the `nixvimExtend` attribute to the generated standalone
derivation, this attribute takes a module as an argument and returns a
new standalone derivation with the initial module & the extended module
merged together.
2024-02-22 08:22:21 +01:00
traxys
6d7e429537
tests: Introduce a way to disable options when running in tests (#1095)
In our basic template we used to provide a check based on
`mkTestDerivationFromNvim`. The issue with this check (that is handled
correctly internally) is that some plugins _can't_ be used in the test
environment, for example image.nvim like in #1085.

This commit introduces a new function to generate such checks,
`mkTestDerivationFromNixvimModule`, that wraps a nixvim configuration
instead of a built nvim instance.

Then a configuration can rely on the newly added
`helpers.enableExceptInTests` attribute to disable parts of the
configuration depending if it is evaluated in tests or in a real final
configuration.

Resolves #1085
2024-02-15 14:27:45 +01:00
Gabriel Arazas
0b5800a2a2
docs: clean up descriptions (#1061) 2024-02-11 13:51:34 +01:00
Gaetan Lepage
92c623a436 wrappers/modules: remove unused pluginWithConfigType 2024-02-09 23:05:59 +01:00
Gaetan Lepage
89b472606d modules/files: fix module 2024-02-09 21:18:46 +01:00
Gaetan Lepage
e32d155007 Revert "wrappers: remove shorthandOnlyDefinesConfig"
This reverts commit 8549bbeb0c.
2024-02-09 21:13:49 +01:00
Gaetan Lepage
8549bbeb0c wrappers: remove shorthandOnlyDefinesConfig 2024-02-09 16:18:53 +01:00
Gaetan Lepage
5d3ed3a09e misc: refactor helpers propagation
Co-authored-by: Robert Hensing <robert@roberthensing.nl>
2024-02-09 14:20:25 +01:00
Mirko Lenz
46ca452d0b
standalone: pass extraSpecialArgs to lib.evalModules directly (#914) 2024-01-07 20:49:17 +01:00
Peter Tonner
c795b2ee40 misc: fix python packages option name 2024-01-06 21:17:55 +01:00
Gaetan Lepage
d52f656a8b misc: fix python environment options 2024-01-06 20:11:22 +01:00
Gaetan Lepage
1ab5159acf modules: add python options to specify the python environment 2024-01-06 17:39:17 +01:00
Gaetan Lepage
10d114f5a6 misc/wrapRc: ignore user "after" directory when wrapRc is true 2024-01-04 09:22:31 +01:00
Gaetan Lepage
a2fa6753f9 misc/wrapRc: switch to XDG compliant path resolution 2024-01-02 13:20:07 +01:00
Gaetan Lepage
c359761871 misc/wrapRc: ignore user configuration when wrapRc is true 2024-01-02 11:31:18 +01:00
traxys
1f652b60e5
standalone: Fix extraSpecialArgs (#799)
This commit fixes the usage of `extraSpecialArgs` for standalone nixvim
installations and adds a test to ensure this.

Fixes #779
2023-12-09 15:42:15 +01:00
Gaetan Lepage
45d788bdd9 wrappers: add nixvim-print-init package 2023-12-07 14:38:21 +01:00
traxys
b58b23c799
wrapper: Use symlink join to install man pages for standalone (#736)
Patching the derivation forces a rebuild of neovim, which is
undesirable
2023-11-23 22:11:29 +01:00
Gaetan Lepage
a05b2a9cbf wrappers/standalone: fix 2023-11-21 10:00:48 +01:00
traxys
541b694873
docs: Allow to install man pages (#687) 2023-11-06 16:26:23 +01:00
traxys
0c5dcb56d1
standalone: Allow to pass extraSpecialArgs (#665) 2023-10-23 14:11:29 +02:00
municorn
3fd743fe80 docs: fix grammar, spelling, and text for enable options 2023-10-09 15:04:57 +02:00
Gaetan Lepage
59232f22b5 misc: fix defaultEditor option for HM and NixOS modules 2023-09-19 10:41:57 +02:00
mrtnvgr
bfd1c5bace
feat(options): add defaultEditor option (#589) 2023-09-18 16:38:58 +02:00
Gaetan Lepage
ac83e8c209 wrappers/nixos: set wrapRc to true 2023-08-14 22:14:49 +02:00
Tanish2002
efdcbe225f perform some statix linting and fixes 2023-05-22 23:00:53 +02:00
Mikaela Allan
744fdd1cd4
fix darwin wrapper (#349) 2023-04-26 18:12:54 +02:00
traxys
5a498edd14
modules/output: Allow to specify text to add as extra files (#343)
To enable some features (like adding tree-sitter queries) we need to add
files to specific directories in the runtime path (queries/lang/file.scm
for tree-sitter queries for example).

This commit adds support for specifying such files. You must be careful
to not have any collisions between `files` and `extraFiles`.
2023-04-21 20:04:58 +02:00
Luc Chabassier
a6eec507cc
Enable creation of other config files than init.lua (#246) 2023-04-20 22:41:37 +02:00