50 if autoformat_filetypes[vim.bo.filetype] then |
50 if autoformat_filetypes[vim.bo.filetype] then |
51 vim.lsp.buf.format({ timeout_ms = 100 }) |
51 vim.lsp.buf.format({ timeout_ms = 100 }) |
52 end |
52 end |
53 end, |
53 end, |
54 }) |
54 }) |
55 |
|
56 -- This can be removed when mason-lspconfig gets support for standardrb |
|
57 if vim.fn.executable("standardrb") == 1 then |
|
58 vim.api.nvim_create_autocmd("FileType", { |
|
59 pattern = "ruby", |
|
60 group = vim.api.nvim_create_augroup("lsp_ruby", { clear = true }), |
|
61 once = true, |
|
62 callback = function() |
|
63 require("lspconfig").standardrb.setup({ |
|
64 autostart = true, |
|
65 single_file_support = true, |
|
66 }) |
|
67 vim.cmd.LspStart("standardrb") |
|
68 end, |
|
69 }) |
|
70 end |
|