You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Justin Searls edited this page Nov 14, 2024
·
2 revisions
In addition to standard vim support, Neovim's built-in support of language server protocol enables native use of Standard's --lsp server mode.
A configuration like the following could be used to set it up (borrows from @will's comment here):
vim.opt.signcolumn="yes" -- otherwise it bounces in and out, not strictly needed thoughvim.api.nvim_create_autocmd("FileType", {
pattern="ruby",
group=vim.api.nvim_create_augroup("RubyLSP", { clear=true }), -- also this is not /needed/ but it's good practice callback=function()
vim.lsp.start {
name="standard",
cmd= { "~/.rbenv/shims/standardrb", "--lsp" },
}
end,
})
This will provide inline feedback like the following:
nvim-lspconfig with Ruby LSP
To set standard as the linter and formatter for Ruby files, you can use the init_options key when setting up Ruby LSP: