feat: add debugMode

This commit is contained in:
NotAShelf 2023-03-01 11:34:23 +03:00
commit f491d49c15
No known key found for this signature in database
GPG key ID: 5B5C8895F28445F1
3 changed files with 33 additions and 3 deletions

View file

@ -28,6 +28,12 @@ in {
vim.nnoremap = mkIf cfg.mapLeaderSpace {"<space>" = "<nop>";};
vim.configRC.basic = nvim.dag.entryAfter ["globalsScript"] ''
" Debug mode settings
${optionalString cfg.debugMode.enable ''
set verbose=${toString cfg.debugMode.level}
set verbosefile=${cfg.debugMode.logFile}
''}
" Settings that are set for everything
set encoding=utf-8
set mouse=${cfg.mouseSupport}

View file

@ -9,6 +9,20 @@ with builtins; let
cfg = config.vim;
in {
options.vim = {
debugMode = {
enable = mkEnableOption "Enable debug mode";
level = mkOption {
type = types.int;
default = 20;
description = "Set the debug level";
};
logFile = mkOption {
type = types.path;
default = "/tmp/nvim.log";
description = "Set the log file";
};
};
colourTerm = mkOption {
type = types.bool;
default = true;