I am trying to configure coc.nvim for my vim 8.2. I mapped my formatting to leader-d with:
nnoremap <Leader>d :call CocAction('format') <CR>
which works fine for ruby filetype. However, when I load _spec.rb
files, with ruby.rspec
filetype, my diagnostics are not being shown and my format mapping returns:
Error on request (format): Format provider not found for buffer: ...
My coc-config.json
:
{
"codeLens.enable": true,
"solargraph.useBundler": false,
"solargraph.commandPath": "/Users/dontmatter/.rbenv/shims/solargraph",
"solargraph.formatting": true,
"solargraph.diagnostics": true,
"solargraph.checkGemVersion": true
}
and I am using standardrb
config for rubocop:
- standard
- rubocop-rspec
inherit_gem:
# First check this: https://github.com/testdouble/standard#how-do-i-run-standard-in-my-editor
# If your editor invokes 'rubocop' directly and knows nothing about 'standard' gem,
# it can be useful to inherit 'standard' set of rules
standard: config/base.yml
# You can also override standardrb rules
Style/StringLiterals:
EnforcedStyle: double_quotes
# Or enable additional Cops
RSpec:
Enabled: true
Is there a way to enable solargraph to run on ruby.rspec filetype?