.config/nvim/lua/config/lsp.lua

changeset 1083
cc48b040ddbb
parent 1069
0e871a1b59e3
child 1099
28f3c3900576
equal deleted inserted replaced
1082:098f661195c1 1083:cc48b040ddbb
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

mercurial