diff options
author | max397574 <[email protected]> | 2021-11-08 11:25:28 +0100 |
---|---|---|
committer | max397574 <[email protected]> | 2021-11-08 11:25:28 +0100 |
commit | ce09b672d25b74c0d5c6170d470eb1af771d2eae (patch) | |
tree | 381c743a176a36eec19b3aa109ab1a411e6165b4 /lua/startup | |
parent | 085c1cad3a385f1a016d11d5b6a5c99c22c2ab9d (diff) |
refactor(all): 🔄stylua
Diffstat (limited to 'lua/startup')
-rw-r--r-- | lua/startup/init.lua | 12 | ||||
-rw-r--r-- | lua/startup/utils.lua | 14 |
2 files changed, 17 insertions, 9 deletions
diff --git a/lua/startup/init.lua b/lua/startup/init.lua index 4ab117c..59747c2 100644 --- a/lua/startup/init.lua +++ b/lua/startup/init.lua @@ -342,7 +342,9 @@ function startup.display() math.floor(vim.o.columns / 2), }) -- end) - vim.cmd([[autocmd CursorMoved * lua require"startup.utils".reposition_cursor()]]) + vim.cmd( + [[autocmd CursorMoved * lua require"startup.utils".reposition_cursor()]] + ) end function startup.setup(update) @@ -352,8 +354,12 @@ function startup.setup(update) vim.g.startup_nvim_loaded = true settings = vim.tbl_deep_extend("force", settings, update or {}) startup.settings = settings - vim.cmd([[autocmd BufRead * lua if vim.fn.argc() == 0 then require("startup").display() end]]) - vim.cmd([[autocmd VimResized * lua if vim.bo.ft == "startup" then require"startup".redraw() end]]) + vim.cmd( + [[autocmd BufRead * lua if vim.fn.argc() == 0 then require("startup").display() end]] + ) + vim.cmd( + [[autocmd VimResized * lua if vim.bo.ft == "startup" then require"startup".redraw() end]] + ) end function startup.redraw() diff --git a/lua/startup/utils.lua b/lua/startup/utils.lua index aff7f2b..62d9cca 100644 --- a/lua/startup/utils.lua +++ b/lua/startup/utils.lua @@ -69,11 +69,13 @@ function U.key_help() }) vim.api.nvim_win_set_option(help_window, "winblend", 20) vim.api.nvim_buf_set_option(buf, "modifiable", false) - vim.cmd([[autocmd CursorMoved * ++once lua require"startup.utils".close_help()]]) + vim.cmd( + [[autocmd CursorMoved * ++once lua require"startup.utils".close_help()]] + ) end function U.close_help() - vim.api.nvim_win_close(help_window,false) + vim.api.nvim_win_close(help_window, false) -- vim.cmd([[autocmd! CursorMoved * lua require"startup.utils".close_help() ++once]]) end @@ -237,13 +239,13 @@ function U.reposition_cursor() if new_cursor_pos[1] > U.cursor_pos[1] then move_down() elseif - (new_cursor_pos[1] < U.cursor_pos[1]) or new_cursor_pos[2] - < U.cursor_pos[2] + (new_cursor_pos[1] < U.cursor_pos[1]) + or new_cursor_pos[2] < U.cursor_pos[2] then move_up() elseif - (new_cursor_pos[1] > U.cursor_pos[1]) or new_cursor_pos[2] - > U.cursor_pos[2] + (new_cursor_pos[1] > U.cursor_pos[1]) + or new_cursor_pos[2] > U.cursor_pos[2] then move_down() end |