summaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
authorrebuilt <[email protected]>2021-04-27 06:59:23 +0200
committerGitHub <[email protected]>2021-04-27 00:59:23 -0400
commit1eb8339a477f194813729c3711a11cd5e23cfccd (patch)
treed54b9999badc5eb8ff0aa3910819901a5818d0b7 /lua
parent9bd32d7f95f4a1b36cc4ab584b1acf46206df2b4 (diff)
Add autoformatting for ruby (#305)
Diffstat (limited to 'lua')
-rw-r--r--lua/lv-autocommands/init.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/lua/lv-autocommands/init.lua b/lua/lv-autocommands/init.lua
index 5b562784..3b841b2f 100644
--- a/lua/lv-autocommands/init.lua
+++ b/lua/lv-autocommands/init.lua
@@ -18,6 +18,9 @@ if O.lua.autoformat then table.insert(auto_formatters, lua_format) end
local json_format = {'BufWritePre', '*.json', 'lua vim.lsp.buf.formatting_sync(nil, 1000)'}
if O.json.autoformat then table.insert(auto_formatters, json_format) end
+local ruby_format = {'BufWritePre', '*.rb', 'lua vim.lsp.buf.formatting_sync(nil,1000)'}
+if O.ruby.autoformat then table.insert(auto_formatters, ruby_format) end
+
utils.define_augroups({
_general_settings = {
{'TextYankPost', '*', 'lua require(\'vim.highlight\').on_yank({higroup = \'Search\', timeout = 200})'},