diff --git a/plugins/by-name/dap-view/default.nix b/plugins/by-name/dap-view/default.nix new file mode 100644 index 00000000..391017cb --- /dev/null +++ b/plugins/by-name/dap-view/default.nix @@ -0,0 +1,29 @@ +{ lib, ... }: +lib.nixvim.plugins.mkNeovimPlugin { + name = "dap-view"; + packPathName = "nvim-dap-view"; + moduleName = "dap-view"; + package = "nvim-dap-view"; + + maintainers = [ lib.maintainers.khaneliman ]; + + settingsExample = { + winbar = { + controls.enabled = true; + }; + windows.terminal = { + position = "right"; + start_hidden = true; + }; + }; + + extraConfig = { + # Compatibility with lualine module. + # Broken UI otherwise https://github.com/igorlfs/nvim-dap-view/issues/36 + plugins.lualine.settings.options.disabled_filetypes.winbar = [ + "dap-repl" + "dap-view" + "dap-view-term" + ]; + }; +} diff --git a/tests/test-sources/plugins/by-name/dap-view/default.nix b/tests/test-sources/plugins/by-name/dap-view/default.nix new file mode 100644 index 00000000..6e194e4b --- /dev/null +++ b/tests/test-sources/plugins/by-name/dap-view/default.nix @@ -0,0 +1,69 @@ +{ + empty = { + plugins.dap-view.enable = true; + }; + + defaults = { + plugins.dap-view = { + enable = true; + settings = { + winbar = { + show = true; + sections = [ + "watches" + "scopes" + "exceptions" + "breakpoints" + "threads" + "repl" + ]; + default_section = "watches"; + headers = { + breakpoints = "Breakpoints [B]"; + scopes = "Scopes [S]"; + exceptions = "Exceptions [E]"; + watches = "Watches [W]"; + threads = "Threads [T]"; + repl = "REPL [R]"; + console = "Console [C]"; + }; + controls = { + enabled = false; + position = "right"; + buttons = [ + "play" + "step_into" + "step_over" + "step_out" + "step_back" + "run_last" + "terminate" + "disconnect" + ]; + icons = { + pause = ""; + play = ""; + step_into = ""; + step_over = ""; + step_out = ""; + step_back = ""; + run_last = ""; + terminate = ""; + disconnect = ""; + }; + custom_buttons = { }; + }; + }; + windows = { + height = 12; + terminal = { + position = "left"; + hide = { }; + start_hidden = false; + }; + }; + switchbuf = "usetab;newtab"; + }; + }; + }; +}