aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
authorAdam Daniels <adam@mediadrive.ca>2023-02-24 08:08:01 -0500
committerGitHub <noreply@github.com>2023-02-24 21:08:01 +0800
commit9f64b885d1ad04ae0c5cf8ad8afe9c86033af8cd (patch)
tree792a34e89c972bd2e6dd24dbb73b99640402551f /lua
parentdocs: update server_configurations.md (diff)
downloadnvim-lspconfig-9f64b885d1ad04ae0c5cf8ad8afe9c86033af8cd.tar
nvim-lspconfig-9f64b885d1ad04ae0c5cf8ad8afe9c86033af8cd.tar.gz
nvim-lspconfig-9f64b885d1ad04ae0c5cf8ad8afe9c86033af8cd.tar.bz2
nvim-lspconfig-9f64b885d1ad04ae0c5cf8ad8afe9c86033af8cd.tar.lz
nvim-lspconfig-9f64b885d1ad04ae0c5cf8ad8afe9c86033af8cd.tar.xz
nvim-lspconfig-9f64b885d1ad04ae0c5cf8ad8afe9c86033af8cd.tar.zst
nvim-lspconfig-9f64b885d1ad04ae0c5cf8ad8afe9c86033af8cd.zip
feat: add standardrb support (#2479)
Diffstat (limited to 'lua')
-rw-r--r--lua/lspconfig/server_configurations/standardrb.lua26
1 files changed, 26 insertions, 0 deletions
diff --git a/lua/lspconfig/server_configurations/standardrb.lua b/lua/lspconfig/server_configurations/standardrb.lua
new file mode 100644
index 00000000..e5261e45
--- /dev/null
+++ b/lua/lspconfig/server_configurations/standardrb.lua
@@ -0,0 +1,26 @@
+local util = require 'lspconfig.util'
+
+local bin_name = 'standardrb'
+local cmd = { bin_name, '--lsp' }
+
+if vim.fn.has 'win32' == 1 then
+ cmd = { 'cmd.exe', '/C', bin_name, '--lsp' }
+end
+
+return {
+ default_config = {
+ cmd = cmd,
+ filetypes = { 'ruby' },
+ root_dir = util.root_pattern('Gemfile', '.git'),
+ },
+ docs = {
+ description = [[
+https://github.com/testdouble/standard
+
+Ruby Style Guide, with linter & automatic code fixer.
+ ]],
+ default_config = {
+ root_dir = [[root_pattern("Gemfile", ".git")]],
+ },
+ },
+}