--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 = "3030", executable = { command = "bundle", args = { "exec", "rdbg", "-n", "--open", "--nonstop", "--port", "3030", "-c", "--", "bundle", "exec", config.command, config.script, }, }, } end dap.configurations.ruby = { { type = "ruby", name = "Start Rails server", request = "attach", localfs = true, command = "rails s", }, { 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}", }, }