diff options
author | talha <talha@talhaamir.xyz> | 2024-01-04 00:05:58 +0500 |
---|---|---|
committer | talha <talha@talhaamir.xyz> | 2024-01-04 00:05:58 +0500 |
commit | 19ae0b8a623fcf2d5945d34484159ca6a7138806 (patch) | |
tree | 879ca6ecbb1ca91488a6a64af03c430e127478e0 /lua/talha/functions.lua | |
parent | a2776ea78525cf4aeae8d099ff0b85dc3450374d (diff) | |
parent | d17d01afef784a5277fa99b26bf7a9ba2ffa6357 (diff) |
Merge branch 'main' of ta_git:/var/www/git/nvim
Diffstat (limited to 'lua/talha/functions.lua')
-rw-r--r-- | lua/talha/functions.lua | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lua/talha/functions.lua b/lua/talha/functions.lua index e17cada..b0e8020 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 @@ -61,6 +67,12 @@ function ToggleSpellCheck() vim.opt.spelllang = 'en_us' end +function SetFocusColors(mode) + vim.o.background = "light" + vim.opt.cursorline = false + vim.cmd("colorscheme vscode") +end + function GetHomeDir() -- for linux/mac local home = os.getenv("HOME") @@ -72,6 +84,5 @@ function GetHomeDir() elseif user_profile ~= nil then return user_profile end - return nil end |