diff options
-rw-r--r-- | lua/lv-autocommands/init.lua | 3 | ||||
-rw-r--r-- | lv-settings.lua | 2 |
2 files changed, 5 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})'}, diff --git a/lv-settings.lua b/lv-settings.lua index 70d72b4a..9c9add59 100644 --- a/lv-settings.lua +++ b/lv-settings.lua @@ -49,4 +49,6 @@ O.tsserver.autoformat = true -- json O.json.autoformat = true +-- ruby +O.ruby.autoformat = true -- create custom autocommand field (This would be easy with lua) |