diff --git a/modules/plugins/comments/comment-nvim/config.nix b/modules/plugins/comments/comment-nvim/config.nix index 4c3a955c..fdb87e86 100644 --- a/modules/plugins/comments/comment-nvim/config.nix +++ b/modules/plugins/comments/comment-nvim/config.nix @@ -15,33 +15,31 @@ in { "comment-nvim" ]; - vim.lazy.plugins = [ - { - package = "comment-nvim"; - setupModule = "Comment"; - inherit (cfg) setupOpts; - keys = [ - (mkLznBinding ["n"] cfg.mappings.toggleOpLeaderLine "(comment_toggle_linewise)" mappings.toggleOpLeaderLine.description) - (mkLznBinding ["n"] cfg.mappings.toggleOpLeaderBlock "(comment_toggle_blockwise)" mappings.toggleOpLeaderBlock.description) + vim.lazy.plugins.comment-nvim = { + package = "comment-nvim"; + setupModule = "Comment"; + inherit (cfg) setupOpts; + keys = [ + (mkLznBinding ["n"] cfg.mappings.toggleOpLeaderLine "(comment_toggle_linewise)" mappings.toggleOpLeaderLine.description) + (mkLznBinding ["n"] cfg.mappings.toggleOpLeaderBlock "(comment_toggle_blockwise)" mappings.toggleOpLeaderBlock.description) - (mkLznExprBinding ["n"] cfg.mappings.toggleCurrentLine '' - function() - return vim.api.nvim_get_vvar('count') == 0 and '(comment_toggle_linewise_current)' - or '(comment_toggle_linewise_count)' - end - '' - mappings.toggleCurrentLine.description) - (mkLznExprBinding ["n"] cfg.mappings.toggleCurrentBlock '' - function() - return vim.api.nvim_get_vvar('count') == 0 and '(comment_toggle_blockwise_current)' - or '(comment_toggle_blockwise_count)' - end - '' - mappings.toggleCurrentBlock.description) - (mkLznBinding ["x"] cfg.mappings.toggleSelectedLine "(comment_toggle_linewise_visual)" mappings.toggleSelectedLine.description) - (mkLznBinding ["x"] cfg.mappings.toggleSelectedBlock "(comment_toggle_blockwise_visual)" mappings.toggleSelectedBlock.description) - ]; - } - ]; + (mkLznExprBinding ["n"] cfg.mappings.toggleCurrentLine '' + function() + return vim.api.nvim_get_vvar('count') == 0 and '(comment_toggle_linewise_current)' + or '(comment_toggle_linewise_count)' + end + '' + mappings.toggleCurrentLine.description) + (mkLznExprBinding ["n"] cfg.mappings.toggleCurrentBlock '' + function() + return vim.api.nvim_get_vvar('count') == 0 and '(comment_toggle_blockwise_current)' + or '(comment_toggle_blockwise_count)' + end + '' + mappings.toggleCurrentBlock.description) + (mkLznBinding ["x"] cfg.mappings.toggleSelectedLine "(comment_toggle_linewise_visual)" mappings.toggleSelectedLine.description) + (mkLznBinding ["x"] cfg.mappings.toggleSelectedBlock "(comment_toggle_blockwise_visual)" mappings.toggleSelectedBlock.description) + ]; + }; }; } diff --git a/modules/plugins/debugger/nvim-dap/config.nix b/modules/plugins/debugger/nvim-dap/config.nix index a6689591..78e86a8c 100644 --- a/modules/plugins/debugger/nvim-dap/config.nix +++ b/modules/plugins/debugger/nvim-dap/config.nix @@ -54,17 +54,15 @@ in { vim = { startPlugins = ["nvim-nio"]; - lazy.plugins = [ - { - package = "nvim-dap-ui"; - setupModule = "dapui"; - setupOpts = {}; + lazy.plugins.nvim-dap-ui = { + package = "nvim-dap-ui"; + setupModule = "dapui"; + setupOpts = {}; - keys = [ - (mkSetLuaLznBinding mappings.toggleDapUI "function() require('dapui').toggle() end") - ]; - } - ]; + keys = [ + (mkSetLuaLznBinding mappings.toggleDapUI "function() require('dapui').toggle() end") + ]; + }; pluginRC.nvim-dap-ui = entryAfter ["nvim-dap"] ( optionalString cfg.ui.autoStart '' diff --git a/modules/plugins/filetree/neo-tree/config.nix b/modules/plugins/filetree/neo-tree/config.nix index c2d6ea66..13da0354 100644 --- a/modules/plugins/filetree/neo-tree/config.nix +++ b/modules/plugins/filetree/neo-tree/config.nix @@ -16,15 +16,13 @@ in { "nui-nvim" # ui library ]; - lazy.plugins = [ - { - package = "neo-tree-nvim"; - setupModule = "neo-tree"; - inherit (cfg) setupOpts; + lazy.plugins.neo-tree-nvim = { + package = "neo-tree-nvim"; + setupModule = "neo-tree"; + inherit (cfg) setupOpts; - cmd = ["Neotree"]; - } - ]; + cmd = ["Neotree"]; + }; visuals.nvimWebDevicons.enable = true; }; diff --git a/modules/plugins/filetree/nvimtree/config.nix b/modules/plugins/filetree/nvimtree/config.nix index 66a901b5..30cc680b 100644 --- a/modules/plugins/filetree/nvimtree/config.nix +++ b/modules/plugins/filetree/nvimtree/config.nix @@ -15,12 +15,12 @@ inherit (self.options.vim.filetree.nvimTree) mappings; in { config = mkIf cfg.enable { - vim.binds.whichKey.register = pushDownDefault { - "t" = "+NvimTree"; - }; + vim = { + binds.whichKey.register = pushDownDefault { + "t" = "+NvimTree"; + }; - vim.lazy.plugins = [ - { + lazy.plugins.nvim-tree-lua = { package = "nvim-tree-lua"; setupModule = "nvim-tree"; inherit (cfg) setupOpts; @@ -31,58 +31,58 @@ in { (mkLznBinding ["n"] cfg.mappings.findFile ":NvimTreeFindFile" mappings.findFile.description) (mkLznBinding ["n"] cfg.mappings.focus ":NvimTreeFocus" mappings.focus.description) ]; - } - ]; + }; - vim.pluginRC.nvimtreelua = entryAnywhere '' - ${ - optionalString cfg.setupOpts.disable_netrw '' - -- disable netrew completely - vim.g.loaded_netrw = 1 - vim.g.loaded_netrwPlugin = 1 - '' - } + pluginRC.nvimtreelua = entryAnywhere '' + ${ + optionalString cfg.setupOpts.disable_netrw '' + -- disable netrew completely + vim.g.loaded_netrw = 1 + vim.g.loaded_netrwPlugin = 1 + '' + } - ${ - optionalString cfg.openOnSetup '' - ${optionalString config.vim.lazy.enable ''require('lz.n').trigger_load("nvim-tree-lua")''} - -- autostart behaviour - -- Open on startup has been deprecated - -- see https://github.com/nvim-tree/nvim-tree.lua/wiki/Open-At-Startup + ${ + optionalString cfg.openOnSetup '' + ${optionalString config.vim.lazy.enable ''require('lz.n').trigger_load("nvim-tree-lua")''} + -- autostart behaviour + -- Open on startup has been deprecated + -- see https://github.com/nvim-tree/nvim-tree.lua/wiki/Open-At-Startup - -- use a nix eval to dynamically insert the open on startup function - local function open_nvim_tree(data) - local IGNORED_FT = { - "markdown", - } + -- use a nix eval to dynamically insert the open on startup function + local function open_nvim_tree(data) + local IGNORED_FT = { + "markdown", + } - -- buffer is a real file on the disk - local real_file = vim.fn.filereadable(data.file) == 1 + -- buffer is a real file on the disk + local real_file = vim.fn.filereadable(data.file) == 1 - -- buffer is a [No Name] - local no_name = data.file == "" and vim.bo[data.buf].buftype == "" + -- buffer is a [No Name] + local no_name = data.file == "" and vim.bo[data.buf].buftype == "" - -- &ft - local filetype = vim.bo[data.buf].ft + -- &ft + local filetype = vim.bo[data.buf].ft - -- only files please - if not real_file and not no_name then - return + -- only files please + if not real_file and not no_name then + return + end + + -- skip ignored filetypes + if vim.tbl_contains(IGNORED_FT, filetype) then + return + end + + -- open the tree but don't focus it + require("nvim-tree.api").tree.toggle({ focus = false }) end - -- skip ignored filetypes - if vim.tbl_contains(IGNORED_FT, filetype) then - return - end - - -- open the tree but don't focus it - require("nvim-tree.api").tree.toggle({ focus = false }) - end - - -- function to automatically open the tree on VimEnter - vim.api.nvim_create_autocmd({ "VimEnter" }, { callback = open_nvim_tree }) - '' - } - ''; + -- function to automatically open the tree on VimEnter + vim.api.nvim_create_autocmd({ "VimEnter" }, { callback = open_nvim_tree }) + '' + } + ''; + }; }; } diff --git a/modules/plugins/lsp/trouble/config.nix b/modules/plugins/lsp/trouble/config.nix index 1a7eb468..e4b966a4 100644 --- a/modules/plugins/lsp/trouble/config.nix +++ b/modules/plugins/lsp/trouble/config.nix @@ -14,23 +14,21 @@ in { config = mkIf (cfg.enable && cfg.trouble.enable) { vim = { - lazy.plugins = [ - { - package = "trouble"; - setupModule = "trouble"; - inherit (cfg.trouble) setupOpts; + lazy.plugins.trouble = { + package = "trouble"; + setupModule = "trouble"; + inherit (cfg.trouble) setupOpts; - cmd = "Trouble"; - keys = [ - (mkSetLznBinding mappings.toggle "TroubleToggle") - (mkSetLznBinding mappings.workspaceDiagnostics "TroubleToggle workspace_diagnostics") - (mkSetLznBinding mappings.documentDiagnostics "TroubleToggle document_diagnostics") - (mkSetLznBinding mappings.lspReferences "TroubleToggle lsp_references") - (mkSetLznBinding mappings.quickfix "TroubleToggle quickfix") - (mkSetLznBinding mappings.locList "TroubleToggle loclist") - ]; - } - ]; + cmd = "Trouble"; + keys = [ + (mkSetLznBinding mappings.toggle "TroubleToggle") + (mkSetLznBinding mappings.workspaceDiagnostics "TroubleToggle workspace_diagnostics") + (mkSetLznBinding mappings.documentDiagnostics "TroubleToggle document_diagnostics") + (mkSetLznBinding mappings.lspReferences "TroubleToggle lsp_references") + (mkSetLznBinding mappings.quickfix "TroubleToggle quickfix") + (mkSetLznBinding mappings.locList "TroubleToggle loclist") + ]; + }; binds.whichKey.register = pushDownDefault { "l" = "Trouble"; diff --git a/modules/plugins/terminal/toggleterm/config.nix b/modules/plugins/terminal/toggleterm/config.nix index b4167489..d96e4801 100644 --- a/modules/plugins/terminal/toggleterm/config.nix +++ b/modules/plugins/terminal/toggleterm/config.nix @@ -14,39 +14,37 @@ in { config = mkIf cfg.enable { vim = { - lazy.plugins = [ - { - package = "toggleterm-nvim"; - cmd = ["ToggleTerm" "ToggleTermSendCurrentLine" "ToggleTermSendVisualLines" "ToggleTermSendVisualSelection" "ToggleTermSetName" "ToggleTermToggleAll"]; - keys = [ - (mkLznBinding ["n"] cfg.mappings.open "execute v:count . \"ToggleTerm\"" "Toggle terminal") - { - key = cfg.lazygit.mappings.open; - desc = lazygitMapDesc; - } - ]; + lazy.plugins.toggleterm-nvim = { + package = "toggleterm-nvim"; + cmd = ["ToggleTerm" "ToggleTermSendCurrentLine" "ToggleTermSendVisualLines" "ToggleTermSendVisualSelection" "ToggleTermSetName" "ToggleTermToggleAll"]; + keys = [ + (mkLznBinding ["n"] cfg.mappings.open "execute v:count . \"ToggleTerm\"" "Toggle terminal") + { + key = cfg.lazygit.mappings.open; + desc = lazygitMapDesc; + } + ]; - setupModule = "toggleterm"; - inherit (cfg) setupOpts; - after = optionalString cfg.lazygit.enable '' - local terminal = require 'toggleterm.terminal' - local lazygit = terminal.Terminal:new({ - cmd = '${ - if (cfg.lazygit.package != null) - then getExe cfg.lazygit.package - else "lazygit" - }', - direction = '${cfg.lazygit.direction}', - hidden = true, - on_open = function(term) - vim.cmd("startinsert!") - end - }) + setupModule = "toggleterm"; + inherit (cfg) setupOpts; + after = optionalString cfg.lazygit.enable '' + local terminal = require 'toggleterm.terminal' + local lazygit = terminal.Terminal:new({ + cmd = '${ + if (cfg.lazygit.package != null) + then getExe cfg.lazygit.package + else "lazygit" + }', + direction = '${cfg.lazygit.direction}', + hidden = true, + on_open = function(term) + vim.cmd("startinsert!") + end + }) - vim.keymap.set('n', ${toJSON cfg.lazygit.mappings.open}, function() lazygit:toggle() end, {silent = true, noremap = true, desc = '${lazygitMapDesc}'}) - ''; - } - ]; + vim.keymap.set('n', ${toJSON cfg.lazygit.mappings.open}, function() lazygit:toggle() end, {silent = true, noremap = true, desc = '${lazygitMapDesc}'}) + ''; + }; }; }; } diff --git a/modules/plugins/utility/binds/cheatsheet/config.nix b/modules/plugins/utility/binds/cheatsheet/config.nix index f7bfa44d..2fb3e25b 100644 --- a/modules/plugins/utility/binds/cheatsheet/config.nix +++ b/modules/plugins/utility/binds/cheatsheet/config.nix @@ -9,15 +9,13 @@ cfg = config.vim.binds.cheatsheet; in { config = mkIf cfg.enable { - vim.lazy.plugins = [ - { - package = "cheatsheet-nvim"; - setupModule = "cheatsheet"; - setupOpts = {}; - cmd = ["Cheatsheet" "CheatsheetEdit"]; + vim.lazy.plugins.cheatsheet-nvim = { + package = "cheatsheet-nvim"; + setupModule = "cheatsheet"; + setupOpts = {}; + cmd = ["Cheatsheet" "CheatsheetEdit"]; - before = optionalString config.vim.lazy.enable "require('lz.n').trigger_load('telescope')"; - } - ]; + before = optionalString config.vim.lazy.enable "require('lz.n').trigger_load('telescope')"; + }; }; } diff --git a/modules/plugins/utility/diffview/config.nix b/modules/plugins/utility/diffview/config.nix index 5ea51d78..a6458ed5 100644 --- a/modules/plugins/utility/diffview/config.nix +++ b/modules/plugins/utility/diffview/config.nix @@ -10,14 +10,12 @@ in { config = mkIf cfg.enable { vim = { startPlugins = ["plenary-nvim"]; - lazy.plugins = [ - { - package = "diffview-nvim"; - cmd = ["DiffviewClose" "DiffviewFileHistory" "DiffviewFocusFiles" "DiffviewLog" "DiffviewOpen" "DiffviewRefresh" "DiffviewToggleFiles"]; - setupModule = "diffview"; - inherit (cfg) setupOpts; - } - ]; + lazy.plugins.diffview-nvim = { + package = "diffview-nvim"; + cmd = ["DiffviewClose" "DiffviewFileHistory" "DiffviewFocusFiles" "DiffviewLog" "DiffviewOpen" "DiffviewRefresh" "DiffviewToggleFiles"]; + setupModule = "diffview"; + inherit (cfg) setupOpts; + }; }; }; } diff --git a/modules/plugins/utility/icon-picker/config.nix b/modules/plugins/utility/icon-picker/config.nix index 13fa45e6..99e43044 100644 --- a/modules/plugins/utility/icon-picker/config.nix +++ b/modules/plugins/utility/icon-picker/config.nix @@ -10,16 +10,14 @@ in { config = mkIf cfg.enable { vim.startPlugins = ["dressing-nvim"]; - vim.lazy.plugins = [ - { - package = "icon-picker-nvim"; - setupModule = "icon-picker"; - setupOpts = { - disable_legacy_commands = true; - }; + vim.lazy.plugins.icon-picker-nvim = { + package = "icon-picker-nvim"; + setupModule = "icon-picker"; + setupOpts = { + disable_legacy_commands = true; + }; - cmd = ["IconPickerInsert" "IconPickerNormal" "IconPickerYank"]; - } - ]; + cmd = ["IconPickerInsert" "IconPickerNormal" "IconPickerYank"]; + }; }; } diff --git a/modules/plugins/utility/motion/leap/config.nix b/modules/plugins/utility/motion/leap/config.nix index 9e9cf40e..c05cafc1 100644 --- a/modules/plugins/utility/motion/leap/config.nix +++ b/modules/plugins/utility/motion/leap/config.nix @@ -11,51 +11,49 @@ in { config = mkIf cfg.enable { vim = { startPlugins = ["vim-repeat"]; - lazy.plugins = [ - { - package = "leap-nvim"; - keys = [ - (mkLznBinding ["n" "o" "x"] cfg.mappings.leapForwardTo "(leap-forward-to)" "Leap forward to") - (mkLznBinding ["n" "o" "x"] cfg.mappings.leapBackwardTo "(leap-backward-to)" "Leap backward to") - (mkLznBinding ["n" "o" "x"] cfg.mappings.leapForwardTill "(leap-forward-till)" "Leap forward till") - (mkLznBinding ["n" "o" "x"] cfg.mappings.leapBackwardTill "(leap-backward-till)" "Leap backward till") - (mkLznBinding ["n" "o" "x"] cfg.mappings.leapFromWindow "(leap-from-window)" "Leap from window") - ]; + lazy.plugins.leap-nvim = { + package = "leap-nvim"; + keys = [ + (mkLznBinding ["n" "o" "x"] cfg.mappings.leapForwardTo "(leap-forward-to)" "Leap forward to") + (mkLznBinding ["n" "o" "x"] cfg.mappings.leapBackwardTo "(leap-backward-to)" "Leap backward to") + (mkLznBinding ["n" "o" "x"] cfg.mappings.leapForwardTill "(leap-forward-till)" "Leap forward till") + (mkLznBinding ["n" "o" "x"] cfg.mappings.leapBackwardTill "(leap-backward-till)" "Leap backward till") + (mkLznBinding ["n" "o" "x"] cfg.mappings.leapFromWindow "(leap-from-window)" "Leap from window") + ]; - after = '' - 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 = '', - next_phase_one_target = '', - next_target = {'', ';'}, - prev_target = {'', ','}, - next_group = '', - prev_group = '', - multi_accept = '', - multi_revert = '', - }, - } - ''; - } - ]; + after = '' + 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 = '', + next_phase_one_target = '', + next_target = {'', ';'}, + prev_target = {'', ','}, + next_group = '', + prev_group = '', + multi_accept = '', + multi_revert = '', + }, + } + ''; + }; }; }; } diff --git a/modules/plugins/utility/surround/config.nix b/modules/plugins/utility/surround/config.nix index 57520850..4ce15cae 100644 --- a/modules/plugins/utility/surround/config.nix +++ b/modules/plugins/utility/surround/config.nix @@ -30,26 +30,24 @@ in { startPlugins = ["nvim-surround"]; pluginRC.surround = entryAnywhere "require('nvim-surround').setup(${toLuaObject cfg.setupOpts})"; - lazy.plugins = [ - { - package = "nvim-surround"; - setupModule = "nvim-surround"; - inherit (cfg) setupOpts; + lazy.plugins.nvim-surround = { + package = "nvim-surround"; + setupModule = "nvim-surround"; + inherit (cfg) setupOpts; - keys = - map (mkLznKey ["i"]) (with vendoredKeybinds; [insert insert_line]) - ++ map (mkLznKey ["x"]) (with vendoredKeybinds; [visual visual_line]) - ++ map (mkLznKey ["n"]) (with vendoredKeybinds; [ - normal - normal_cur - normal_line - normal_cur_line - delete - change - change_line - ]); - } - ]; + keys = + map (mkLznKey ["i"]) (with vendoredKeybinds; [insert insert_line]) + ++ map (mkLznKey ["x"]) (with vendoredKeybinds; [visual visual_line]) + ++ map (mkLznKey ["n"]) (with vendoredKeybinds; [ + normal + normal_cur + normal_line + normal_cur_line + delete + change + change_line + ]); + }; utility.surround.setupOpts.keymaps = mkIf cfg.useVendoredKeybindings vendoredKeybinds; }; diff --git a/modules/plugins/utility/telescope/config.nix b/modules/plugins/utility/telescope/config.nix index f50e955e..37bdc0f9 100644 --- a/modules/plugins/utility/telescope/config.nix +++ b/modules/plugins/utility/telescope/config.nix @@ -20,57 +20,55 @@ in { vim = { startPlugins = ["plenary-nvim"]; - lazy.plugins = [ - { - package = "telescope"; - setupModule = "telescope"; - inherit (cfg) setupOpts; - # FIXME: how do I deal with extensions? set all as deps? - after = '' - local telescope = require("telescope") - ${optionalString config.vim.ui.noice.enable "telescope.load_extension('noice')"} - ${optionalString config.vim.notify.nvim-notify.enable "telescope.load_extension('notify')"} - ${optionalString config.vim.projects.project-nvim.enable "telescope.load_extension('projects')"} - ''; + lazy.plugins.telescope = { + package = "telescope"; + setupModule = "telescope"; + inherit (cfg) setupOpts; + # FIXME: how do I deal with extensions? set all as deps? + after = '' + local telescope = require("telescope") + ${optionalString config.vim.ui.noice.enable "telescope.load_extension('noice')"} + ${optionalString config.vim.notify.nvim-notify.enable "telescope.load_extension('notify')"} + ${optionalString config.vim.projects.project-nvim.enable "telescope.load_extension('projects')"} + ''; - cmd = ["Telescope"]; + cmd = ["Telescope"]; - keys = - [ - (mkSetLznBinding mappings.findFiles " Telescope find_files") - (mkSetLznBinding mappings.liveGrep " Telescope live_grep") - (mkSetLznBinding mappings.buffers " Telescope buffers") - (mkSetLznBinding mappings.helpTags " Telescope help_tags") - (mkSetLznBinding mappings.open " Telescope") + keys = + [ + (mkSetLznBinding mappings.findFiles " Telescope find_files") + (mkSetLznBinding mappings.liveGrep " Telescope live_grep") + (mkSetLznBinding mappings.buffers " Telescope buffers") + (mkSetLznBinding mappings.helpTags " Telescope help_tags") + (mkSetLznBinding mappings.open " Telescope") - (mkSetLznBinding mappings.gitCommits " Telescope git_commits") - (mkSetLznBinding mappings.gitBufferCommits " Telescope git_bcommits") - (mkSetLznBinding mappings.gitBranches " Telescope git_branches") - (mkSetLznBinding mappings.gitStatus " Telescope git_status") - (mkSetLznBinding mappings.gitStash " Telescope git_stash") + (mkSetLznBinding mappings.gitCommits " Telescope git_commits") + (mkSetLznBinding mappings.gitBufferCommits " Telescope git_bcommits") + (mkSetLznBinding mappings.gitBranches " Telescope git_branches") + (mkSetLznBinding mappings.gitStatus " Telescope git_status") + (mkSetLznBinding mappings.gitStash " Telescope git_stash") + ] + ++ (optionals config.vim.lsp.enable [ + (mkSetLznBinding mappings.lspDocumentSymbols " Telescope lsp_document_symbols") + (mkSetLznBinding mappings.lspWorkspaceSymbols " Telescope lsp_workspace_symbols") + + (mkSetLznBinding mappings.lspReferences " Telescope lsp_references") + (mkSetLznBinding mappings.lspImplementations " Telescope lsp_implementations") + (mkSetLznBinding mappings.lspDefinitions " Telescope lsp_definitions") + (mkSetLznBinding mappings.lspTypeDefinitions " Telescope lsp_type_definitions") + (mkSetLznBinding mappings.diagnostics " Telescope diagnostics") + ]) + ++ ( + optionals config.vim.treesitter.enable [ + (mkSetLznBinding mappings.treesitter " Telescope treesitter") ] - ++ (optionals config.vim.lsp.enable [ - (mkSetLznBinding mappings.lspDocumentSymbols " Telescope lsp_document_symbols") - (mkSetLznBinding mappings.lspWorkspaceSymbols " Telescope lsp_workspace_symbols") - - (mkSetLznBinding mappings.lspReferences " Telescope lsp_references") - (mkSetLznBinding mappings.lspImplementations " Telescope lsp_implementations") - (mkSetLznBinding mappings.lspDefinitions " Telescope lsp_definitions") - (mkSetLznBinding mappings.lspTypeDefinitions " Telescope lsp_type_definitions") - (mkSetLznBinding mappings.diagnostics " Telescope diagnostics") - ]) - ++ ( - optionals config.vim.treesitter.enable [ - (mkSetLznBinding mappings.treesitter " Telescope treesitter") - ] - ) - ++ ( - optionals config.vim.projects.project-nvim.enable [ - (mkSetLznBinding mappings.findProjects "") - ] - ); - } - ]; + ) + ++ ( + optionals config.vim.projects.project-nvim.enable [ + (mkSetLznBinding mappings.findProjects "") + ] + ); + }; binds.whichKey.register = pushDownDefault { "f" = "+Telescope"; diff --git a/modules/plugins/visuals/fidget/config.nix b/modules/plugins/visuals/fidget/config.nix index 6e81e9d6..7c83cd96 100644 --- a/modules/plugins/visuals/fidget/config.nix +++ b/modules/plugins/visuals/fidget/config.nix @@ -8,13 +8,11 @@ cfg = config.vim.visuals.fidget-nvim; in { config = mkIf cfg.enable { - vim.lazy.plugins = [ - { - package = "fidget-nvim"; - setupModule = "fidget"; - event = "LspAttach"; - inherit (cfg) setupOpts; - } - ]; + vim.lazy.plugins.fidget-nvim = { + package = "fidget-nvim"; + setupModule = "fidget"; + event = "LspAttach"; + inherit (cfg) setupOpts; + }; }; }