summaryrefslogtreecommitdiff
path: root/lua/lv-autocommands/init.lua
diff options
context:
space:
mode:
authorchristianchiarulli <[email protected]>2021-06-28 00:36:29 -0400
committerchristianchiarulli <[email protected]>2021-06-28 00:36:29 -0400
commitccf7e85df9765ba6cfb6f0bee40017b26d18ea10 (patch)
tree1980688b1f5c084219de9bfff03ceeb576470ded /lua/lv-autocommands/init.lua
parente563306c630014fa4f5aaeac24dae93c97226dae (diff)
config overhaul
Diffstat (limited to 'lua/lv-autocommands/init.lua')
-rw-r--r--lua/lv-autocommands/init.lua12
1 files changed, 6 insertions, 6 deletions
diff --git a/lua/lv-autocommands/init.lua b/lua/lv-autocommands/init.lua
index c5b70cc3..e6674292 100644
--- a/lua/lv-autocommands/init.lua
+++ b/lua/lv-autocommands/init.lua
@@ -3,13 +3,13 @@ local utils = require('lv-utils')
local auto_formatters = { }
local python_autoformat = {'BufWritePre', '*.py', 'lua vim.lsp.buf.formatting_sync(nil, 1000)'}
-if O.python.autoformat then table.insert(auto_formatters, python_autoformat) end
+if O.lang.python.autoformat then table.insert(auto_formatters, python_autoformat) end
local javascript_autoformat = {'BufWritePre', '*.js', 'lua vim.lsp.buf.formatting_sync(nil, 1000)'}
local javascriptreact_autoformat = {'BufWritePre', '*.jsx', 'lua vim.lsp.buf.formatting_sync(nil, 1000)'}
local typescript_autoformat = {'BufWritePre', '*.ts', 'lua vim.lsp.buf.formatting_sync(nil, 1000)'}
local typescriptreact_autoformat = {'BufWritePre', '*.tsx', 'lua vim.lsp.buf.formatting_sync(nil, 1000)'}
-if O.tsserver.autoformat then
+if O.lang.tsserver.autoformat then
table.insert(auto_formatters, javascript_autoformat)
table.insert(auto_formatters, javascriptreact_autoformat)
table.insert(auto_formatters, typescript_autoformat)
@@ -17,16 +17,16 @@ if O.tsserver.autoformat then
end
local lua_format = {'BufWritePre', '*.lua', 'lua vim.lsp.buf.formatting_sync(nil, 1000)'}
-if O.lua.autoformat then table.insert(auto_formatters, lua_format) end
+if O.lang.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
+if O.lang.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
+if O.lang.ruby.autoformat then table.insert(auto_formatters, ruby_format) end
local go_format = {'BufWritePre', '*.go', 'lua vim.lsp.buf.formatting_sync(nil,1000)'}
-if O.go.autoformat then table.insert(auto_formatters, go_format) end
+if O.lang.go.autoformat then table.insert(auto_formatters, go_format) end
utils.define_augroups({
_general_settings = {