mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-24 04:35:08 +02:00
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`.
This commit is contained in:
parent
52120a891d
commit
5a498edd14
4 changed files with 36 additions and 8 deletions
|
@ -26,12 +26,24 @@ in {
|
|||
configFiles = let
|
||||
cfg = config.programs.nixvim;
|
||||
in
|
||||
lib.mapAttrs'
|
||||
(
|
||||
_: file:
|
||||
lib.nameValuePair
|
||||
"nvim/${file.path}"
|
||||
{text = file.content;}
|
||||
lib.mapAttrs'
|
||||
(
|
||||
_: file:
|
||||
lib.nameValuePair
|
||||
"nvim/${file.path}"
|
||||
{text = file.content;}
|
||||
)
|
||||
cfg.files
|
||||
)
|
||||
cfg.files;
|
||||
// (
|
||||
lib.mapAttrs'
|
||||
(
|
||||
path: content:
|
||||
lib.nameValuePair
|
||||
"nvim/${path}"
|
||||
{text = content;}
|
||||
)
|
||||
cfg.extraFiles
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue