From 81857e4acf7d5ebdfeda645b7c2a08bc0738d385 Mon Sep 17 00:00:00 2001 From: Soliprem Date: Fri, 27 Sep 2024 09:46:30 +0200 Subject: [PATCH] created otter file merge --- modules/plugins/lsp/otter/config.nix | 21 +++++++++++++++++++++ modules/plugins/lsp/otter/otter.nix | 12 ++++++++++++ 2 files changed, 33 insertions(+) diff --git a/modules/plugins/lsp/otter/config.nix b/modules/plugins/lsp/otter/config.nix index e5df92f7..09881d51 100644 --- a/modules/plugins/lsp/otter/config.nix +++ b/modules/plugins/lsp/otter/config.nix @@ -5,6 +5,7 @@ }: let inherit (lib.modules) mkIf mkMerge; inherit (lib.nvim.dag) entryAnywhere; +<<<<<<< HEAD inherit (lib.nvim.lua) toLuaObject; inherit (lib.nvim.binds) addDescriptionsToMappings mkSetBinding; @@ -26,13 +27,33 @@ in { vim = { startPlugins = ["otter-nvim"]; +======= + 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"]; + +>>>>>>> d61aba1 (created otter file) maps.normal = mkMerge [ (mkSetBinding mappings.toggle "lua require'otter'.activate()") ]; +<<<<<<< HEAD pluginRC.otter-nvim = entryAnywhere '' -- Enable otter diagnostics viewer require("otter").setup({${toLuaObject cfg.otter-nvim.setupOpts}}) +======= + pluginRC.otter = entryAnywhere '' + -- Enable otter diagnostics viewer + require("otter").setup {} +>>>>>>> d61aba1 (created otter file) ''; }; }; diff --git a/modules/plugins/lsp/otter/otter.nix b/modules/plugins/lsp/otter/otter.nix index 79797aaf..4a494351 100644 --- a/modules/plugins/lsp/otter/otter.nix +++ b/modules/plugins/lsp/otter/otter.nix @@ -1,4 +1,5 @@ {lib, ...}: let +<<<<<<< HEAD inherit (lib.options) mkOption mkEnableOption; inherit (lib.nvim.binds) mkMappingOption; inherit (lib.types) bool str listOf; @@ -58,6 +59,17 @@ in { (eg. in Org files) When true, otter handles these cases fully. ''; }; +======= + inherit (lib.options) mkEnableOption; + inherit (lib.nvim.binds) mkMappingOption; +in { + options.vim.lsp = { + trouble = { + enable = mkEnableOption "Otter LSP Injector"; + + mappings = { + toggle = mkMappingOption "Activate LSP on Cursor Position [otter]" "oa"; +>>>>>>> d61aba1 (created otter file) }; }; };