diff options
author | Gabriel A. Giovanini <g.giovanini@gridx.de> | 2024-08-16 09:37:25 +0200 |
---|---|---|
committer | Gabriel A. Giovanini <g.giovanini@gridx.de> | 2024-08-16 09:37:25 +0200 |
commit | dfe730b889915e33af1d3da810b13aa9d1d4253c (patch) | |
tree | 9dd8b2167c57271525b360125d5123a81813413a /lua | |
parent | 1ad342d73e7e8df5235c699a18c87fc4c9fc4b03 (diff) | |
download | gabrielgio.lua-dfe730b889915e33af1d3da810b13aa9d1d4253c.tar.gz gabrielgio.lua-dfe730b889915e33af1d3da810b13aa9d1d4253c.tar.bz2 gabrielgio.lua-dfe730b889915e33af1d3da810b13aa9d1d4253c.zip |
feat: Sync
Diffstat (limited to 'lua')
-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>") |