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 though vim.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 LSPTo set standard as the linter and formatter for Ruby files, you can use the init_options key when setting up Ruby LSP:
local lspconfig = require('lspconfig') lspconfig.ruby_lsp.setup({ init_options = { formatter = 'standard', linters = { 'standard' }, }, })
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4