mirror of
https://github.com/LunarVim/LunarVim.git
synced 2025-07-24 04:34:42 +02:00
reformat most langs
This commit is contained in:
parent
81adc270dd
commit
2a7b3d4892
54 changed files with 1660 additions and 843 deletions
56
lua/lang/ruby.lua
Normal file
56
lua/lang/ruby.lua
Normal file
|
@ -0,0 +1,56 @@
|
|||
local M = {}
|
||||
|
||||
M.config = function()
|
||||
-- TODO: implement config for language
|
||||
return "No config available!"
|
||||
end
|
||||
|
||||
M.format = function()
|
||||
O.formatters.filetype["ruby"] = {
|
||||
function()
|
||||
return {
|
||||
exe = O.lang.ruby.formatter.exe,
|
||||
args = O.lang.ruby.formatter.args,
|
||||
stdin = not (O.lang.ruby.formatter.stdin ~= nil),
|
||||
}
|
||||
end,
|
||||
}
|
||||
|
||||
require("formatter.config").set_defaults {
|
||||
logging = false,
|
||||
filetype = O.formatters.filetype,
|
||||
}
|
||||
end
|
||||
|
||||
M.lint = function()
|
||||
-- TODO: implement linters (if applicable)
|
||||
return "No linters configured!"
|
||||
end
|
||||
|
||||
M.lsp = function()
|
||||
if require("lv-utils").check_lsp_client_active "solargraph" then
|
||||
return
|
||||
end
|
||||
|
||||
-- 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,
|
||||
}
|
||||
end
|
||||
|
||||
M.dap = function()
|
||||
-- TODO: implement dap
|
||||
return "No DAP configured!"
|
||||
end
|
||||
|
||||
return M
|
Loading…
Add table
Add a link
Reference in a new issue