mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2024-12-24 02:59:49 +01:00
69cd77630b
* r: implementing lsp * r: version bump to context fixes treesitter bug * r: changing treesitter package definition to mkGrammarOption * added changelog entry * created otter file * created otter file * update * update * otter: fixing fixing input * committing flake.lock * fixed typo * configuration: disabling ccc and enabling otter * added assertion to make sure ccc and otter aren't enabled at the same time * configuration: otter set for isMaximal * otter: changelog * otter: better changelog * otter-nvim: renamed from otter to otter-nvim * otter: added setupopts --------- Co-authored-by: raf <raf@notashelf.dev>
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}})
|
|
'';
|
|
};
|
|
};
|
|
}
|