--Enable (broadcasting) snippet capability for completion local capabilities = vim.lsp.protocol.make_client_capabilities() capabilities.textDocument.completion.completionItem.snippetSupport = true require'lspconfig'local dap, dapui = require("dap"), require("dapui") dap.listeners.after.event_initialized["dapui_config"] = function() dapui.open() end dap.listeners.before.event_terminated["dapui_config"] = function() dapui.close() end dap.listeners.before.event_exited["dapui_config"] = function() dapui.close() end require("dapui").setup() dap.adapters.ruby = function(callback, config) callback { type = "server", host = "127.0.0.1", port = "${port}", executable = { command = "bundle", args = { "exec", "rdbg", "-n", "--open", "--port", "${port}", "-c", "--", "bundle", "exec", config.command, config.script, }, }, } end dap.configurations.ruby = { { type = "ruby", name = "debug current file", request = "attach", localfs = true, command = "ruby", script = "${file}", }, { type = "ruby", name = "run current spec file", request = "attach", localfs = true, command = "rspec", script = "${file}", }, }