mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2024-11-08 17:05:59 +01:00
da86e554a6
* Revert "leap: changed default binds"
This reverts commit 92a7bfc4b8
.
* Reapply "leap: changed default binds"
This reverts commit ede1d4437e2d8d1a6ff31b4dc855676c6e16df36.
* otter: fixed stupid typo
* otter: added changelog entry
39 lines
1.1 KiB
Nix
39 lines
1.1 KiB
Nix
{
|
|
config,
|
|
lib,
|
|
...
|
|
}: let
|
|
inherit (lib.modules) mkIf mkMerge;
|
|
inherit (lib.nvim.dag) entryAnywhere;
|
|
inherit (lib.nvim.lua) toLuaObject;
|
|
inherit (lib.nvim.binds) addDescriptionsToMappings mkSetBinding;
|
|
|
|
cfg = config.vim.lsp;
|
|
|
|
self = import ./otter.nix {inherit lib;};
|
|
mappingDefinitions = self.options.vim.lsp.otter-nvim.mappings;
|
|
mappings = addDescriptionsToMappings cfg.otter-nvim.mappings mappingDefinitions;
|
|
in {
|
|
config = mkIf (cfg.enable && cfg.otter-nvim.enable) {
|
|
assertions = [
|
|
{
|
|
assertion = !config.vim.utility.ccc.enable;
|
|
message = ''
|
|
ccc and otter have a breaking conflict. It's been reported upstream. Until it's fixed, disable one of them
|
|
'';
|
|
}
|
|
];
|
|
vim = {
|
|
startPlugins = ["otter-nvim"];
|
|
|
|
maps.normal = mkMerge [
|
|
(mkSetBinding mappings.toggle "<cmd>lua require'otter'.activate()<CR>")
|
|
];
|
|
|
|
pluginRC.otter-nvim = entryAnywhere ''
|
|
-- Enable otter diagnostics viewer
|
|
require("otter").setup(${toLuaObject cfg.otter-nvim.setupOpts})
|
|
'';
|
|
};
|
|
};
|
|
}
|