aboutsummaryrefslogtreecommitdiffstats
path: root/lua/alpha/utils.lua
diff options
context:
space:
mode:
authorAriel D'Alessandro <dalessandro.ariel@gmail.com>2023-01-22 10:18:07 +0100
committerAriel D'Alessandro <dalessandro.ariel@gmail.com>2023-01-22 10:18:07 +0100
commit5455aacdedfb2829f000b2f120a6d5194d1227f8 (patch)
treeca73cfdf3b9106aab00c5acb3d239df61e9c43d9 /lua/alpha/utils.lua
parentbf157b642c2910abae1810c985817e42502000b5 (diff)
downloadnvim-conf-5455aacdedfb2829f000b2f120a6d5194d1227f8.tar.gz
nvim-conf-5455aacdedfb2829f000b2f120a6d5194d1227f8.zip
feat: big change on the structure of the plugins, move several things to config dir
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 b1911bc..5279832 100644
--- a/lua/alpha/utils.lua
+++ b/lua/alpha/utils.lua
@@ -1,24 +1,24 @@
local utils = {}
utils.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)
- 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)
+ 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 utils