From b88cf78d26e67bb5c285099041de6647e94c5141 Mon Sep 17 00:00:00 2001
From: afranco <afonso@francof.net>
Date: Wed, 20 Sep 2023 15:43:55 +0100
Subject: [PATCH] chore: Added compiler explorer with config

---
 .config/nvim/lua/plugins/lazy.lua | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/.config/nvim/lua/plugins/lazy.lua b/.config/nvim/lua/plugins/lazy.lua
index ead9e43..61e6272 100644
--- a/.config/nvim/lua/plugins/lazy.lua
+++ b/.config/nvim/lua/plugins/lazy.lua
@@ -103,6 +103,25 @@ lazy.setup({
     },
     -- Rename variable pop up
     'stevearc/dressing.nvim',
+    {
+        'krady21/compiler-explorer.nvim',
+        config = function()
+            require("compiler-explorer").setup({
+                url = "https://godbolt.org",
+                infer_lang = true, -- Try to infer possible language based on file extension.
+                line_match = {
+                    highlight = true, -- highlight the matching line(s) in the other buffer.
+                    jump = true, -- move the cursor in the other buffer to the first matching line.
+                },
+                open_qflist = true, --  Open qflist after compilation if there are diagnostics.
+                split = "split", -- How to split the window after the second compile (split/vsplit).
+                compiler_flags = "", -- Default flags passed to the compiler.
+                job_timeout_ms = 25000, -- Timeout for libuv job in milliseconds.
+                languages = { -- Language specific default compiler/flags
+                },
+            })
+        end
+    },
 
     {
         'windwp/nvim-autopairs',