From 42a34a62f8704d91bac8010e9172214729f47110 Mon Sep 17 00:00:00 2001 From: MysticalDevil Date: Sat, 14 Oct 2023 15:26:14 +0800 Subject: [PATCH] Use solargraph as ruby default lsp --- lua/lsp/check.lua | 2 +- lua/lsp/config/ruby_ls.lua | 14 -------------- lua/lsp/setup.lua | 3 +-- 3 files changed, 2 insertions(+), 17 deletions(-) delete mode 100644 lua/lsp/config/ruby_ls.lua diff --git a/lua/lsp/check.lua b/lua/lsp/check.lua index d7c41a8..e209cc2 100644 --- a/lua/lsp/check.lua +++ b/lua/lsp/check.lua @@ -33,7 +33,7 @@ local required_go = { "gopls" } local required_pip = { "cmake" } -local required_gem = { "ruby_ls" } +local required_gem = { "solargraph" } local insert_to = function(status, insert_list) if status then diff --git a/lua/lsp/config/ruby_ls.lua b/lua/lsp/config/ruby_ls.lua deleted file mode 100644 index f8540bd..0000000 --- a/lua/lsp/config/ruby_ls.lua +++ /dev/null @@ -1,14 +0,0 @@ -local util = require("lsp.util") -local opts = util.default_configs() - -opts.filetypes = { "ruby" } -opts.settings = {} -opts.init_options = { - formatter = "auto", -} -opts.root_dir = function(fname) - return require("lspconfig.util").root_pattern("Gemfile")(fname) or require("lspconfig.util").find_git_ancestor(fname) -end -opts.single_file_support = true - -return util.set_on_setup(opts) diff --git a/lua/lsp/setup.lua b/lua/lsp/setup.lua index 44c8233..71c9455 100644 --- a/lua/lsp/setup.lua +++ b/lua/lsp/setup.lua @@ -71,8 +71,7 @@ local servers = { pylyzer = require("lsp.config.pylyzer"), racket_langserver = require("lsp.config.racket_langserver"), rust_analyzer = require("lsp.config.rust_analyzer"), - ruby_ls = require("lsp.config.ruby_ls"), - -- solargraph = require("lsp.config.solargraph"), + solargraph = require("lsp.config.solargraph"), taplo = require("lsp.config.taplo"), tsserver = require("lsp.config.tsserver"), v_analyzer = require("lsp.config.v_analyzer"),