# HG changeset patch # User Meredith Howard # Date 1678048569 18000 # Node ID 8141190cc9430f0368f21438df0d4345b8e09119 # Parent c20cb89a2ee913fcb52d7620b1d0ee62a2935f01 Simplify standardrb lsp setup diff --git a/.config/nvim/lua/config/lsp.lua b/.config/nvim/lua/config/lsp.lua --- a/.config/nvim/lua/config/lsp.lua +++ b/.config/nvim/lua/config/lsp.lua @@ -44,21 +44,15 @@ vim.api.nvim_create_autocmd("LspAttach", -- This can be removed when mason-lspconfig gets support for standardrb if vim.fn.executable("standardrb") == 1 then - local lsp_ruby = vim.api.nvim_create_augroup("lsp_ruby", {clear = true}) - vim.api.nvim_create_autocmd("FileType", { pattern = "ruby", - group = lsp_ruby, + group = vim.api.nvim_create_augroup("lsp_ruby", {clear = true}), once = true, callback = function() - require("lspconfig").standardrb.setup({}) - end, - }) - - vim.api.nvim_create_autocmd("FileType", { - pattern = "ruby", - group = lsp_ruby, - callback = function() + require("lspconfig").standardrb.setup({ + autostart = true, + single_file_support = true + }) vim.cmd.LspStart("standardrb") end, })