aboutsummaryrefslogtreecommitdiffstats
path: root/lua/alpha/utils.lua
diff options
context:
space:
mode:
authorAriel D'Alessandro <dalessandro.ariel@gmail.com>2023-01-31 09:44:13 +0100
committerAriel D'Alessandro <dalessandro.ariel@gmail.com>2023-01-31 09:44:13 +0100
commit669561e21073e6efafddda25ba3ace69fb43819e (patch)
treef94ebd60ad4cab480b5cbcb7e65dd2060696c339 /lua/alpha/utils.lua
parent5044c70e9f62cdd06ee91e754423b07c1c18c12d (diff)
downloadnvim-conf-669561e21073e6efafddda25ba3ace69fb43819e.tar.gz
nvim-conf-669561e21073e6efafddda25ba3ace69fb43819e.zip
feat: apply stylua
Diffstat (limited to 'lua/alpha/utils.lua')
-rw-r--r--lua/alpha/utils.lua30
1 files changed, 15 insertions, 15 deletions
diff --git a/lua/alpha/utils.lua b/lua/alpha/utils.lua
index 47fd8c6..b1202d6 100644
--- a/lua/alpha/utils.lua
+++ b/lua/alpha/utils.lua
@@ -1,24 +1,24 @@
local M = {}
M.save_and_exec = function()
- local source_commands = {
- lua = "luafi %",
- vim = "source %",
- }
+ local source_commands = {
+ lua = "luafi %",
+ vim = "source %",
+ }
- local ft = vim.api.nvim_buf_get_option(0, "filetype")
- local command = source_commands[ft]
- if command == nil then
- vim.notify("This type cant not be sourced", vim.log.levels.ERROR, { title = "Alpha Developer" })
- return
- end
+ local ft = vim.api.nvim_buf_get_option(0, "filetype")
+ local command = source_commands[ft]
+ if command == nil then
+ vim.notify("This type cant not be sourced", vim.log.levels.ERROR, { title = "Alpha Developer" })
+ return
+ end
- -- Save and source
- vim.api.nvim_command("silent w")
- vim.api.nvim_command(command)
+ -- Save and source
+ vim.api.nvim_command "silent w"
+ vim.api.nvim_command(command)
- local current_file_name = vim.fn.fnamemodify(vim.api.nvim_buf_get_name(0), ":t")
- vim.notify(string.format("File %s Sourced", current_file_name), vim.log.levels.INFO, { title = "Alpha Developer" })
+ local current_file_name = vim.fn.fnamemodify(vim.api.nvim_buf_get_name(0), ":t")
+ vim.notify(string.format("File %s Sourced", current_file_name), vim.log.levels.INFO, { title = "Alpha Developer" })
end
return M