Compare commits

..

6 Commits

Author SHA1 Message Date
Ching Pei Yang 24aa928785
Merge 2cec6178ab into 12fd9d69dc 2024-05-07 01:08:41 -04:00
raf 12fd9d69dc
Merge pull request #287 from FrothyMarrow/mappings-fix
plugins/lsp: filter out null mappings
2024-05-06 21:42:22 +00:00
Frothy dc0fa76295 docs: entry for fixed null lsp mappings 2024-05-06 17:01:16 -04:00
Frothy 83583e9b64 plugins/lsp: filter out null mappings 2024-05-06 16:05:43 -04:00
raf efd8b44ce1
Merge pull request #284 from FrothyMarrow/del-dupl-telescope
utility/telescope: remove duplicate telescope module
2024-05-06 12:53:12 +00:00
Frothy 9fe96ce010 utility/telescope: remove duplicate telescope module 2024-05-06 08:46:04 -04:00
3 changed files with 6 additions and 55 deletions

View File

@ -13,7 +13,8 @@ Release notes for release 0.7
- Modified type for [](#opt-vim.visuals.fidget-nvim.setupOpts.progress.display.overrides)
from `anything` to a `submodule` for better type checking.
- Fix null `vim.lsp.mappings` generating an error and not being filtered out.
[horriblename](https://github.com/horriblename)
[horriblename](https://github.com/horriblename):
- Fix broken treesitter-context keybinds in visual mode

View File

@ -16,7 +16,10 @@
mappingDefinitions = self.options.vim.lsp.mappings;
mappings = addDescriptionsToMappings cfg.mappings mappingDefinitions;
mkBinding = binding: action: "vim.api.nvim_buf_set_keymap(bufnr, 'n', '${binding.value}', '<cmd>lua ${action}<CR>', {noremap=true, silent=true, desc='${binding.description}'})";
mkBinding = binding: action:
if binding.value != null
then "vim.api.nvim_buf_set_keymap(bufnr, 'n', '${binding.value}', '<cmd>lua ${action}<CR>', {noremap=true, silent=true, desc='${binding.description}'})"
else "";
in {
config = mkIf cfg.enable {
vim = {

View File

@ -1,53 +0,0 @@
{
pkgs,
lib,
...
}: let
inherit (lib) mkMappingOption mkEnableOption mkOption types;
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";
vimgrep_arguments = mkOption {
description = "Arguments to use for the grep command";
type = types.listOf types.str;
default = [
"${pkgs.ripgrep}/bin/rg"
"--color=never"
"--no-heading"
"--with-filename"
"--line-number"
"--column"
"--smart-case"
"--hidden"
"--no-ignore"
];
};
};
}