mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-22 05:10:44 +00:00
lib/binds: update lzn bind functions
This commit is contained in:
parent
2df52f6ec4
commit
8099b9c821
5 changed files with 31 additions and 30 deletions
|
@ -79,14 +79,14 @@
|
|||
expr = true;
|
||||
};
|
||||
|
||||
mkSetLznBinding = binding: action: {
|
||||
inherit action;
|
||||
mkSetLznBinding = mode: binding: action: {
|
||||
inherit action mode;
|
||||
key = binding.value;
|
||||
desc = binding.description;
|
||||
};
|
||||
|
||||
mkSetLuaLznBinding = binding: action: {
|
||||
inherit action;
|
||||
mkSetLuaLznBinding = mode: binding: action: {
|
||||
inherit action mode;
|
||||
key = binding.value;
|
||||
lua = true;
|
||||
desc = binding.description;
|
||||
|
|
|
@ -60,7 +60,7 @@ in {
|
|||
inherit (cfg.ui) setupOpts;
|
||||
|
||||
keys = [
|
||||
(mkSetLuaLznBinding mappings.toggleDapUI "function() require('dapui').toggle() end")
|
||||
(mkSetLuaLznBinding "n" mappings.toggleDapUI "function() require('dapui').toggle() end")
|
||||
];
|
||||
};
|
||||
|
||||
|
|
|
@ -21,12 +21,12 @@ in {
|
|||
|
||||
cmd = "Trouble";
|
||||
keys = [
|
||||
(mkSetLznBinding mappings.toggle "<cmd>TroubleToggle<CR>")
|
||||
(mkSetLznBinding mappings.workspaceDiagnostics "<cmd>TroubleToggle workspace_diagnostics<CR>")
|
||||
(mkSetLznBinding mappings.documentDiagnostics "<cmd>TroubleToggle document_diagnostics<CR>")
|
||||
(mkSetLznBinding mappings.lspReferences "<cmd>TroubleToggle lsp_references<CR>")
|
||||
(mkSetLznBinding mappings.quickfix "<cmd>TroubleToggle quickfix<CR>")
|
||||
(mkSetLznBinding mappings.locList "<cmd>TroubleToggle loclist<CR>")
|
||||
(mkSetLznBinding "n" mappings.toggle "<cmd>TroubleToggle<CR>")
|
||||
(mkSetLznBinding "n" mappings.workspaceDiagnostics "<cmd>TroubleToggle workspace_diagnostics<CR>")
|
||||
(mkSetLznBinding "n" mappings.documentDiagnostics "<cmd>TroubleToggle document_diagnostics<CR>")
|
||||
(mkSetLznBinding "n" mappings.lspReferences "<cmd>TroubleToggle lsp_references<CR>")
|
||||
(mkSetLznBinding "n" mappings.quickfix "<cmd>TroubleToggle quickfix<CR>")
|
||||
(mkSetLznBinding "n" mappings.locList "<cmd>TroubleToggle loclist<CR>")
|
||||
];
|
||||
};
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@ in {
|
|||
[(mkLznBinding ["n"] cfg.mappings.open "<Cmd>execute v:count . \"ToggleTerm\"<CR>" "Toggle terminal")]
|
||||
++ optional cfg.lazygit.enable {
|
||||
key = cfg.lazygit.mappings.open;
|
||||
mode = "n";
|
||||
desc = lazygitMapDesc;
|
||||
};
|
||||
|
||||
|
|
|
@ -34,36 +34,36 @@ in {
|
|||
|
||||
keys =
|
||||
[
|
||||
(mkSetLznBinding mappings.findFiles "<cmd> Telescope find_files<CR>")
|
||||
(mkSetLznBinding mappings.liveGrep "<cmd> Telescope live_grep<CR>")
|
||||
(mkSetLznBinding mappings.buffers "<cmd> Telescope buffers<CR>")
|
||||
(mkSetLznBinding mappings.helpTags "<cmd> Telescope help_tags<CR>")
|
||||
(mkSetLznBinding mappings.open "<cmd> Telescope<CR>")
|
||||
(mkSetLznBinding "n" mappings.findFiles "<cmd> Telescope find_files<CR>")
|
||||
(mkSetLznBinding "n" mappings.liveGrep "<cmd> Telescope live_grep<CR>")
|
||||
(mkSetLznBinding "n" mappings.buffers "<cmd> Telescope buffers<CR>")
|
||||
(mkSetLznBinding "n" mappings.helpTags "<cmd> Telescope help_tags<CR>")
|
||||
(mkSetLznBinding "n" mappings.open "<cmd> Telescope<CR>")
|
||||
|
||||
(mkSetLznBinding mappings.gitCommits "<cmd> Telescope git_commits<CR>")
|
||||
(mkSetLznBinding mappings.gitBufferCommits "<cmd> Telescope git_bcommits<CR>")
|
||||
(mkSetLznBinding mappings.gitBranches "<cmd> Telescope git_branches<CR>")
|
||||
(mkSetLznBinding mappings.gitStatus "<cmd> Telescope git_status<CR>")
|
||||
(mkSetLznBinding mappings.gitStash "<cmd> Telescope git_stash<CR>")
|
||||
(mkSetLznBinding "n" mappings.gitCommits "<cmd> Telescope git_commits<CR>")
|
||||
(mkSetLznBinding "n" mappings.gitBufferCommits "<cmd> Telescope git_bcommits<CR>")
|
||||
(mkSetLznBinding "n" mappings.gitBranches "<cmd> Telescope git_branches<CR>")
|
||||
(mkSetLznBinding "n" mappings.gitStatus "<cmd> Telescope git_status<CR>")
|
||||
(mkSetLznBinding "n" 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 "n" mappings.lspDocumentSymbols "<cmd> Telescope lsp_document_symbols<CR>")
|
||||
(mkSetLznBinding "n" 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>")
|
||||
(mkSetLznBinding "n" mappings.lspReferences "<cmd> Telescope lsp_references<CR>")
|
||||
(mkSetLznBinding "n" mappings.lspImplementations "<cmd> Telescope lsp_implementations<CR>")
|
||||
(mkSetLznBinding "n" mappings.lspDefinitions "<cmd> Telescope lsp_definitions<CR>")
|
||||
(mkSetLznBinding "n" mappings.lspTypeDefinitions "<cmd> Telescope lsp_type_definitions<CR>")
|
||||
(mkSetLznBinding "n" mappings.diagnostics "<cmd> Telescope diagnostics<CR>")
|
||||
])
|
||||
++ (
|
||||
optionals config.vim.treesitter.enable [
|
||||
(mkSetLznBinding mappings.treesitter "<cmd> Telescope treesitter<CR>")
|
||||
(mkSetLznBinding "n" mappings.treesitter "<cmd> Telescope treesitter<CR>")
|
||||
]
|
||||
)
|
||||
++ (
|
||||
optionals config.vim.projects.project-nvim.enable [
|
||||
(mkSetLznBinding mappings.findProjects "<cmd Telescope projects<CR>")
|
||||
(mkSetLznBinding "n" mappings.findProjects "<cmd Telescope projects<CR>")
|
||||
]
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue