diff options
| author | Dan Callaghan <dcallaghan@me.com> | 2022-10-02 11:41:24 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-02 08:41:24 +0800 |
| commit | c4cc7419514e7a978b1c9a98d616c5d6d399631e (patch) | |
| tree | 9e017310e143b2269a16082e250134943e135928 /lua/lspconfig/server_configurations/ruby_ls.lua | |
| parent | docs: update server_configurations.md (diff) | |
| download | nvim-lspconfig-c4cc7419514e7a978b1c9a98d616c5d6d399631e.tar nvim-lspconfig-c4cc7419514e7a978b1c9a98d616c5d6d399631e.tar.gz nvim-lspconfig-c4cc7419514e7a978b1c9a98d616c5d6d399631e.tar.bz2 nvim-lspconfig-c4cc7419514e7a978b1c9a98d616c5d6d399631e.tar.lz nvim-lspconfig-c4cc7419514e7a978b1c9a98d616c5d6d399631e.tar.xz nvim-lspconfig-c4cc7419514e7a978b1c9a98d616c5d6d399631e.tar.zst nvim-lspconfig-c4cc7419514e7a978b1c9a98d616c5d6d399631e.zip | |
feat: add ruby-lsp server configuration (#2169)
Diffstat (limited to 'lua/lspconfig/server_configurations/ruby_ls.lua')
| -rw-r--r-- | lua/lspconfig/server_configurations/ruby_ls.lua | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/lua/lspconfig/server_configurations/ruby_ls.lua b/lua/lspconfig/server_configurations/ruby_ls.lua new file mode 100644 index 00000000..ba41dd5a --- /dev/null +++ b/lua/lspconfig/server_configurations/ruby_ls.lua @@ -0,0 +1,38 @@ +local util = require 'lspconfig.util' + +local bin_name = 'ruby-lsp' + +-- defaults to stdio +local cmd = { bin_name } + +if vim.fn.has 'win32' == 1 then + cmd = { 'cmd.exe', '/C', bin_name } +end + +return { + default_config = { + cmd = cmd, + filetypes = { 'ruby' }, + root_dir = util.root_pattern('Gemfile', '.git'), + }, + docs = { + description = [[ +https://shopify.github.io/ruby-lsp/ + +This gem is an implementation of the language server protocol specification for +Ruby, used to improve editor features. + +Install the gem. There's no need to require it, since the server is used as a +standalone executable. + +```sh +group :development do + gem "ruby-lsp", require: false +end +``` + ]], + default_config = { + root_dir = [[root_pattern("Gemfile", ".git")]], + }, + }, +} |
