mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2024-12-21 19:09:49 +01:00
feat: customizable neovim package
This commit is contained in:
parent
f0dffff72e
commit
fcaed357f4
3 changed files with 16 additions and 12 deletions
|
@ -138,7 +138,7 @@ in {
|
|||
${optionalString (!cfg.enableEditorconfig) ''
|
||||
let g:editorconfig = v:false
|
||||
''}
|
||||
${optionalString (cfg.spellChecking.enable) ''
|
||||
${optionalString cfg.spellChecking.enable ''
|
||||
set spell
|
||||
set spelllang=${toString cfg.spellChecking.language}
|
||||
''}
|
||||
|
|
|
@ -1,11 +1,19 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with builtins; {
|
||||
options.vim = {
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.neovim-unwrapped;
|
||||
description = ''
|
||||
The neovim package to use. You will need to use an unwrapped package for this option to work as intended.
|
||||
'';
|
||||
};
|
||||
|
||||
debugMode = {
|
||||
enable = mkEnableOption "debug mode";
|
||||
level = mkOption {
|
||||
|
|
|
@ -6,7 +6,7 @@ inputs: {
|
|||
extraSpecialArgs ? {},
|
||||
}: let
|
||||
inherit (pkgs) neovim-unwrapped wrapNeovim vimPlugins;
|
||||
inherit (builtins) map filter isString toString getAttr hasAttr attrNames;
|
||||
inherit (builtins) map filter isString toString getAttr;
|
||||
inherit (pkgs.vimUtils) buildVimPluginFrom2Nix;
|
||||
|
||||
extendedLib = import ../lib/stdlib-extended.nix lib;
|
||||
|
@ -18,11 +18,7 @@ inputs: {
|
|||
|
||||
module = extendedLib.evalModules {
|
||||
modules = [configuration] ++ nvimModules;
|
||||
specialArgs =
|
||||
{
|
||||
modulesPath = toString ./.;
|
||||
}
|
||||
// extraSpecialArgs;
|
||||
specialArgs = {modulesPath = toString ./.;} // extraSpecialArgs;
|
||||
};
|
||||
|
||||
buildPlug = {pname, ...} @ args:
|
||||
|
@ -59,9 +55,10 @@ inputs: {
|
|||
(f: f != null)
|
||||
plugins);
|
||||
|
||||
neovim = wrapNeovim neovim-unwrapped {
|
||||
viAlias = vimOptions.viAlias;
|
||||
vimAlias = vimOptions.vimAlias;
|
||||
neovim = wrapNeovim vimOptions.package {
|
||||
inherit (vimOptions) viAlias;
|
||||
inherit (vimOptions) vimAlias;
|
||||
|
||||
configure = {
|
||||
customRC = vimOptions.builtConfigRC;
|
||||
|
||||
|
@ -72,7 +69,6 @@ inputs: {
|
|||
};
|
||||
};
|
||||
in {
|
||||
imports = [./assertions.nix];
|
||||
inherit (module) options config;
|
||||
inherit (module._module.args) pkgs;
|
||||
inherit neovim;
|
||||
|
|
Loading…
Reference in a new issue