mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 16:39:00 +02:00
nixvim: support standalone nixvim
This represents a major rearchitecture for nixvim, so I'm leaving this up to track the progress for now, and to serve as a reference for any breaking changes during transition. The main change is, of course, being able to use nixvim standalone. To do this, you should use the new build function, which takes in two arguments: the system architecture (e.g. x86_64-linux) and the configuration. For the new configuration, do not use the programs.nixvim. prefix. For module development, the main change is that you should no longer prefix your modules with programs.nixvim..
This commit is contained in:
parent
bd6f978d51
commit
4ddd3969e5
52 changed files with 1410 additions and 904 deletions
|
@ -1,7 +1,7 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.programs.nixvim.plugins.neogit;
|
||||
cfg = config.plugins.neogit;
|
||||
helpers = import ../helpers.nix { inherit lib; };
|
||||
|
||||
sectionDefaultsModule = types.submodule {
|
||||
|
@ -15,7 +15,7 @@ let
|
|||
in
|
||||
{
|
||||
options = {
|
||||
programs.nixvim.plugins.neogit = {
|
||||
plugins.neogit = {
|
||||
enable = mkEnableOption "Enable neogit";
|
||||
|
||||
disableSigns = mkOption {
|
||||
|
@ -201,20 +201,21 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
config = let
|
||||
setupOptions = with cfg; helpers.toLuaObject {
|
||||
inherit kind integrations signs sections mappings;
|
||||
disable_signs = disableSigns;
|
||||
disable_hint = disableHint;
|
||||
disable_context_highlighting = disableContextHighlighting;
|
||||
disable_commit_confirmation = disableCommitConfirmation;
|
||||
auto_refresh = autoRefresh;
|
||||
disable_builtin_notifications = disableBuiltinNotifications;
|
||||
use_magit_keybindings = useMagitKeybindings;
|
||||
commit_popup = commitPopup;
|
||||
};
|
||||
in mkIf cfg.enable {
|
||||
programs.nixvim = {
|
||||
config =
|
||||
let
|
||||
setupOptions = with cfg; helpers.toLuaObject {
|
||||
inherit kind integrations signs sections mappings;
|
||||
disable_signs = disableSigns;
|
||||
disable_hint = disableHint;
|
||||
disable_context_highlighting = disableContextHighlighting;
|
||||
disable_commit_confirmation = disableCommitConfirmation;
|
||||
auto_refresh = autoRefresh;
|
||||
disable_builtin_notifications = disableBuiltinNotifications;
|
||||
use_magit_keybindings = useMagitKeybindings;
|
||||
commit_popup = commitPopup;
|
||||
};
|
||||
in
|
||||
mkIf cfg.enable {
|
||||
extraPlugins = with pkgs.vimPlugins; [
|
||||
neogit
|
||||
plenary-nvim
|
||||
|
@ -224,5 +225,4 @@ in
|
|||
require('neogit').setup(${setupOptions})
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue