diff --git a/docs/release-notes/rl-0.7.md b/docs/release-notes/rl-0.7.md index 0cf265f..d822399 100644 --- a/docs/release-notes/rl-0.7.md +++ b/docs/release-notes/rl-0.7.md @@ -12,9 +12,10 @@ Release notes for release 0.7 [frothymarrow](https://github.com/frothymarrow): - Modified type for [](#opt-vim.visuals.fidget-nvim.setupOpts.progress.display.overrides) - from `anything` to a `submodule` for better type checking + 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 diff --git a/modules/plugins/lsp/config.nix b/modules/plugins/lsp/config.nix index ba93b28..d91a4fb 100644 --- a/modules/plugins/lsp/config.nix +++ b/modules/plugins/lsp/config.nix @@ -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}', 'lua ${action}', {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}', 'lua ${action}', {noremap=true, silent=true, desc='${binding.description}'})" + else ""; in { config = mkIf cfg.enable { vim = {