37 scope = "line", |
37 scope = "line", |
38 severity = {max = diag_float_max_threshold}, |
38 severity = {max = diag_float_max_threshold}, |
39 }) |
39 }) |
40 end, |
40 end, |
41 }) |
41 }) |
42 |
|
43 end |
42 end |
44 }) |
43 }) |
|
44 |
|
45 -- This can be removed when mason-lspconfig gets support for standardrb |
|
46 if vim.fn.executable("standardrb") == 1 then |
|
47 local lsp_ruby = vim.api.nvim_create_augroup("lsp_ruby", {clear = true}) |
|
48 |
|
49 vim.api.nvim_create_autocmd("FileType", { |
|
50 pattern = "ruby", |
|
51 group = lsp_ruby, |
|
52 once = true, |
|
53 callback = function() |
|
54 require("lspconfig").standardrb.setup({}) |
|
55 end, |
|
56 }) |
|
57 |
|
58 vim.api.nvim_create_autocmd("FileType", { |
|
59 pattern = "ruby", |
|
60 group = lsp_ruby, |
|
61 callback = function() |
|
62 vim.cmd.LspStart("standardrb") |
|
63 end, |
|
64 }) |
|
65 end |
|
66 |