From a291b0597a7c9f76cfdb0dc4be9833ed6c8778e8 Mon Sep 17 00:00:00 2001 From: Brandon Conway Date: Sun, 4 Jul 2021 07:34:53 -0700 Subject: Solargraph uses stdio instead of --stdio (#642) You can see this in the [default config](https://github.com/neovim/nvim-lspconfig/blob/master/lua/lspconfig/solargraph.lua). --- ftplugin/ruby.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ftplugin/ruby.lua') diff --git a/ftplugin/ruby.lua b/ftplugin/ruby.lua index f46a71f8..4f2c20f8 100644 --- a/ftplugin/ruby.lua +++ b/ftplugin/ruby.lua @@ -1,6 +1,6 @@ -- If you are using rvm, make sure to change below configuration require'lspconfig'.solargraph.setup { - cmd = {DATA_PATH .. "/lspinstall/ruby/solargraph/solargraph", "--stdio"}, + cmd = {DATA_PATH .. "/lspinstall/ruby/solargraph/solargraph", "stdio"}, on_attach = require'lsp'.common_on_attach, handlers = { ["textDocument/publishDiagnostics"] = vim.lsp.with( -- cgit v1.2.3 From 9f511bcb594b7e2461c97cb8182603928c773c2f Mon Sep 17 00:00:00 2001 From: Rafael Date: Sun, 4 Jul 2021 22:14:01 -0300 Subject: start formatting rules --- ftplugin/ruby.lua | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) (limited to 'ftplugin/ruby.lua') diff --git a/ftplugin/ruby.lua b/ftplugin/ruby.lua index 4f2c20f8..0cff96ff 100644 --- a/ftplugin/ruby.lua +++ b/ftplugin/ruby.lua @@ -1,24 +1,22 @@ -- If you are using rvm, make sure to change below configuration -require'lspconfig'.solargraph.setup { - cmd = {DATA_PATH .. "/lspinstall/ruby/solargraph/solargraph", "stdio"}, - on_attach = require'lsp'.common_on_attach, - handlers = { - ["textDocument/publishDiagnostics"] = vim.lsp.with( - vim.lsp.diagnostic.on_publish_diagnostics, { - virtual_text = O.lang.ruby.diagnostics.virtual_text, - signs = O.lang.ruby.diagnostics.signs, - underline = O.lang.ruby.diagnostics.underline, - update_in_insert = true - - }) - }, - filetypes = O.lang.ruby.filetypes +require("lspconfig").solargraph.setup { + cmd = { DATA_PATH .. "/lspinstall/ruby/solargraph/solargraph", "stdio" }, + on_attach = require("lsp").common_on_attach, + handlers = { + ["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, { + virtual_text = O.lang.ruby.diagnostics.virtual_text, + signs = O.lang.ruby.diagnostics.signs, + underline = O.lang.ruby.diagnostics.underline, + update_in_insert = true, + }), + }, + filetypes = O.lang.ruby.filetypes, } if O.lang.ruby.autoformat then - require('lv-utils').define_augroups({ - _ruby_format = { - {'BufWritePre', '*.rb', 'lua vim.lsp.buf.formatting_sync(nil,1000)'} - } - }) + require("lv-utils").define_augroups { + _ruby_format = { + { "BufWritePre", "*.rb", "lua vim.lsp.buf.formatting_sync(nil,1000)" }, + }, + } end -- cgit v1.2.3 From 71c5cb4f0be89d3a175e99b0c2ebc5e55178e8a9 Mon Sep 17 00:00:00 2001 From: Rafael Date: Mon, 5 Jul 2021 20:01:19 +0000 Subject: (feat) use neoformat as the defalt format option (#715) --- ftplugin/ruby.lua | 8 -------- 1 file changed, 8 deletions(-) (limited to 'ftplugin/ruby.lua') diff --git a/ftplugin/ruby.lua b/ftplugin/ruby.lua index 0cff96ff..bc844cd3 100644 --- a/ftplugin/ruby.lua +++ b/ftplugin/ruby.lua @@ -12,11 +12,3 @@ require("lspconfig").solargraph.setup { }, filetypes = O.lang.ruby.filetypes, } - -if O.lang.ruby.autoformat then - require("lv-utils").define_augroups { - _ruby_format = { - { "BufWritePre", "*.rb", "lua vim.lsp.buf.formatting_sync(nil,1000)" }, - }, - } -end -- cgit v1.2.3