gabrielgio.lua @ dfe730b889915e33af1d3da810b13aa9d1d4253c

diff --git a/init.lua b/init.lua
index 840cb0cfc8eeb42d229f36a2d873f71c26271f08..24f40621a298ed9c6157833c6a23cc27c546c4f5 100644
--- a/init.lua
+++ b/init.lua
@@ -19,7 +19,6 @@
 local pkgs = {
     "folke/trouble.nvim",                           -- diagnostics
     "mfussenegger/nvim-dap",                        -- add dap support
-    "leoluz/nvim-dap-go",                           -- add some utilites to go
     "nvim-neotest/nvim-nio",                        -- async support library
     "nvim-lua/plenary.nvim",                        -- base lib
     "nvim-telescope/telescope.nvim",                -- telescope
@@ -33,6 +32,7 @@     "simrat39/symbols-outline.nvim",                -- symbols tree (lsp aware)
     "caenrique/nvim-toggle-terminal",               -- help with toggle from and to terminals [DEPRECATED]
     "RRethy/vim-illuminate",                        -- hightlight use of the same word (lsp aware)
     "sainnhe/edge",                                 -- light theme
+    "ellisonleao/gruvbox.nvim",                     -- light theme
     "williamboman/mason.nvim",                      -- manages many things
     "neovim/nvim-lspconfig",                        -- lsp support
 }
diff --git a/lua/gabrielgio/dap.lua b/lua/gabrielgio/dap.lua
index 2534c7a17e9070d029d74f89d4422e19f726a854..238a1bc531275e1fa6fdc5f9ca573f83f9cb3aed 100644
--- a/lua/gabrielgio/dap.lua
+++ b/lua/gabrielgio/dap.lua
@@ -1,8 +1,5 @@
 local dap = require("dap")
 local key = require("gabrielgio.key")
-local dapgo = require("dap-go")
-
-dapgo.setup({delve = {build_flags = "-tags=unit,integration,e2e"}})
 
 key.nnoremap("<F5>", ":lua require'dap'.continue()<CR>")
 key.nnoremap("<F10>", ":lua require'dap'.step_over()<CR>")
@@ -10,23 +7,23 @@ key.nnoremap("<F11>", ":lua require'dap'.step_into()<CR>")
 key.nnoremap("<F12>", ":lua require'dap'.step_out()<CR>")
 key.nnoremap("<leader>b", ":lua require'dap'.toggle_breakpoint()<CR>")
 key.nnoremap("<leader>B", ":lua require'dap'.set_breakpoint(vim.fn.input('Condition: '))<CR>")
-key.nnoremap("<leader>dt", ":lua require'dap-go'.debug_test()<CR>")
 key.nnoremap("<leader>dr", ":lua require'dap'.repl.open()<CR>")
 
-dap.adapters.gdb = {
-    type = "executable",
-    command = "gdb",
-    args = { "-i", "dap" }
-}
+dap.adapters.delve = {
+    type = "server",
+    host = "127.0.0.1",
+    port = 2345,
+  }
 
-dap.configurations.c = {
+dap.configurations.go = {
     {
-        name = "Launch",
-        type = "gdb",
-        request = "launch",
-        program = function()
-            return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
-        end,
-        cwd = "${workspaceFolder}",
+        type = "delve",
+        name = "remote",
+        mode = "remote",
+        request = "attach",
+        connect = {
+            host = "127.0.0.1",
+            port = "2345",
+        },
     },
 }
diff --git a/lua/gabrielgio/lsp.lua b/lua/gabrielgio/lsp.lua
index c8202c21bdce75cf0e11ed6990e97ab6063a5ee8..2be8b5ec662e004de50ee8a40a43d45df8f91074 100644
--- a/lua/gabrielgio/lsp.lua
+++ b/lua/gabrielgio/lsp.lua
@@ -35,7 +35,8 @@     lsp_config.cssls.setup,
     lsp_config.html.setup,
     lsp_config.emmet_ls.setup,
     lsp_config.pylsp.setup,
-    lsp_config.zls.setup
+    lsp_config.zls.setup,
+    lsp_config.tsserver.setup
 })
 
 lsp_config.gopls.setup({
diff --git a/lua/gabrielgio/settable.lua b/lua/gabrielgio/settable.lua
index bf76064a4dacb0f8137c037b68f6efc807096f9f..5096d3f0c0f878db7d19d2e181525927279e594f 100644
--- a/lua/gabrielgio/settable.lua
+++ b/lua/gabrielgio/settable.lua
@@ -44,9 +44,12 @@ vim.opt.updatetime = 100
 vim.opt.foldmethod = "expr"
 vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
 vim.opt.foldenable = false
-vim.cmd("colorscheme edge")
 vim.o.background = "light"
-
+if 1==1 then
+    vim.cmd("colorscheme edge")
+else
+    vim.cmd("colorscheme gruvbox")
+end
 vim.g.loaded = 1
 vim.g.loaded_netrwPlugin = 1
 vim.g.CtrlSpaceDefaultMappingKey = "<C-space> "
diff --git a/lua/gabrielgio/trouble.lua b/lua/gabrielgio/trouble.lua
index 67c4938e4d7a46e2a3afefe54e5147f311c79ab4..f48fec40ad2a5af00c1a4d1091ba77f7a045bc26 100644
--- a/lua/gabrielgio/trouble.lua
+++ b/lua/gabrielgio/trouble.lua
@@ -1,15 +1,18 @@
+local key = require("gabrielgio.key")
 local trouble = require("trouble")
 
 trouble.setup{
-    fold_open = "v",
-    fold_closed = ">",
-    signs = {
-        error = "error",
-        warning = "warn",
-        hint = "hint",
-        information = "info"
+    modes = {
+        test = {
+            mode = "diagnostics",
+            preview = {
+                type = "split",
+                relative = "win",
+                position = "right",
+                size = 0.3,
+            },
+        },
     },
-    indent_lines = false,
-    icons = false,
-    use_diagnostic_signs = false
 }
+
+key.nnoremap("<leader>t", ":Trouble test toggle<cr>")