From 739784e43cdec5a69585b9845fccd27981819ade Mon Sep 17 00:00:00 2001 From: abzcoding Date: Sun, 25 Jul 2021 16:27:48 +0430 Subject: [PATCH] fix formatting according to stylua --- init.lua | 2 +- lua/core/autocmds.lua | 12 +++--------- lua/default-config.lua | 4 +--- lua/lv-utils/init.lua | 1 - utils/installer/lv-config.example.lua | 1 - 5 files changed, 5 insertions(+), 15 deletions(-) diff --git a/init.lua b/init.lua index 909f0d42..1886e405 100644 --- a/init.lua +++ b/init.lua @@ -18,7 +18,7 @@ if not status_ok then print "something is wrong with your lv-config" print(error) end -require('core.autocmds').define_augroups(lvim.autocommands) +require("core.autocmds").define_augroups(lvim.autocommands) require "keymappings" diff --git a/lua/core/autocmds.lua b/lua/core/autocmds.lua index 26a5cde8..f4cb4369 100644 --- a/lua/core/autocmds.lua +++ b/lua/core/autocmds.lua @@ -1,6 +1,5 @@ local autocommands = {} - lvim.autocommands = { _general_settings = { { @@ -28,14 +27,11 @@ lvim.autocommands = { "*", "setlocal formatoptions-=c formatoptions-=r formatoptions-=o", }, - { "BufWritePost", - "lv-config.lua", - "lua require('lv-utils').reload_lv_config()" - }, + { "BufWritePost", "lv-config.lua", "lua require('lv-utils').reload_lv_config()" }, { "FileType", "qf", - "set nobuflisted" + "set nobuflisted", }, -- { "VimLeavePre", "*", "set title set titleold=" }, }, @@ -70,7 +66,7 @@ lvim.autocommands = { -- will cause split windows to be resized evenly if main window is resized { "BufWritePost", "plugins.lua", "PackerCompile" }, }, - + -- _fterm_lazygit = { -- -- will cause esc key to exit lazy git -- {"TermEnter", "*", "call LazyGitNativation()"} @@ -107,6 +103,4 @@ function autocommands.define_augroups(definitions) -- {{{1 end end - - return autocommands diff --git a/lua/default-config.lua b/lua/default-config.lua index 89ab7f55..67892bd2 100644 --- a/lua/default-config.lua +++ b/lua/default-config.lua @@ -53,9 +53,7 @@ lvim = { -- use lv-config.lua for this not put here }, - autocommands = { - - }, + autocommands = {}, } local schemas = nil diff --git a/lua/lv-utils/init.lua b/lua/lv-utils/init.lua index cfc1dac4..313f39d3 100644 --- a/lua/lv-utils/init.lua +++ b/lua/lv-utils/init.lua @@ -130,7 +130,6 @@ function lv_utils.add_keymap_term_mode(opts, keymaps) lv_utils.add_keymap("t", opts, keymaps) end - function lv_utils.unrequire(m) package.loaded[m] = nil _G[m] = nil diff --git a/utils/installer/lv-config.example.lua b/utils/installer/lv-config.example.lua index e186af25..f826dd7e 100644 --- a/utils/installer/lv-config.example.lua +++ b/utils/installer/lv-config.example.lua @@ -67,7 +67,6 @@ lvim.builtin.treesitter.highlight.enabled = true -- } -- } - -- Autocommands (https://neovim.io/doc/user/autocmd.html) -- lvim.autocommands.custom_groups = { -- { "BufWinEnter", "*.lua", "setlocal ts=8 sw=8" },