From fbe19e30632e8a5dd3c6ead27d091dec33405660 Mon Sep 17 00:00:00 2001 From: Zeioth Date: Thu, 22 Jun 2023 18:24:55 +0200 Subject: [PATCH] feat(code-runner): add compiler.nvim (#298) * feat(compiler.nvim) * Update compiler-nvim.lua * simplify implementation --------- Co-authored-by: Micah Halter --- .../code-runner/compiler-nvim/README.md | 5 +++++ .../compiler-nvim/compiler-nvim.lua | 22 +++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 lua/astrocommunity/code-runner/compiler-nvim/README.md create mode 100644 lua/astrocommunity/code-runner/compiler-nvim/compiler-nvim.lua diff --git a/lua/astrocommunity/code-runner/compiler-nvim/README.md b/lua/astrocommunity/code-runner/compiler-nvim/README.md new file mode 100644 index 000000000..c68792ed3 --- /dev/null +++ b/lua/astrocommunity/code-runner/compiler-nvim/README.md @@ -0,0 +1,5 @@ +# compiler.nvim + +**Repository:** https://github.com/Zeioth/Compiler.nvim + +A Neovim compiler for building and running your code without having to configure anything diff --git a/lua/astrocommunity/code-runner/compiler-nvim/compiler-nvim.lua b/lua/astrocommunity/code-runner/compiler-nvim/compiler-nvim.lua new file mode 100644 index 000000000..01cb006d2 --- /dev/null +++ b/lua/astrocommunity/code-runner/compiler-nvim/compiler-nvim.lua @@ -0,0 +1,22 @@ +return { + "Zeioth/compiler.nvim", + dependencies = { + { + "stevearc/overseer.nvim", + opts = { + task_list = { -- this refers to the window that shows the result + direction = "bottom", + min_height = 25, + max_height = 25, + default_detail = 1, + bindings = { + ["q"] = function() vim.cmd "OverseerClose" end, + }, + }, + }, + config = function(_, opts) require("overseer").setup(opts) end, + }, + }, + cmd = { "CompilerOpen", "CompilerToggleResults" }, + config = function(_, opts) require("compiler").setup(opts) end, +}