summaryrefslogtreecommitdiff
path: root/lua/talha/functions.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/talha/functions.lua')
-rw-r--r--lua/talha/functions.lua12
1 files changed, 12 insertions, 0 deletions
diff --git a/lua/talha/functions.lua b/lua/talha/functions.lua
index 946bfd8..2a4570e 100644
--- a/lua/talha/functions.lua
+++ b/lua/talha/functions.lua
@@ -1,5 +1,11 @@
local Path = require"plenary.path"
+function FormatFile()
+ local filename = vim.api.nvim_buf_get_name(0)
+ vim.cmd(":silent !autopep8 -i " .. filename)
+ vim.cmd(":silent !isort " .. filename)
+end
+
function CreateDailyNote()
local file_path = vim.api.nvim_buf_get_name(0)
local dir_path = file_path
@@ -60,3 +66,9 @@ function ToggleSpellCheck()
vim.opt.spell = not(vim.opt.spell:get())
vim.opt.spelllang = 'en_us'
end
+
+function SetFocusColors(mode)
+ vim.o.background = "light"
+ vim.opt.cursorline = false
+ vim.cmd("colorscheme vscode")
+end