mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-01-02 17:15:55 +00:00
modules: start breaking down core modules; simplify tree structure
This commit is contained in:
parent
4703ed7731
commit
370913e827
242 changed files with 178 additions and 124 deletions
11
modules/plugins/utility/binds/cheatsheet/cheatsheet.nix
Normal file
11
modules/plugins/utility/binds/cheatsheet/cheatsheet.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkEnableOption;
|
||||
in {
|
||||
options.vim.binds.cheatsheet = {
|
||||
enable = mkEnableOption "cheatsheet-nvim: searchable cheatsheet for nvim using telescope";
|
||||
};
|
||||
}
|
||||
17
modules/plugins/utility/binds/cheatsheet/config.nix
Normal file
17
modules/plugins/utility/binds/cheatsheet/config.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf nvim;
|
||||
|
||||
cfg = config.vim.binds.cheatsheet;
|
||||
in {
|
||||
config = mkIf (cfg.enable) {
|
||||
vim.startPlugins = ["cheatsheet-nvim"];
|
||||
|
||||
vim.luaConfigRC.cheaetsheet-nvim = nvim.dag.entryAnywhere ''
|
||||
require('cheatsheet').setup({})
|
||||
'';
|
||||
};
|
||||
}
|
||||
6
modules/plugins/utility/binds/cheatsheet/default.nix
Normal file
6
modules/plugins/utility/binds/cheatsheet/default.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
_: {
|
||||
imports = [
|
||||
./cheatsheet.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
||||
6
modules/plugins/utility/binds/default.nix
Normal file
6
modules/plugins/utility/binds/default.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
_: {
|
||||
imports = [
|
||||
./which-key
|
||||
./cheatsheet
|
||||
];
|
||||
}
|
||||
127
modules/plugins/utility/binds/which-key/config.nix
Normal file
127
modules/plugins/utility/binds/which-key/config.nix
Normal file
|
|
@ -0,0 +1,127 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf nvim;
|
||||
|
||||
cfg = config.vim.binds.whichKey;
|
||||
in {
|
||||
config = mkIf (cfg.enable) {
|
||||
vim.startPlugins = ["which-key"];
|
||||
|
||||
vim.luaConfigRC.whichkey = nvim.dag.entryAnywhere ''
|
||||
local wk = require("which-key")
|
||||
wk.setup ({
|
||||
key_labels = {
|
||||
["<space>"] = "SPACE",
|
||||
["<leader>"] = "SPACE",
|
||||
["<cr>"] = "RETURN",
|
||||
["<tab>"] = "TAB",
|
||||
},
|
||||
|
||||
${lib.optionalString (config.vim.ui.borders.plugins.which-key.enable) ''
|
||||
window = {
|
||||
border = "${config.vim.ui.borders.plugins.which-key.style}",
|
||||
},
|
||||
''}
|
||||
})
|
||||
|
||||
wk.register({
|
||||
${
|
||||
if config.vim.tabline.nvimBufferline.enable
|
||||
then ''
|
||||
-- Buffer
|
||||
["<leader>b"] = { name = "+Buffer" },
|
||||
["<leader>bm"] = { name = "BufferLineMove" },
|
||||
["<leader>bs"] = { name = "BufferLineSort" },
|
||||
["<leader>bsi"] = { name = "BufferLineSortById" },
|
||||
''
|
||||
else ""
|
||||
}
|
||||
|
||||
${
|
||||
if config.vim.telescope.enable
|
||||
then ''
|
||||
["<leader>f"] = { name = "+Telescope" },
|
||||
-- Telescope
|
||||
["<leader>fl"] = { name = "Telescope LSP" },
|
||||
["<leader>fm"] = { name = "Cellular Automaton" }, -- TODO: mvoe this to its own parent group
|
||||
["<leader>fv"] = { name = "Telescope Git" },
|
||||
["<leader>fvc"] = { name = "Commits" },
|
||||
''
|
||||
else ""
|
||||
}
|
||||
|
||||
${
|
||||
if config.vim.lsp.trouble.enable
|
||||
then ''
|
||||
-- Trouble
|
||||
["<leader>lw"] = { name = "Workspace" },
|
||||
["<leader>x"] = { name = "+Trouble" }, -- TODO: move all trouble binds to the same parent group
|
||||
["<leader>l"] = { name = "+Trouble" },
|
||||
''
|
||||
else ""
|
||||
}
|
||||
|
||||
${
|
||||
if config.vim.lsp.nvimCodeActionMenu.enable
|
||||
then ''
|
||||
-- Parent Groups
|
||||
["<leader>c"] = { name = "+CodeAction" },
|
||||
''
|
||||
else ""
|
||||
}
|
||||
|
||||
${
|
||||
if config.vim.minimap.codewindow.enable || config.vim.minimap.minimap-vim.enable
|
||||
then ''
|
||||
-- Minimap
|
||||
["<leader>m"] = { name = "+Minimap" }, -- TODO: remap both minimap plugins' keys to be the same
|
||||
''
|
||||
else ""
|
||||
}
|
||||
|
||||
${
|
||||
if config.vim.notes.mind-nvim.enable || config.vim.notes.obsidian.enable || config.vim.notes.orgmode.enable
|
||||
then ''
|
||||
-- Notes
|
||||
["<leader>o"] = { name = "+Notes" },
|
||||
-- TODO: options for other note taking plugins and their individual binds
|
||||
-- TODO: move all note-taker binds under leader + o
|
||||
''
|
||||
else ""
|
||||
}
|
||||
|
||||
${
|
||||
# TODO: This probably will need to be reworked for custom-keybinds
|
||||
if config.vim.filetree.nvimTree.enable
|
||||
then ''
|
||||
-- NvimTree
|
||||
["<leader>t"] = { name = "+NvimTree" },
|
||||
''
|
||||
else ""
|
||||
}
|
||||
|
||||
${
|
||||
if config.vim.git.gitsigns.enable
|
||||
then ''
|
||||
-- Git
|
||||
["<leader>g"] = { name = "+Gitsigns" },
|
||||
''
|
||||
else ""
|
||||
}
|
||||
|
||||
${
|
||||
if config.vim.utility.preview.glow.enable
|
||||
then ''
|
||||
-- Markdown
|
||||
["<leader>pm"] = { name = "+Preview Markdown" },
|
||||
''
|
||||
else ""
|
||||
}
|
||||
|
||||
})
|
||||
'';
|
||||
};
|
||||
}
|
||||
6
modules/plugins/utility/binds/which-key/default.nix
Normal file
6
modules/plugins/utility/binds/which-key/default.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
_: {
|
||||
imports = [
|
||||
./which-key.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
||||
7
modules/plugins/utility/binds/which-key/which-key.nix
Normal file
7
modules/plugins/utility/binds/which-key/which-key.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{lib, ...}: let
|
||||
inherit (lib) mkEnableOption;
|
||||
in {
|
||||
options.vim.binds.whichKey = {
|
||||
enable = mkEnableOption "which-key keybind helper menu";
|
||||
};
|
||||
}
|
||||
13
modules/plugins/utility/ccc/ccc.nix
Normal file
13
modules/plugins/utility/ccc/ccc.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{lib, ...}: let
|
||||
inherit (lib) mkEnableOption mkMappingOption;
|
||||
in {
|
||||
options.vim.utility.ccc = {
|
||||
enable = mkEnableOption "ccc color picker for neovim";
|
||||
|
||||
mappings = {
|
||||
quit = mkMappingOption "Cancel and close the UI without replace or insert" "<Esc>";
|
||||
increase10 = mkMappingOption "Increase the value times delta of the slider" "<L>";
|
||||
decrease10 = mkMappingOption "Decrease the value times delta of the slider" "<H>";
|
||||
};
|
||||
};
|
||||
}
|
||||
57
modules/plugins/utility/ccc/config.nix
Normal file
57
modules/plugins/utility/ccc/config.nix
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) addDescriptionsToMappings mkIf nvim;
|
||||
|
||||
cfg = config.vim.utility.ccc;
|
||||
self = import ./ccc.nix {inherit lib;};
|
||||
|
||||
mappingDefinitions = self.options.vim.utility.ccc.mappings;
|
||||
mappings = addDescriptionsToMappings cfg.mappings mappingDefinitions;
|
||||
in {
|
||||
config = mkIf (cfg.enable) {
|
||||
vim.startPlugins = [
|
||||
"ccc"
|
||||
];
|
||||
|
||||
vim.luaConfigRC.ccc = nvim.dag.entryAnywhere ''
|
||||
local ccc = require("ccc")
|
||||
ccc.setup {
|
||||
highlighter = {
|
||||
auto_enable = true,
|
||||
max_byte = 2 * 1024 * 1024, -- 2mb
|
||||
lsp = true,
|
||||
filetypes = colorPickerFts,
|
||||
},
|
||||
pickers = {
|
||||
ccc.picker.hex,
|
||||
ccc.picker.css_rgb,
|
||||
ccc.picker.css_hsl,
|
||||
ccc.picker.ansi_escape {
|
||||
meaning1 = "bright", -- whether the 1 means bright or yellow
|
||||
},
|
||||
},
|
||||
alpha_show = "hide", -- needed when highlighter.lsp is set to true
|
||||
recognize = { output = true }, -- automatically recognize color format under cursor
|
||||
inputs = { ccc.input.hsl },
|
||||
outputs = {
|
||||
ccc.output.css_hsl,
|
||||
ccc.output.css_rgb,
|
||||
ccc.output.hex,
|
||||
},
|
||||
convert = {
|
||||
{ ccc.picker.hex, ccc.output.css_hsl },
|
||||
{ ccc.picker.css_rgb, ccc.output.css_hsl },
|
||||
{ ccc.picker.css_hsl, ccc.output.hex },
|
||||
},
|
||||
mappings = {
|
||||
["q"] = ccc.mapping.quit,
|
||||
["L"] = ccc.mapping.increase10,
|
||||
["H"] = ccc.mapping.decrease10,
|
||||
},
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
6
modules/plugins/utility/ccc/default.nix
Normal file
6
modules/plugins/utility/ccc/default.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
_: {
|
||||
imports = [
|
||||
./ccc.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
||||
15
modules/plugins/utility/default.nix
Normal file
15
modules/plugins/utility/default.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
_: {
|
||||
imports = [
|
||||
./binds
|
||||
./gestures
|
||||
./motion
|
||||
./telescope
|
||||
./ccc
|
||||
./icon-picker
|
||||
./telescope
|
||||
./diffview
|
||||
./wakatime
|
||||
./surround
|
||||
./preview
|
||||
];
|
||||
}
|
||||
20
modules/plugins/utility/diffview/config.nix
Normal file
20
modules/plugins/utility/diffview/config.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf nvim;
|
||||
|
||||
cfg = config.vim.utility.diffview-nvim;
|
||||
in {
|
||||
config = mkIf (cfg.enable) {
|
||||
vim.startPlugins = [
|
||||
"diffview-nvim"
|
||||
"plenary-nvim"
|
||||
];
|
||||
|
||||
vim.luaConfigRC.diffview-nvim =
|
||||
nvim.dag.entryAnywhere ''
|
||||
'';
|
||||
};
|
||||
}
|
||||
6
modules/plugins/utility/diffview/default.nix
Normal file
6
modules/plugins/utility/diffview/default.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
_: {
|
||||
imports = [
|
||||
./config.nix
|
||||
./diffview.nix
|
||||
];
|
||||
}
|
||||
7
modules/plugins/utility/diffview/diffview.nix
Normal file
7
modules/plugins/utility/diffview/diffview.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{lib, ...}: let
|
||||
inherit (lib) mkEnableOption;
|
||||
in {
|
||||
options.vim.utility.diffview-nvim = {
|
||||
enable = mkEnableOption "diffview-nvim: cycle through diffs for all modified files for any git rev";
|
||||
};
|
||||
}
|
||||
5
modules/plugins/utility/gestures/default.nix
Normal file
5
modules/plugins/utility/gestures/default.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
_: {
|
||||
imports = [
|
||||
./gesture-nvim
|
||||
];
|
||||
}
|
||||
55
modules/plugins/utility/gestures/gesture-nvim/config.nix
Normal file
55
modules/plugins/utility/gestures/gesture-nvim/config.nix
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) addDescriptionsToMappings mkIf mkMerge mkSetLuaBinding nvim;
|
||||
|
||||
cfg = config.vim.gestures.gesture-nvim;
|
||||
|
||||
self = import ./gesture-nvim.nix {inherit lib;};
|
||||
|
||||
mappingDefinitions = self.options.vim.gestures.gesture-nvim.mappings;
|
||||
mappings = addDescriptionsToMappings cfg.mappings mappingDefinitions;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
vim.startPlugins = ["gesture-nvim"];
|
||||
|
||||
vim.maps.normal = mkMerge [
|
||||
(mkSetLuaBinding mappings.draw "require('gesture').draw")
|
||||
(mkSetLuaBinding mappings.finish "require('gesture').finish")
|
||||
(mkIf (mappings.draw.value == "<RightDrag>") {
|
||||
"<RightMouse>" = {action = "<Nop>";};
|
||||
})
|
||||
];
|
||||
|
||||
vim.luaConfigRC.gesture-nvim = nvim.dag.entryAnywhere ''
|
||||
vim.opt.mouse = "a"
|
||||
|
||||
local gesture = require("gesture")
|
||||
gesture.register({
|
||||
name = "scroll to bottom",
|
||||
inputs = { gesture.up(), gesture.down() },
|
||||
action = "normal! G",
|
||||
})
|
||||
gesture.register({
|
||||
name = "next tab",
|
||||
inputs = { gesture.right() },
|
||||
action = "tabnext",
|
||||
})
|
||||
gesture.register({
|
||||
name = "previous tab",
|
||||
inputs = { gesture.left() },
|
||||
action = function(ctx) -- also can use callable
|
||||
vim.cmd.tabprevious()
|
||||
end,
|
||||
})
|
||||
gesture.register({
|
||||
name = "go back",
|
||||
inputs = { gesture.right(), gesture.left() },
|
||||
-- map to `<C-o>` keycode
|
||||
action = [[lua vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes("<C-o>", true, false, true), "n", true)]],
|
||||
})
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
_: {
|
||||
imports = [
|
||||
./gesture-nvim.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
{lib, ...}: let
|
||||
inherit (lib) mkEnableOption mkMappingOption;
|
||||
in {
|
||||
options.vim.gestures.gesture-nvim = {
|
||||
enable = mkEnableOption "gesture-nvim: mouse gestures";
|
||||
|
||||
mappings = {
|
||||
draw = mkMappingOption "Start drawing [gesture.nvim]" "<LeftDrag>";
|
||||
finish = mkMappingOption "Finish drawing [gesture.nvim]" "<LeftRelease>";
|
||||
};
|
||||
};
|
||||
}
|
||||
22
modules/plugins/utility/icon-picker/config.nix
Normal file
22
modules/plugins/utility/icon-picker/config.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf nvim;
|
||||
|
||||
cfg = config.vim.utility.icon-picker;
|
||||
in {
|
||||
config = mkIf (cfg.enable) {
|
||||
vim.startPlugins = [
|
||||
"icon-picker-nvim"
|
||||
"dressing-nvim"
|
||||
];
|
||||
|
||||
vim.luaConfigRC.icon-picker = nvim.dag.entryAnywhere ''
|
||||
require("icon-picker").setup({
|
||||
disable_legacy_commands = true
|
||||
})
|
||||
'';
|
||||
};
|
||||
}
|
||||
6
modules/plugins/utility/icon-picker/default.nix
Normal file
6
modules/plugins/utility/icon-picker/default.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
_: {
|
||||
imports = [
|
||||
./icon-picker.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
||||
7
modules/plugins/utility/icon-picker/icon-picker.nix
Normal file
7
modules/plugins/utility/icon-picker/icon-picker.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{lib, ...}: let
|
||||
inherit (lib) mkEnableOption;
|
||||
in {
|
||||
options.vim.utility.icon-picker = {
|
||||
enable = mkEnableOption "nerdfonts icon picker for nvim";
|
||||
};
|
||||
}
|
||||
6
modules/plugins/utility/motion/default.nix
Normal file
6
modules/plugins/utility/motion/default.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
_: {
|
||||
imports = [
|
||||
./hop
|
||||
./leap
|
||||
];
|
||||
}
|
||||
24
modules/plugins/utility/motion/hop/config.nix
Normal file
24
modules/plugins/utility/motion/hop/config.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) addDescriptionsToMappings mkIf mkSetBinding nvim;
|
||||
|
||||
cfg = config.vim.utility.motion.hop;
|
||||
|
||||
self = import ./hop.nix {inherit lib;};
|
||||
|
||||
mappingDefinitions = self.options.vim.utility.motion.hop.mappings;
|
||||
mappings = addDescriptionsToMappings cfg.mappings mappingDefinitions;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
vim.startPlugins = ["hop-nvim"];
|
||||
|
||||
vim.maps.normal = mkSetBinding mappings.hop "<cmd> HopPattern<CR>";
|
||||
|
||||
vim.luaConfigRC.hop-nvim = nvim.dag.entryAnywhere ''
|
||||
require('hop').setup()
|
||||
'';
|
||||
};
|
||||
}
|
||||
6
modules/plugins/utility/motion/hop/default.nix
Normal file
6
modules/plugins/utility/motion/hop/default.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
_: {
|
||||
imports = [
|
||||
./hop.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
||||
11
modules/plugins/utility/motion/hop/hop.nix
Normal file
11
modules/plugins/utility/motion/hop/hop.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{lib, ...}: let
|
||||
inherit (lib) mkMappingOption mkEnableOption;
|
||||
in {
|
||||
options.vim.utility.motion.hop = {
|
||||
mappings = {
|
||||
hop = mkMappingOption "Jump to occurences [hop.nvim]" "<leader>h";
|
||||
};
|
||||
|
||||
enable = mkEnableOption "Hop.nvim plugin (easy motion)";
|
||||
};
|
||||
}
|
||||
71
modules/plugins/utility/motion/leap/config.nix
Normal file
71
modules/plugins/utility/motion/leap/config.nix
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkMerge mkBinding nvim;
|
||||
|
||||
cfg = config.vim.utility.motion.leap;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
vim.startPlugins = [
|
||||
"leap-nvim"
|
||||
"vim-repeat"
|
||||
];
|
||||
|
||||
vim.maps.normal = mkMerge [
|
||||
(mkBinding cfg.mappings.leapForwardTo "<Plug>(leap-forward-to)" "Leap forward to")
|
||||
(mkBinding cfg.mappings.leapBackwardTo "<Plug>(leap-backward-to)" "Leap backward to")
|
||||
(mkBinding cfg.mappings.leapFromWindow "<Plug>(leap-from-window)" "Leap from window")
|
||||
];
|
||||
|
||||
vim.maps.operator = mkMerge [
|
||||
(mkBinding cfg.mappings.leapForwardTo "<Plug>(leap-forward-to)" "Leap forward to")
|
||||
(mkBinding cfg.mappings.leapBackwardTo "<Plug>(leap-backward-to)" "Leap backward to")
|
||||
(mkBinding cfg.mappings.leapForwardTill "<Plug>(leap-forward-till)" "Leap forward till")
|
||||
(mkBinding cfg.mappings.leapBackwardTill "<Plug>(leap-backward-till)" "Leap backward till")
|
||||
(mkBinding cfg.mappings.leapFromWindow "<Plug>(leap-from-window)" "Leap from window")
|
||||
];
|
||||
|
||||
vim.maps.visualOnly = mkMerge [
|
||||
(mkBinding cfg.mappings.leapForwardTo "<Plug>(leap-forward-to)" "Leap forward to")
|
||||
(mkBinding cfg.mappings.leapBackwardTo "<Plug>(leap-backward-to)" "Leap backward to")
|
||||
(mkBinding cfg.mappings.leapForwardTill "<Plug>(leap-forward-till)" "Leap forward till")
|
||||
(mkBinding cfg.mappings.leapBackwardTill "<Plug>(leap-backward-till)" "Leap backward till")
|
||||
(mkBinding cfg.mappings.leapFromWindow "<Plug>(leap-from-window)" "Leap from window")
|
||||
];
|
||||
|
||||
vim.luaConfigRC.leap-nvim = nvim.dag.entryAnywhere ''
|
||||
require('leap').opts = {
|
||||
max_phase_one_targets = nil,
|
||||
highlight_unlabeled_phase_one_targets = false,
|
||||
max_highlighted_traversal_targets = 10,
|
||||
case_sensitive = false,
|
||||
equivalence_classes = { ' \t\r\n', },
|
||||
substitute_chars = {},
|
||||
safe_labels = {
|
||||
"s", "f", "n", "u", "t", "/",
|
||||
"S", "F", "N", "L", "H", "M", "U", "G", "T", "?", "Z"
|
||||
},
|
||||
labels = {
|
||||
"s", "f", "n",
|
||||
"j", "k", "l", "h", "o", "d", "w", "e", "m", "b",
|
||||
"u", "y", "v", "r", "g", "t", "c", "x", "/", "z",
|
||||
"S", "F", "N",
|
||||
"J", "K", "L", "H", "O", "D", "W", "E", "M", "B",
|
||||
"U", "Y", "V", "R", "G", "T", "C", "X", "?", "Z"
|
||||
},
|
||||
special_keys = {
|
||||
repeat_search = '<enter>',
|
||||
next_phase_one_target = '<enter>',
|
||||
next_target = {'<enter>', ';'},
|
||||
prev_target = {'<tab>', ','},
|
||||
next_group = '<space>',
|
||||
prev_group = '<tab>',
|
||||
multi_accept = '<enter>',
|
||||
multi_revert = '<backspace>',
|
||||
},
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
6
modules/plugins/utility/motion/leap/default.nix
Normal file
6
modules/plugins/utility/motion/leap/default.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
_: {
|
||||
imports = [
|
||||
./leap.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
||||
35
modules/plugins/utility/motion/leap/leap.nix
Normal file
35
modules/plugins/utility/motion/leap/leap.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{lib, ...}: let
|
||||
inherit (lib) mkEnableOption mkOption types;
|
||||
in {
|
||||
options.vim.utility.motion.leap = {
|
||||
enable = mkEnableOption "leap.nvim plugin (easy motion)";
|
||||
|
||||
mappings = {
|
||||
leapForwardTo = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
description = "Leap forward to";
|
||||
default = "s";
|
||||
};
|
||||
leapBackwardTo = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
description = "Leap backward to";
|
||||
default = "S";
|
||||
};
|
||||
leapForwardTill = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
description = "Leap forward till";
|
||||
default = "x";
|
||||
};
|
||||
leapBackwardTill = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
description = "Leap backward till";
|
||||
default = "X";
|
||||
};
|
||||
leapFromWindow = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
description = "Leap from window";
|
||||
default = "gs";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
6
modules/plugins/utility/preview/default.nix
Normal file
6
modules/plugins/utility/preview/default.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./markdown-preview
|
||||
./glow
|
||||
];
|
||||
}
|
||||
28
modules/plugins/utility/preview/glow/config.nix
Normal file
28
modules/plugins/utility/preview/glow/config.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) nvim mkIf mkMerge mkBinding;
|
||||
|
||||
cfg = config.vim.utility.preview.glow;
|
||||
self = import ./glow.nix {
|
||||
inherit lib config pkgs;
|
||||
};
|
||||
mappings = self.options.vim.utility.preview.glow.mappings;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
vim.startPlugins = ["glow-nvim"];
|
||||
|
||||
vim.maps.normal = mkMerge [
|
||||
(mkBinding cfg.mappings.openPreview ":Glow<CR>" mappings.openPreview.description)
|
||||
];
|
||||
|
||||
vim.luaConfigRC.glow = nvim.dag.entryAnywhere ''
|
||||
require('glow').setup({
|
||||
glow_path = "${pkgs.glow}/bin/glow"
|
||||
});
|
||||
'';
|
||||
};
|
||||
}
|
||||
6
modules/plugins/utility/preview/glow/default.nix
Normal file
6
modules/plugins/utility/preview/glow/default.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./glow.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
||||
14
modules/plugins/utility/preview/glow/glow.nix
Normal file
14
modules/plugins/utility/preview/glow/glow.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{lib, ...}: let
|
||||
inherit (lib) mkEnableOption mkMappingOption mkRenamedOptionModule;
|
||||
in {
|
||||
imports = [
|
||||
(mkRenamedOptionModule ["vim" "languages" "markdown" "glow" "enable"] ["vim" "utility" "preview" "glow" "enable"])
|
||||
];
|
||||
|
||||
options.vim.utility.preview = {
|
||||
glow = {
|
||||
enable = mkEnableOption "markdown preview in neovim with glow";
|
||||
mappings.openPreview = mkMappingOption "Open preview" "<leader>p";
|
||||
};
|
||||
};
|
||||
}
|
||||
26
modules/plugins/utility/preview/markdown-preview/config.nix
Normal file
26
modules/plugins/utility/preview/markdown-preview/config.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) nvim mkIf concatMapStringsSep optionalString stringLength;
|
||||
inherit (nvim.vim) mkVimBool;
|
||||
|
||||
cfg = config.vim.utility.preview.markdownPreview;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
vim.startPlugins = [pkgs.vimPlugins.markdown-preview-nvim];
|
||||
|
||||
vim.configRC.markdown-preview = nvim.dag.entryAnywhere ''
|
||||
let g:mkdp_auto_start = ${mkVimBool cfg.autoStart}
|
||||
let g:mkdp_auto_close = ${mkVimBool cfg.autoClose}
|
||||
let g:mkdp_refresh_slow = ${mkVimBool cfg.lazyRefresh}
|
||||
let g:mkdp_filetypes = [${concatMapStringsSep ", " (x: "'" + x + "'") cfg.filetypes}]
|
||||
let g:mkdp_command_for_global = ${mkVimBool cfg.alwaysAllowPreview}
|
||||
let g:mkdp_open_to_the_world = ${mkVimBool cfg.broadcastServer}
|
||||
${optionalString (stringLength cfg.customIP > 0) "let g:mkdp_open_ip = '${cfg.customIP}'"}
|
||||
${optionalString (stringLength cfg.customPort > 0) "let g:mkdp_port = '${cfg.customPort}'"}
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./markdown-preview.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
{lib, ...}: let
|
||||
inherit (lib) types mkEnableOption mkOption;
|
||||
in {
|
||||
options.vim.utility.preview = {
|
||||
markdownPreview = {
|
||||
enable = mkEnableOption "Markdown preview in neovim with markdown-preview.nvim";
|
||||
|
||||
autoStart = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "Automatically open the preview window after entering a Markdown buffer";
|
||||
};
|
||||
|
||||
autoClose = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = "Automatically close the preview window after leaving a Markdown buffer";
|
||||
};
|
||||
|
||||
lazyRefresh = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "Only update preview when saving or leaving insert mode";
|
||||
};
|
||||
|
||||
filetypes = mkOption {
|
||||
type = with types; listOf str;
|
||||
default = ["markdown"];
|
||||
description = "Allowed filetypes";
|
||||
};
|
||||
|
||||
alwaysAllowPreview = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "Allow preview on all filetypes";
|
||||
};
|
||||
|
||||
broadcastServer = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "Allow for outside and network wide connections";
|
||||
};
|
||||
|
||||
customIP = mkOption {
|
||||
type = types.str;
|
||||
default = "";
|
||||
description = "IP-address to use";
|
||||
};
|
||||
|
||||
customPort = mkOption {
|
||||
type = types.str;
|
||||
default = "";
|
||||
description = "Port to use";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
43
modules/plugins/utility/surround/config.nix
Normal file
43
modules/plugins/utility/surround/config.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) addDescriptionsToMappings mkIf mkMerge mkSetBinding nvim;
|
||||
|
||||
cfg = config.vim.utility.surround;
|
||||
self = import ./surround.nix {inherit lib config;};
|
||||
mappingDefinitions = self.options.vim.utility.surround.mappings;
|
||||
mappings = addDescriptionsToMappings cfg.mappings mappingDefinitions;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
vim = {
|
||||
startPlugins = [
|
||||
"nvim-surround"
|
||||
];
|
||||
|
||||
luaConfigRC.surround = nvim.dag.entryAnywhere ''
|
||||
require('nvim-surround').setup()
|
||||
'';
|
||||
|
||||
maps = {
|
||||
insert = mkMerge [
|
||||
(mkIf (mappings.insert != null) (mkSetBinding mappings.insert "<Plug>(nvim-surround-insert)"))
|
||||
(mkIf (mappings.insertLine != null) (mkSetBinding mappings.insertLine "<Plug>(nvim-surround-insert-line)"))
|
||||
];
|
||||
normal = mkMerge [
|
||||
(mkIf (mappings.normal != null) (mkSetBinding mappings.normal "<Plug>(nvim-surround-normal)"))
|
||||
(mkIf (mappings.normalCur != null) (mkSetBinding mappings.normalCur "<Plug>(nvim-surround-normal-cur)"))
|
||||
(mkIf (mappings.normalLine != null) (mkSetBinding mappings.normalLine "<Plug>(nvim-surround-normal-line)"))
|
||||
(mkIf (mappings.normalCurLine != null) (mkSetBinding mappings.normalCurLine "<Plug>(nvim-surround-normal-cur-line)"))
|
||||
(mkIf (mappings.delete != null) (mkSetBinding mappings.delete "<Plug>(nvim-surround-delete)"))
|
||||
(mkIf (mappings.change != null) (mkSetBinding mappings.change "<Plug>(nvim-surround-change)"))
|
||||
];
|
||||
visualOnly = mkMerge [
|
||||
(mkIf (mappings.visual != null) (mkSetBinding mappings.visual "<Plug>(nvim-surround-visual)"))
|
||||
(mkIf (mappings.visualLine != null) (mkSetBinding mappings.visualLine "<Plug>(nvim-surround-visual-line)"))
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
6
modules/plugins/utility/surround/default.nix
Normal file
6
modules/plugins/utility/surround/default.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
_: {
|
||||
imports = [
|
||||
./config.nix
|
||||
./surround.nix
|
||||
];
|
||||
}
|
||||
88
modules/plugins/utility/surround/surround.nix
Normal file
88
modules/plugins/utility/surround/surround.nix
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkOption types mkIf mkDefault;
|
||||
in {
|
||||
options.vim.utility.surround = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "nvim-surround: add/change/delete surrounding delimiter pairs with ease. Note that the default mappings deviate from upstreeam to avoid conflicts with nvim-leap.";
|
||||
};
|
||||
useVendoredKeybindings = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = "Use alternative set of keybindings that avoids conflicts with other popular plugins, e.g. nvim-leap";
|
||||
};
|
||||
mappings = {
|
||||
insert = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = "<C-g>z";
|
||||
description = "Add surround character around the cursor";
|
||||
};
|
||||
insertLine = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = "<C-g>Z";
|
||||
description = "Add surround character around the cursor on new lines";
|
||||
};
|
||||
normal = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = "gz";
|
||||
description = "Surround motion with character";
|
||||
};
|
||||
normalCur = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = "gZ";
|
||||
description = "Surround motion with character on new lines";
|
||||
};
|
||||
normalLine = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = "gzz";
|
||||
description = "Surround line with character";
|
||||
};
|
||||
normalCurLine = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = "gZZ";
|
||||
description = "Surround line with character on new lines";
|
||||
};
|
||||
visual = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = "gz";
|
||||
description = "Surround selection with character";
|
||||
};
|
||||
visualLine = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = "gZ";
|
||||
description = "Surround selection with character on new lines";
|
||||
};
|
||||
delete = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = "gzd";
|
||||
description = "Delete surrounding character";
|
||||
};
|
||||
change = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = "gzr";
|
||||
description = "Change surrounding character";
|
||||
};
|
||||
};
|
||||
};
|
||||
config.vim.utility.surround = let
|
||||
cfg = config.vim.utility.surround;
|
||||
in {
|
||||
mappings = mkIf (! cfg.useVendoredKeybindings) (mkDefault {
|
||||
insert = null;
|
||||
insertLine = null;
|
||||
normal = null;
|
||||
normalCur = null;
|
||||
normalLine = null;
|
||||
normalCurLine = null;
|
||||
visual = null;
|
||||
visualLine = null;
|
||||
delete = null;
|
||||
change = null;
|
||||
});
|
||||
};
|
||||
}
|
||||
123
modules/plugins/utility/telescope/config.nix
Normal file
123
modules/plugins/utility/telescope/config.nix
Normal file
|
|
@ -0,0 +1,123 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) addDescriptionsToMappings mkIf mkMerge mkSetBinding nvim;
|
||||
|
||||
cfg = config.vim.telescope;
|
||||
self = import ./telescope.nix {inherit lib;};
|
||||
mappingDefinitions = self.options.vim.telescope.mappings;
|
||||
|
||||
mappings = addDescriptionsToMappings cfg.mappings mappingDefinitions;
|
||||
in {
|
||||
config = mkIf (cfg.enable) {
|
||||
vim.startPlugins = [
|
||||
"telescope"
|
||||
];
|
||||
|
||||
vim.maps.normal = mkMerge [
|
||||
(mkSetBinding mappings.findFiles "<cmd> Telescope find_files<CR>")
|
||||
(mkSetBinding mappings.liveGrep "<cmd> Telescope live_grep<CR>")
|
||||
(mkSetBinding mappings.buffers "<cmd> Telescope buffers<CR>")
|
||||
(mkSetBinding mappings.helpTags "<cmd> Telescope help_tags<CR>")
|
||||
(mkSetBinding mappings.open "<cmd> Telescope<CR>")
|
||||
|
||||
(mkSetBinding mappings.gitCommits "<cmd> Telescope git_commits<CR>")
|
||||
(mkSetBinding mappings.gitBufferCommits "<cmd> Telescope git_bcommits<CR>")
|
||||
(mkSetBinding mappings.gitBranches "<cmd> Telescope git_branches<CR>")
|
||||
(mkSetBinding mappings.gitStatus "<cmd> Telescope git_status<CR>")
|
||||
(mkSetBinding mappings.gitStash "<cmd> Telescope git_stash<CR>")
|
||||
|
||||
(mkIf config.vim.lsp.enable (mkMerge [
|
||||
(mkSetBinding mappings.lspDocumentSymbols "<cmd> Telescope lsp_document_symbols<CR>")
|
||||
(mkSetBinding mappings.lspWorkspaceSymbols "<cmd> Telescope lsp_workspace_symbols<CR>")
|
||||
|
||||
(mkSetBinding mappings.lspReferences "<cmd> Telescope lsp_references<CR>")
|
||||
(mkSetBinding mappings.lspImplementations "<cmd> Telescope lsp_implementations<CR>")
|
||||
(mkSetBinding mappings.lspDefinitions "<cmd> Telescope lsp_definitions<CR>")
|
||||
(mkSetBinding mappings.lspTypeDefinitions "<cmd> Telescope lsp_type_definitions<CR>")
|
||||
(mkSetBinding mappings.diagnostics "<cmd> Telescope diagnostics<CR>")
|
||||
]))
|
||||
|
||||
(
|
||||
mkIf config.vim.treesitter.enable
|
||||
(mkSetBinding mappings.treesitter "<cmd> Telescope treesitter<CR>")
|
||||
)
|
||||
|
||||
(
|
||||
mkIf config.vim.projects.project-nvim.enable
|
||||
(mkSetBinding mappings.findProjects "<cmd Telescope projects<CR>")
|
||||
)
|
||||
];
|
||||
|
||||
vim.luaConfigRC.telescope = nvim.dag.entryAnywhere ''
|
||||
local telescope = require('telescope')
|
||||
telescope.setup {
|
||||
defaults = {
|
||||
vimgrep_arguments = {
|
||||
"${pkgs.ripgrep}/bin/rg",
|
||||
"--color=never",
|
||||
"--no-heading",
|
||||
"--with-filename",
|
||||
"--line-number",
|
||||
"--column",
|
||||
"--smart-case",
|
||||
"--hidden",
|
||||
"--no-ignore",
|
||||
},
|
||||
pickers = {
|
||||
find_command = {
|
||||
"${pkgs.fd}/bin/fd",
|
||||
},
|
||||
},
|
||||
},
|
||||
prompt_prefix = " ",
|
||||
selection_caret = " ",
|
||||
entry_prefix = " ",
|
||||
initial_mode = "insert",
|
||||
selection_strategy = "reset",
|
||||
sorting_strategy = "ascending",
|
||||
layout_strategy = "horizontal",
|
||||
layout_config = {
|
||||
horizontal = {
|
||||
prompt_position = "top",
|
||||
preview_width = 0.55,
|
||||
results_width = 0.8,
|
||||
},
|
||||
vertical = {
|
||||
mirror = false,
|
||||
},
|
||||
width = 0.8,
|
||||
height = 0.8,
|
||||
preview_cutoff = 120,
|
||||
},
|
||||
file_ignore_patterns = { "node_modules", ".git/", "dist/", "build/", "target/", "result/" }, -- TODO: make this configurable
|
||||
color_devicons = true,
|
||||
path_display = { "absolute" },
|
||||
set_env = { ["COLORTERM"] = "truecolor" },
|
||||
winblend = 0,
|
||||
border = {},
|
||||
}
|
||||
|
||||
${
|
||||
if config.vim.ui.noice.enable
|
||||
then "telescope.load_extension('noice')"
|
||||
else ""
|
||||
}
|
||||
|
||||
${
|
||||
if config.vim.notify.nvim-notify.enable
|
||||
then "telescope.load_extension('notify')"
|
||||
else ""
|
||||
}
|
||||
|
||||
${
|
||||
if config.vim.projects.project-nvim.enable
|
||||
then "telescope.load_extension('projects')"
|
||||
else ""
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
6
modules/plugins/utility/telescope/default.nix
Normal file
6
modules/plugins/utility/telescope/default.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
_: {
|
||||
imports = [
|
||||
./telescope.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
||||
33
modules/plugins/utility/telescope/telescope.nix
Normal file
33
modules/plugins/utility/telescope/telescope.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{lib, ...}: let
|
||||
inherit (lib) mkMappingOption mkEnableOption;
|
||||
in {
|
||||
options.vim.telescope = {
|
||||
mappings = {
|
||||
findProjects = mkMappingOption "Find files [Telescope]" "<leader>fp";
|
||||
|
||||
findFiles = mkMappingOption "Find files [Telescope]" "<leader>ff";
|
||||
liveGrep = mkMappingOption "Live grep [Telescope]" "<leader>fg";
|
||||
buffers = mkMappingOption "Buffers [Telescope]" "<leader>fb";
|
||||
helpTags = mkMappingOption "Help tags [Telescope]" "<leader>fh";
|
||||
open = mkMappingOption "Open [Telescope]" "<leader>ft";
|
||||
|
||||
gitCommits = mkMappingOption "Git commits [Telescope]" "<leader>fvcw";
|
||||
gitBufferCommits = mkMappingOption "Git buffer commits [Telescope]" "<leader>fvcb";
|
||||
gitBranches = mkMappingOption "Git branches [Telescope]" "<leader>fvb";
|
||||
gitStatus = mkMappingOption "Git status [Telescope]" "<leader>fvs";
|
||||
gitStash = mkMappingOption "Git stash [Telescope]" "<leader>fvx";
|
||||
|
||||
lspDocumentSymbols = mkMappingOption "LSP Document Symbols [Telescope]" "<leader>flsb";
|
||||
lspWorkspaceSymbols = mkMappingOption "LSP Workspace Symbols [Telescope]" "<leader>flsw";
|
||||
lspReferences = mkMappingOption "LSP References [Telescope]" "<leader>flr";
|
||||
lspImplementations = mkMappingOption "LSP Implementations [Telescope]" "<leader>fli";
|
||||
lspDefinitions = mkMappingOption "LSP Definitions [Telescope]" "<leader>flD";
|
||||
lspTypeDefinitions = mkMappingOption "LSP Type Definitions [Telescope]" "<leader>flt";
|
||||
diagnostics = mkMappingOption "Diagnostics [Telescope]" "<leader>fld";
|
||||
|
||||
treesitter = mkMappingOption "Treesitter [Telescope]" "<leader>fs";
|
||||
};
|
||||
|
||||
enable = mkEnableOption "telescope.nvim: multi-purpose search and picker utility";
|
||||
};
|
||||
}
|
||||
24
modules/plugins/utility/wakatime/config.nix
Normal file
24
modules/plugins/utility/wakatime/config.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf nvim;
|
||||
|
||||
cfg = config.vim.utility.vim-wakatime;
|
||||
in {
|
||||
config = mkIf (cfg.enable) {
|
||||
vim.startPlugins = [
|
||||
pkgs.vimPlugins.vim-wakatime
|
||||
];
|
||||
|
||||
vim.configRC.vim-wakatime = nvim.dag.entryAnywhere ''
|
||||
${
|
||||
if cfg.cli-package == null
|
||||
then ""
|
||||
else ''let g:wakatime_CLIPath = "${cfg.cli-package}"''
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
6
modules/plugins/utility/wakatime/default.nix
Normal file
6
modules/plugins/utility/wakatime/default.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
_: {
|
||||
imports = [
|
||||
./config.nix
|
||||
./vim-wakatime.nix
|
||||
];
|
||||
}
|
||||
17
modules/plugins/utility/wakatime/vim-wakatime.nix
Normal file
17
modules/plugins/utility/wakatime/vim-wakatime.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkEnableOption mkOption types;
|
||||
in {
|
||||
options.vim.utility.vim-wakatime = {
|
||||
enable = mkEnableOption "vim-wakatime: live code statistics";
|
||||
|
||||
cli-package = mkOption {
|
||||
type = with types; nullOr package;
|
||||
default = pkgs.wakatime;
|
||||
description = "The package that should be used for wakatime-cli. Set as null to use the default path in `$XDG_DATA_HOME`";
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue