mirror of
https://github.com/LunarVim/LunarVim.git
synced 2025-07-15 03:44:43 +02:00
lsp in ftplugin austonautomoy
This commit is contained in:
parent
9bb4f8a085
commit
20ed47e21e
45 changed files with 404 additions and 142 deletions
24
ftplugin/ruby.lua
Normal file
24
ftplugin/ruby.lua
Normal file
|
@ -0,0 +1,24 @@
|
|||
-- If you are using rvm, make sure to change below configuration
|
||||
require'lspconfig'.solargraph.setup {
|
||||
cmd = {DATA_PATH .. "/lspinstall/ruby/solargraph/solargraph", "--stdio"},
|
||||
on_attach = require'lsp'.common_on_attach,
|
||||
handlers = {
|
||||
["textDocument/publishDiagnostics"] = vim.lsp.with(
|
||||
vim.lsp.diagnostic.on_publish_diagnostics, {
|
||||
virtual_text = O.lang.ruby.diagnostics.virtual_text,
|
||||
signs = O.lang.ruby.diagnostics.signs,
|
||||
underline = O.lang.ruby.diagnostics.underline,
|
||||
update_in_insert = true
|
||||
|
||||
})
|
||||
},
|
||||
filetypes = O.lang.ruby.filetypes
|
||||
}
|
||||
|
||||
if O.lang.ruby.autoformat then
|
||||
require('lv-utils').define_augroups({
|
||||
_ruby_format = {
|
||||
{'BufWritePre', '*.rb', 'lua vim.lsp.buf.formatting_sync(nil,1000)'}
|
||||
}
|
||||
})
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue