mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2024-11-08 11:25:58 +01:00
30 lines
747 B
Nix
30 lines
747 B
Nix
{
|
|
config,
|
|
lib,
|
|
...
|
|
}: let
|
|
inherit (lib.modules) mkIf mkMerge;
|
|
inherit (lib.nvim.dag) entryAnywhere;
|
|
inherit (lib.nvim.binds) addDescriptionsToMappings mkSetBinding;
|
|
|
|
cfg = config.vim.lsp;
|
|
|
|
self = import ./otter.nix {inherit lib;};
|
|
mappingDefinitions = self.options.vim.lsp.otter.mappings;
|
|
mappings = addDescriptionsToMappings cfg.otter.mappings mappingDefinitions;
|
|
in {
|
|
config = mkIf (cfg.enable && cfg.otter.enable) {
|
|
vim = {
|
|
startPlugins = ["otter"];
|
|
|
|
maps.normal = mkMerge [
|
|
(mkSetBinding mappings.toggle "<cmd>lua require'otter'.activate()<CR>")
|
|
];
|
|
|
|
pluginRC.otter = entryAnywhere ''
|
|
-- Enable otter diagnostics viewer
|
|
require("otter").setup {}
|
|
'';
|
|
};
|
|
};
|
|
}
|