added prints

This commit is contained in:
kdav5758
2021-07-01 17:41:57 -05:00
parent 9beebb5b4d
commit 982bd3b05a
+6 -1
View File
@@ -26,12 +26,17 @@ end
function M.do_save()
if (opts["save_only_if_exists"] == true) then
print("here 1")
if (fn.filereadable(fn.expand("%:p")) == 1) then
print("here 2")
if not (next(opts["excluded_filetypes"]) == nil) then
if not (table_has_value(opts["excluded_filetypes"], api.nvim_eval([[&filetype]]))) then
print("here 3")
if (table_has_value(opts["excluded_filetypes"], api.nvim_eval([[&filetype]])) == false) then
print("here 3")
-- might use update, but in that case it can't be checekd if a file was modified and so it will always
-- print opts["execution_message"]
if (api.nvim_eval([[&modified]]) == 1) then
print("here 4")
cmd("write")
if (get_modified() == nil) then set_modified(true) end
end