standardrb / standard

Ruby's bikeshed-proof linter and formatter 🚲
Other
2.73k stars 214 forks source link

Suggestion to adjust neovim Wiki #661

Closed ryabrody closed 1 week ago

ryabrody commented 1 week ago

I would suggest to also include the info on how to use standard with nvim-lspconfig: https://shopify.github.io/ruby-lsp/editors.html#nvim-lspconfig in the IDE neovim Wiki: https://github.com/standardrb/standard/wiki/IDE:-neovim.

searls commented 1 week ago

Sounds good. Feel free to provide the markdown and we'll paste it in

ryabrody commented 1 week ago

Oki, Here the markdown:

# nvim-lspconfig 

To set standard as the linter and formatter for Ruby files, you can use the init_options key when setting up Ruby LSP:

```lua
local lspconfig = require('lspconfig')
lspconfig.ruby_lsp.setup({
  init_options = {
    formatter = 'standard',
    linters = { 'standard' },
  },
})

See also: https://shopify.github.io/ruby-lsp/editors.html#nvim-lspconfig

searls commented 1 week ago

Ok. Pasted the update in hopefully helps someone