diff options
Diffstat (limited to 'lua/gabrielgio')
-rw-r--r-- | lua/gabrielgio/dap.lua | 31 | ||||
-rw-r--r-- | lua/gabrielgio/lsp.lua | 3 | ||||
-rw-r--r-- | lua/gabrielgio/settable.lua | 7 | ||||
-rw-r--r-- | lua/gabrielgio/trouble.lua | 23 |
4 files changed, 34 insertions, 30 deletions
diff --git a/lua/gabrielgio/dap.lua b/lua/gabrielgio/dap.lua index 2534c7a..238a1bc 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 c8202c2..2be8b5e 100644 --- a/lua/gabrielgio/lsp.lua +++ b/lua/gabrielgio/lsp.lua @@ -35,7 +35,8 @@ load_all({ 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 bf76064..5096d3f 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 67c4938..f48fec4 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>") |