treewide: update lazy.plugins syntax

This commit is contained in:
Pei Yang Ching 2024-10-17 17:17:18 +02:00
parent 854fd340e3
commit d49e46ab16
13 changed files with 262 additions and 286 deletions

View file

@ -15,33 +15,31 @@ in {
"comment-nvim" "comment-nvim"
]; ];
vim.lazy.plugins = [ vim.lazy.plugins.comment-nvim = {
{ package = "comment-nvim";
package = "comment-nvim"; setupModule = "Comment";
setupModule = "Comment"; inherit (cfg) setupOpts;
inherit (cfg) setupOpts; keys = [
keys = [ (mkLznBinding ["n"] cfg.mappings.toggleOpLeaderLine "<Plug>(comment_toggle_linewise)" mappings.toggleOpLeaderLine.description)
(mkLznBinding ["n"] cfg.mappings.toggleOpLeaderLine "<Plug>(comment_toggle_linewise)" mappings.toggleOpLeaderLine.description) (mkLznBinding ["n"] cfg.mappings.toggleOpLeaderBlock "<Plug>(comment_toggle_blockwise)" mappings.toggleOpLeaderBlock.description)
(mkLznBinding ["n"] cfg.mappings.toggleOpLeaderBlock "<Plug>(comment_toggle_blockwise)" mappings.toggleOpLeaderBlock.description)
(mkLznExprBinding ["n"] cfg.mappings.toggleCurrentLine '' (mkLznExprBinding ["n"] cfg.mappings.toggleCurrentLine ''
function() function()
return vim.api.nvim_get_vvar('count') == 0 and '<Plug>(comment_toggle_linewise_current)' return vim.api.nvim_get_vvar('count') == 0 and '<Plug>(comment_toggle_linewise_current)'
or '<Plug>(comment_toggle_linewise_count)' or '<Plug>(comment_toggle_linewise_count)'
end end
'' ''
mappings.toggleCurrentLine.description) mappings.toggleCurrentLine.description)
(mkLznExprBinding ["n"] cfg.mappings.toggleCurrentBlock '' (mkLznExprBinding ["n"] cfg.mappings.toggleCurrentBlock ''
function() function()
return vim.api.nvim_get_vvar('count') == 0 and '<Plug>(comment_toggle_blockwise_current)' return vim.api.nvim_get_vvar('count') == 0 and '<Plug>(comment_toggle_blockwise_current)'
or '<Plug>(comment_toggle_blockwise_count)' or '<Plug>(comment_toggle_blockwise_count)'
end end
'' ''
mappings.toggleCurrentBlock.description) mappings.toggleCurrentBlock.description)
(mkLznBinding ["x"] cfg.mappings.toggleSelectedLine "<Plug>(comment_toggle_linewise_visual)" mappings.toggleSelectedLine.description) (mkLznBinding ["x"] cfg.mappings.toggleSelectedLine "<Plug>(comment_toggle_linewise_visual)" mappings.toggleSelectedLine.description)
(mkLznBinding ["x"] cfg.mappings.toggleSelectedBlock "<Plug>(comment_toggle_blockwise_visual)" mappings.toggleSelectedBlock.description) (mkLznBinding ["x"] cfg.mappings.toggleSelectedBlock "<Plug>(comment_toggle_blockwise_visual)" mappings.toggleSelectedBlock.description)
]; ];
} };
];
}; };
} }

View file

@ -54,17 +54,15 @@ in {
vim = { vim = {
startPlugins = ["nvim-nio"]; startPlugins = ["nvim-nio"];
lazy.plugins = [ lazy.plugins.nvim-dap-ui = {
{ package = "nvim-dap-ui";
package = "nvim-dap-ui"; setupModule = "dapui";
setupModule = "dapui"; setupOpts = {};
setupOpts = {};
keys = [ keys = [
(mkSetLuaLznBinding mappings.toggleDapUI "function() require('dapui').toggle() end") (mkSetLuaLznBinding mappings.toggleDapUI "function() require('dapui').toggle() end")
]; ];
} };
];
pluginRC.nvim-dap-ui = entryAfter ["nvim-dap"] ( pluginRC.nvim-dap-ui = entryAfter ["nvim-dap"] (
optionalString cfg.ui.autoStart '' optionalString cfg.ui.autoStart ''

View file

@ -16,15 +16,13 @@ in {
"nui-nvim" # ui library "nui-nvim" # ui library
]; ];
lazy.plugins = [ lazy.plugins.neo-tree-nvim = {
{ package = "neo-tree-nvim";
package = "neo-tree-nvim"; setupModule = "neo-tree";
setupModule = "neo-tree"; inherit (cfg) setupOpts;
inherit (cfg) setupOpts;
cmd = ["Neotree"]; cmd = ["Neotree"];
} };
];
visuals.nvimWebDevicons.enable = true; visuals.nvimWebDevicons.enable = true;
}; };

View file

@ -15,12 +15,12 @@
inherit (self.options.vim.filetree.nvimTree) mappings; inherit (self.options.vim.filetree.nvimTree) mappings;
in { in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
vim.binds.whichKey.register = pushDownDefault { vim = {
"<leader>t" = "+NvimTree"; binds.whichKey.register = pushDownDefault {
}; "<leader>t" = "+NvimTree";
};
vim.lazy.plugins = [ lazy.plugins.nvim-tree-lua = {
{
package = "nvim-tree-lua"; package = "nvim-tree-lua";
setupModule = "nvim-tree"; setupModule = "nvim-tree";
inherit (cfg) setupOpts; inherit (cfg) setupOpts;
@ -31,58 +31,58 @@ in {
(mkLznBinding ["n"] cfg.mappings.findFile ":NvimTreeFindFile<cr>" mappings.findFile.description) (mkLznBinding ["n"] cfg.mappings.findFile ":NvimTreeFindFile<cr>" mappings.findFile.description)
(mkLznBinding ["n"] cfg.mappings.focus ":NvimTreeFocus<cr>" mappings.focus.description) (mkLznBinding ["n"] cfg.mappings.focus ":NvimTreeFocus<cr>" mappings.focus.description)
]; ];
} };
];
vim.pluginRC.nvimtreelua = entryAnywhere '' pluginRC.nvimtreelua = entryAnywhere ''
${ ${
optionalString cfg.setupOpts.disable_netrw '' optionalString cfg.setupOpts.disable_netrw ''
-- disable netrew completely -- disable netrew completely
vim.g.loaded_netrw = 1 vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1 vim.g.loaded_netrwPlugin = 1
'' ''
} }
${ ${
optionalString cfg.openOnSetup '' optionalString cfg.openOnSetup ''
${optionalString config.vim.lazy.enable ''require('lz.n').trigger_load("nvim-tree-lua")''} ${optionalString config.vim.lazy.enable ''require('lz.n').trigger_load("nvim-tree-lua")''}
-- autostart behaviour -- autostart behaviour
-- Open on startup has been deprecated -- Open on startup has been deprecated
-- see https://github.com/nvim-tree/nvim-tree.lua/wiki/Open-At-Startup -- 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 -- use a nix eval to dynamically insert the open on startup function
local function open_nvim_tree(data) local function open_nvim_tree(data)
local IGNORED_FT = { local IGNORED_FT = {
"markdown", "markdown",
} }
-- buffer is a real file on the disk -- buffer is a real file on the disk
local real_file = vim.fn.filereadable(data.file) == 1 local real_file = vim.fn.filereadable(data.file) == 1
-- buffer is a [No Name] -- buffer is a [No Name]
local no_name = data.file == "" and vim.bo[data.buf].buftype == "" local no_name = data.file == "" and vim.bo[data.buf].buftype == ""
-- &ft -- &ft
local filetype = vim.bo[data.buf].ft local filetype = vim.bo[data.buf].ft
-- only files please -- only files please
if not real_file and not no_name then if not real_file and not no_name then
return 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 end
-- skip ignored filetypes -- function to automatically open the tree on VimEnter
if vim.tbl_contains(IGNORED_FT, filetype) then vim.api.nvim_create_autocmd({ "VimEnter" }, { callback = open_nvim_tree })
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 })
''
}
'';
}; };
} }

View file

@ -14,23 +14,21 @@
in { in {
config = mkIf (cfg.enable && cfg.trouble.enable) { config = mkIf (cfg.enable && cfg.trouble.enable) {
vim = { vim = {
lazy.plugins = [ lazy.plugins.trouble = {
{ package = "trouble";
package = "trouble"; setupModule = "trouble";
setupModule = "trouble"; inherit (cfg.trouble) setupOpts;
inherit (cfg.trouble) setupOpts;
cmd = "Trouble"; cmd = "Trouble";
keys = [ keys = [
(mkSetLznBinding mappings.toggle "<cmd>TroubleToggle<CR>") (mkSetLznBinding mappings.toggle "<cmd>TroubleToggle<CR>")
(mkSetLznBinding mappings.workspaceDiagnostics "<cmd>TroubleToggle workspace_diagnostics<CR>") (mkSetLznBinding mappings.workspaceDiagnostics "<cmd>TroubleToggle workspace_diagnostics<CR>")
(mkSetLznBinding mappings.documentDiagnostics "<cmd>TroubleToggle document_diagnostics<CR>") (mkSetLznBinding mappings.documentDiagnostics "<cmd>TroubleToggle document_diagnostics<CR>")
(mkSetLznBinding mappings.lspReferences "<cmd>TroubleToggle lsp_references<CR>") (mkSetLznBinding mappings.lspReferences "<cmd>TroubleToggle lsp_references<CR>")
(mkSetLznBinding mappings.quickfix "<cmd>TroubleToggle quickfix<CR>") (mkSetLznBinding mappings.quickfix "<cmd>TroubleToggle quickfix<CR>")
(mkSetLznBinding mappings.locList "<cmd>TroubleToggle loclist<CR>") (mkSetLznBinding mappings.locList "<cmd>TroubleToggle loclist<CR>")
]; ];
} };
];
binds.whichKey.register = pushDownDefault { binds.whichKey.register = pushDownDefault {
"<leader>l" = "Trouble"; "<leader>l" = "Trouble";

View file

@ -14,39 +14,37 @@
in { in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
vim = { vim = {
lazy.plugins = [ lazy.plugins.toggleterm-nvim = {
{ package = "toggleterm-nvim";
package = "toggleterm-nvim"; cmd = ["ToggleTerm" "ToggleTermSendCurrentLine" "ToggleTermSendVisualLines" "ToggleTermSendVisualSelection" "ToggleTermSetName" "ToggleTermToggleAll"];
cmd = ["ToggleTerm" "ToggleTermSendCurrentLine" "ToggleTermSendVisualLines" "ToggleTermSendVisualSelection" "ToggleTermSetName" "ToggleTermToggleAll"]; keys = [
keys = [ (mkLznBinding ["n"] cfg.mappings.open "<Cmd>execute v:count . \"ToggleTerm\"<CR>" "Toggle terminal")
(mkLznBinding ["n"] cfg.mappings.open "<Cmd>execute v:count . \"ToggleTerm\"<CR>" "Toggle terminal") {
{ key = cfg.lazygit.mappings.open;
key = cfg.lazygit.mappings.open; desc = lazygitMapDesc;
desc = lazygitMapDesc; }
} ];
];
setupModule = "toggleterm"; setupModule = "toggleterm";
inherit (cfg) setupOpts; inherit (cfg) setupOpts;
after = optionalString cfg.lazygit.enable '' after = optionalString cfg.lazygit.enable ''
local terminal = require 'toggleterm.terminal' local terminal = require 'toggleterm.terminal'
local lazygit = terminal.Terminal:new({ local lazygit = terminal.Terminal:new({
cmd = '${ cmd = '${
if (cfg.lazygit.package != null) if (cfg.lazygit.package != null)
then getExe cfg.lazygit.package then getExe cfg.lazygit.package
else "lazygit" else "lazygit"
}', }',
direction = '${cfg.lazygit.direction}', direction = '${cfg.lazygit.direction}',
hidden = true, hidden = true,
on_open = function(term) on_open = function(term)
vim.cmd("startinsert!") vim.cmd("startinsert!")
end 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}'})
''; '';
} };
];
}; };
}; };
} }

View file

@ -9,15 +9,13 @@
cfg = config.vim.binds.cheatsheet; cfg = config.vim.binds.cheatsheet;
in { in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
vim.lazy.plugins = [ vim.lazy.plugins.cheatsheet-nvim = {
{ package = "cheatsheet-nvim";
package = "cheatsheet-nvim"; setupModule = "cheatsheet";
setupModule = "cheatsheet"; setupOpts = {};
setupOpts = {}; cmd = ["Cheatsheet" "CheatsheetEdit"];
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')";
} };
];
}; };
} }

View file

@ -10,14 +10,12 @@ in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
vim = { vim = {
startPlugins = ["plenary-nvim"]; startPlugins = ["plenary-nvim"];
lazy.plugins = [ lazy.plugins.diffview-nvim = {
{ package = "diffview-nvim";
package = "diffview-nvim"; cmd = ["DiffviewClose" "DiffviewFileHistory" "DiffviewFocusFiles" "DiffviewLog" "DiffviewOpen" "DiffviewRefresh" "DiffviewToggleFiles"];
cmd = ["DiffviewClose" "DiffviewFileHistory" "DiffviewFocusFiles" "DiffviewLog" "DiffviewOpen" "DiffviewRefresh" "DiffviewToggleFiles"]; setupModule = "diffview";
setupModule = "diffview"; inherit (cfg) setupOpts;
inherit (cfg) setupOpts; };
}
];
}; };
}; };
} }

View file

@ -10,16 +10,14 @@ in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
vim.startPlugins = ["dressing-nvim"]; vim.startPlugins = ["dressing-nvim"];
vim.lazy.plugins = [ vim.lazy.plugins.icon-picker-nvim = {
{ package = "icon-picker-nvim";
package = "icon-picker-nvim"; setupModule = "icon-picker";
setupModule = "icon-picker"; setupOpts = {
setupOpts = { disable_legacy_commands = true;
disable_legacy_commands = true; };
};
cmd = ["IconPickerInsert" "IconPickerNormal" "IconPickerYank"]; cmd = ["IconPickerInsert" "IconPickerNormal" "IconPickerYank"];
} };
];
}; };
} }

View file

@ -11,51 +11,49 @@ in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
vim = { vim = {
startPlugins = ["vim-repeat"]; startPlugins = ["vim-repeat"];
lazy.plugins = [ lazy.plugins.leap-nvim = {
{ package = "leap-nvim";
package = "leap-nvim"; keys = [
keys = [ (mkLznBinding ["n" "o" "x"] cfg.mappings.leapForwardTo "<Plug>(leap-forward-to)" "Leap forward to")
(mkLznBinding ["n" "o" "x"] cfg.mappings.leapForwardTo "<Plug>(leap-forward-to)" "Leap forward to") (mkLznBinding ["n" "o" "x"] cfg.mappings.leapBackwardTo "<Plug>(leap-backward-to)" "Leap backward to")
(mkLznBinding ["n" "o" "x"] cfg.mappings.leapBackwardTo "<Plug>(leap-backward-to)" "Leap backward to") (mkLznBinding ["n" "o" "x"] cfg.mappings.leapForwardTill "<Plug>(leap-forward-till)" "Leap forward till")
(mkLznBinding ["n" "o" "x"] cfg.mappings.leapForwardTill "<Plug>(leap-forward-till)" "Leap forward till") (mkLznBinding ["n" "o" "x"] cfg.mappings.leapBackwardTill "<Plug>(leap-backward-till)" "Leap backward till")
(mkLznBinding ["n" "o" "x"] cfg.mappings.leapBackwardTill "<Plug>(leap-backward-till)" "Leap backward till") (mkLznBinding ["n" "o" "x"] cfg.mappings.leapFromWindow "<Plug>(leap-from-window)" "Leap from window")
(mkLznBinding ["n" "o" "x"] cfg.mappings.leapFromWindow "<Plug>(leap-from-window)" "Leap from window") ];
];
after = '' after = ''
require('leap').opts = { require('leap').opts = {
max_phase_one_targets = nil, max_phase_one_targets = nil,
highlight_unlabeled_phase_one_targets = false, highlight_unlabeled_phase_one_targets = false,
max_highlighted_traversal_targets = 10, max_highlighted_traversal_targets = 10,
case_sensitive = false, case_sensitive = false,
equivalence_classes = { ' \t\r\n', }, equivalence_classes = { ' \t\r\n', },
substitute_chars = {}, substitute_chars = {},
safe_labels = { safe_labels = {
"s", "f", "n", "u", "t", "/", "s", "f", "n", "u", "t", "/",
"S", "F", "N", "L", "H", "M", "U", "G", "T", "?", "Z" "S", "F", "N", "L", "H", "M", "U", "G", "T", "?", "Z"
}, },
labels = { labels = {
"s", "f", "n", "s", "f", "n",
"j", "k", "l", "h", "o", "d", "w", "e", "m", "b", "j", "k", "l", "h", "o", "d", "w", "e", "m", "b",
"u", "y", "v", "r", "g", "t", "c", "x", "/", "z", "u", "y", "v", "r", "g", "t", "c", "x", "/", "z",
"S", "F", "N", "S", "F", "N",
"J", "K", "L", "H", "O", "D", "W", "E", "M", "B", "J", "K", "L", "H", "O", "D", "W", "E", "M", "B",
"U", "Y", "V", "R", "G", "T", "C", "X", "?", "Z" "U", "Y", "V", "R", "G", "T", "C", "X", "?", "Z"
}, },
special_keys = { special_keys = {
repeat_search = '<enter>', repeat_search = '<enter>',
next_phase_one_target = '<enter>', next_phase_one_target = '<enter>',
next_target = {'<enter>', ';'}, next_target = {'<enter>', ';'},
prev_target = {'<tab>', ','}, prev_target = {'<tab>', ','},
next_group = '<space>', next_group = '<space>',
prev_group = '<tab>', prev_group = '<tab>',
multi_accept = '<enter>', multi_accept = '<enter>',
multi_revert = '<backspace>', multi_revert = '<backspace>',
}, },
} }
''; '';
} };
];
}; };
}; };
} }

View file

@ -30,26 +30,24 @@ in {
startPlugins = ["nvim-surround"]; startPlugins = ["nvim-surround"];
pluginRC.surround = entryAnywhere "require('nvim-surround').setup(${toLuaObject cfg.setupOpts})"; pluginRC.surround = entryAnywhere "require('nvim-surround').setup(${toLuaObject cfg.setupOpts})";
lazy.plugins = [ lazy.plugins.nvim-surround = {
{ package = "nvim-surround";
package = "nvim-surround"; setupModule = "nvim-surround";
setupModule = "nvim-surround"; inherit (cfg) setupOpts;
inherit (cfg) setupOpts;
keys = keys =
map (mkLznKey ["i"]) (with vendoredKeybinds; [insert insert_line]) map (mkLznKey ["i"]) (with vendoredKeybinds; [insert insert_line])
++ map (mkLznKey ["x"]) (with vendoredKeybinds; [visual visual_line]) ++ map (mkLznKey ["x"]) (with vendoredKeybinds; [visual visual_line])
++ map (mkLznKey ["n"]) (with vendoredKeybinds; [ ++ map (mkLznKey ["n"]) (with vendoredKeybinds; [
normal normal
normal_cur normal_cur
normal_line normal_line
normal_cur_line normal_cur_line
delete delete
change change
change_line change_line
]); ]);
} };
];
utility.surround.setupOpts.keymaps = mkIf cfg.useVendoredKeybindings vendoredKeybinds; utility.surround.setupOpts.keymaps = mkIf cfg.useVendoredKeybindings vendoredKeybinds;
}; };

View file

@ -20,57 +20,55 @@ in {
vim = { vim = {
startPlugins = ["plenary-nvim"]; startPlugins = ["plenary-nvim"];
lazy.plugins = [ lazy.plugins.telescope = {
{ package = "telescope";
package = "telescope"; setupModule = "telescope";
setupModule = "telescope"; inherit (cfg) setupOpts;
inherit (cfg) setupOpts; # FIXME: how do I deal with extensions? set all as deps?
# FIXME: how do I deal with extensions? set all as deps? after = ''
after = '' local telescope = require("telescope")
local telescope = require("telescope") ${optionalString config.vim.ui.noice.enable "telescope.load_extension('noice')"}
${optionalString config.vim.ui.noice.enable "telescope.load_extension('noice')"} ${optionalString config.vim.notify.nvim-notify.enable "telescope.load_extension('notify')"}
${optionalString config.vim.notify.nvim-notify.enable "telescope.load_extension('notify')"} ${optionalString config.vim.projects.project-nvim.enable "telescope.load_extension('projects')"}
${optionalString config.vim.projects.project-nvim.enable "telescope.load_extension('projects')"} '';
'';
cmd = ["Telescope"]; cmd = ["Telescope"];
keys = keys =
[ [
(mkSetLznBinding mappings.findFiles "<cmd> Telescope find_files<CR>") (mkSetLznBinding mappings.findFiles "<cmd> Telescope find_files<CR>")
(mkSetLznBinding mappings.liveGrep "<cmd> Telescope live_grep<CR>") (mkSetLznBinding mappings.liveGrep "<cmd> Telescope live_grep<CR>")
(mkSetLznBinding mappings.buffers "<cmd> Telescope buffers<CR>") (mkSetLznBinding mappings.buffers "<cmd> Telescope buffers<CR>")
(mkSetLznBinding mappings.helpTags "<cmd> Telescope help_tags<CR>") (mkSetLznBinding mappings.helpTags "<cmd> Telescope help_tags<CR>")
(mkSetLznBinding mappings.open "<cmd> Telescope<CR>") (mkSetLznBinding mappings.open "<cmd> Telescope<CR>")
(mkSetLznBinding mappings.gitCommits "<cmd> Telescope git_commits<CR>") (mkSetLznBinding mappings.gitCommits "<cmd> Telescope git_commits<CR>")
(mkSetLznBinding mappings.gitBufferCommits "<cmd> Telescope git_bcommits<CR>") (mkSetLznBinding mappings.gitBufferCommits "<cmd> Telescope git_bcommits<CR>")
(mkSetLznBinding mappings.gitBranches "<cmd> Telescope git_branches<CR>") (mkSetLznBinding mappings.gitBranches "<cmd> Telescope git_branches<CR>")
(mkSetLznBinding mappings.gitStatus "<cmd> Telescope git_status<CR>") (mkSetLznBinding mappings.gitStatus "<cmd> Telescope git_status<CR>")
(mkSetLznBinding mappings.gitStash "<cmd> Telescope git_stash<CR>") (mkSetLznBinding mappings.gitStash "<cmd> Telescope git_stash<CR>")
]
++ (optionals config.vim.lsp.enable [
(mkSetLznBinding mappings.lspDocumentSymbols "<cmd> Telescope lsp_document_symbols<CR>")
(mkSetLznBinding mappings.lspWorkspaceSymbols "<cmd> Telescope lsp_workspace_symbols<CR>")
(mkSetLznBinding mappings.lspReferences "<cmd> Telescope lsp_references<CR>")
(mkSetLznBinding mappings.lspImplementations "<cmd> Telescope lsp_implementations<CR>")
(mkSetLznBinding mappings.lspDefinitions "<cmd> Telescope lsp_definitions<CR>")
(mkSetLznBinding mappings.lspTypeDefinitions "<cmd> Telescope lsp_type_definitions<CR>")
(mkSetLznBinding mappings.diagnostics "<cmd> Telescope diagnostics<CR>")
])
++ (
optionals config.vim.treesitter.enable [
(mkSetLznBinding mappings.treesitter "<cmd> Telescope treesitter<CR>")
] ]
++ (optionals config.vim.lsp.enable [ )
(mkSetLznBinding mappings.lspDocumentSymbols "<cmd> Telescope lsp_document_symbols<CR>") ++ (
(mkSetLznBinding mappings.lspWorkspaceSymbols "<cmd> Telescope lsp_workspace_symbols<CR>") optionals config.vim.projects.project-nvim.enable [
(mkSetLznBinding mappings.findProjects "<cmd Telescope projects<CR>")
(mkSetLznBinding mappings.lspReferences "<cmd> Telescope lsp_references<CR>") ]
(mkSetLznBinding mappings.lspImplementations "<cmd> Telescope lsp_implementations<CR>") );
(mkSetLznBinding mappings.lspDefinitions "<cmd> Telescope lsp_definitions<CR>") };
(mkSetLznBinding mappings.lspTypeDefinitions "<cmd> Telescope lsp_type_definitions<CR>")
(mkSetLznBinding mappings.diagnostics "<cmd> Telescope diagnostics<CR>")
])
++ (
optionals config.vim.treesitter.enable [
(mkSetLznBinding mappings.treesitter "<cmd> Telescope treesitter<CR>")
]
)
++ (
optionals config.vim.projects.project-nvim.enable [
(mkSetLznBinding mappings.findProjects "<cmd Telescope projects<CR>")
]
);
}
];
binds.whichKey.register = pushDownDefault { binds.whichKey.register = pushDownDefault {
"<leader>f" = "+Telescope"; "<leader>f" = "+Telescope";

View file

@ -8,13 +8,11 @@
cfg = config.vim.visuals.fidget-nvim; cfg = config.vim.visuals.fidget-nvim;
in { in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
vim.lazy.plugins = [ vim.lazy.plugins.fidget-nvim = {
{ package = "fidget-nvim";
package = "fidget-nvim"; setupModule = "fidget";
setupModule = "fidget"; event = "LspAttach";
event = "LspAttach"; inherit (cfg) setupOpts;
inherit (cfg) setupOpts; };
}
];
}; };
} }