summaryrefslogtreecommitdiff
path: root/lua/talha/functions.lua
diff options
context:
space:
mode:
authortalha <talha@talhaamir.xyz>2024-01-03 19:34:10 +0500
committertalha <talha@talhaamir.xyz>2024-01-03 19:34:10 +0500
commitd17d01afef784a5277fa99b26bf7a9ba2ffa6357 (patch)
tree3b6703ee148d5830a6d279ff5a4eacdf1ec92729 /lua/talha/functions.lua
parentdb929434fa2f29e5674a5f24d71901b4fa458363 (diff)
Updated colorscheme, added ctags
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