summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lua/talha/functions.lua14
-rw-r--r--lua/talha/init.lua2
-rw-r--r--lua/talha/set.lua2
-rw-r--r--plugin/packer_compiled.lua63
4 files changed, 45 insertions, 36 deletions
diff --git a/lua/talha/functions.lua b/lua/talha/functions.lua
index 2a4570e..b0e8020 100644
--- a/lua/talha/functions.lua
+++ b/lua/talha/functions.lua
@@ -72,3 +72,17 @@ function SetFocusColors(mode)
vim.opt.cursorline = false
vim.cmd("colorscheme vscode")
end
+
+function GetHomeDir()
+ -- for linux/mac
+ local home = os.getenv("HOME")
+ -- for windows
+ local user_profile = os.getenv("UserProfile")
+
+ if home ~= nil then
+ return home
+ elseif user_profile ~= nil then
+ return user_profile
+ end
+ return nil
+end
diff --git a/lua/talha/init.lua b/lua/talha/init.lua
index 5dabc12..29b4120 100644
--- a/lua/talha/init.lua
+++ b/lua/talha/init.lua
@@ -1,5 +1,5 @@
require("talha.remap")
-require("talha.set")
require("talha.functions")
+require("talha.set")
require("talha.autocmds")
diff --git a/lua/talha/set.lua b/lua/talha/set.lua
index 814a837..d4b995e 100644
--- a/lua/talha/set.lua
+++ b/lua/talha/set.lua
@@ -13,7 +13,7 @@ op.wrap = false
op.swapfile = false
op.backup = false
-op.undodir = os.getenv("HOME") .. "/.vim/undodir"
+op.undodir = GetHomeDir() .. "/.vim/undodir"
op.undofile = true
op.hlsearch = false
diff --git a/plugin/packer_compiled.lua b/plugin/packer_compiled.lua
index 9507539..75b165b 100644
--- a/plugin/packer_compiled.lua
+++ b/plugin/packer_compiled.lua
@@ -49,8 +49,8 @@ local function save_profiles(threshold)
end
time([[Luarocks path setup]], true)
-local package_path_str = "/home/talha/.cache/nvim/packer_hererocks/2.1.1692716794/share/lua/5.1/?.lua;/home/talha/.cache/nvim/packer_hererocks/2.1.1692716794/share/lua/5.1/?/init.lua;/home/talha/.cache/nvim/packer_hererocks/2.1.1692716794/lib/luarocks/rocks-5.1/?.lua;/home/talha/.cache/nvim/packer_hererocks/2.1.1692716794/lib/luarocks/rocks-5.1/?/init.lua"
-local install_cpath_pattern = "/home/talha/.cache/nvim/packer_hererocks/2.1.1692716794/lib/lua/5.1/?.so"
+local package_path_str = "C:\\Users\\sarcX\\AppData\\Local\\Temp\\nvim\\packer_hererocks\\2.1.1696883897\\share\\lua\\5.1\\?.lua;C:\\Users\\sarcX\\AppData\\Local\\Temp\\nvim\\packer_hererocks\\2.1.1696883897\\share\\lua\\5.1\\?\\init.lua;C:\\Users\\sarcX\\AppData\\Local\\Temp\\nvim\\packer_hererocks\\2.1.1696883897\\lib\\luarocks\\rocks-5.1\\?.lua;C:\\Users\\sarcX\\AppData\\Local\\Temp\\nvim\\packer_hererocks\\2.1.1696883897\\lib\\luarocks\\rocks-5.1\\?\\init.lua"
+local install_cpath_pattern = "C:\\Users\\sarcX\\AppData\\Local\\Temp\\nvim\\packer_hererocks\\2.1.1696883897\\lib\\lua\\5.1\\?.so"
if not string.find(package.path, package_path_str, 1, true) then
package.path = package.path .. ';' .. package_path_str
end
@@ -76,93 +76,88 @@ time([[Defining packer_plugins]], true)
_G.packer_plugins = {
LuaSnip = {
loaded = true,
- path = "/home/talha/.local/share/nvim/site/pack/packer/start/LuaSnip",
+ path = "C:\\Users\\sarcX\\AppData\\Local\\nvim-data\\site\\pack\\packer\\start\\LuaSnip",
url = "https://github.com/L3MON4D3/LuaSnip"
},
- ["candle-grey"] = {
- loaded = true,
- path = "/home/talha/.local/share/nvim/site/pack/packer/start/candle-grey",
- url = "https://github.com/aditya-azad/candle-grey"
- },
["cmp-nvim-lsp"] = {
loaded = true,
- path = "/home/talha/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp",
+ path = "C:\\Users\\sarcX\\AppData\\Local\\nvim-data\\site\\pack\\packer\\start\\cmp-nvim-lsp",
url = "https://github.com/hrsh7th/cmp-nvim-lsp"
},
+ ["gruvbox.nvim"] = {
+ loaded = true,
+ path = "C:\\Users\\sarcX\\AppData\\Local\\nvim-data\\site\\pack\\packer\\start\\gruvbox.nvim",
+ url = "https://github.com/ellisonleao/gruvbox.nvim"
+ },
harpoon = {
loaded = true,
- path = "/home/talha/.local/share/nvim/site/pack/packer/start/harpoon",
+ path = "C:\\Users\\sarcX\\AppData\\Local\\nvim-data\\site\\pack\\packer\\start\\harpoon",
url = "https://github.com/theprimeagen/harpoon"
},
["lsp-zero.nvim"] = {
loaded = true,
- path = "/home/talha/.local/share/nvim/site/pack/packer/start/lsp-zero.nvim",
+ path = "C:\\Users\\sarcX\\AppData\\Local\\nvim-data\\site\\pack\\packer\\start\\lsp-zero.nvim",
url = "https://github.com/VonHeikemen/lsp-zero.nvim"
},
["mason-lspconfig.nvim"] = {
loaded = true,
- path = "/home/talha/.local/share/nvim/site/pack/packer/start/mason-lspconfig.nvim",
+ path = "C:\\Users\\sarcX\\AppData\\Local\\nvim-data\\site\\pack\\packer\\start\\mason-lspconfig.nvim",
url = "https://github.com/williamboman/mason-lspconfig.nvim"
},
["mason.nvim"] = {
loaded = true,
- path = "/home/talha/.local/share/nvim/site/pack/packer/start/mason.nvim",
+ path = "C:\\Users\\sarcX\\AppData\\Local\\nvim-data\\site\\pack\\packer\\start\\mason.nvim",
url = "https://github.com/williamboman/mason.nvim"
},
+ ["midnight.nvim"] = {
+ loaded = true,
+ path = "C:\\Users\\sarcX\\AppData\\Local\\nvim-data\\site\\pack\\packer\\start\\midnight.nvim",
+ url = "https://github.com/dasupradyumna/midnight.nvim"
+ },
["nvim-cmp"] = {
loaded = true,
- path = "/home/talha/.local/share/nvim/site/pack/packer/start/nvim-cmp",
+ path = "C:\\Users\\sarcX\\AppData\\Local\\nvim-data\\site\\pack\\packer\\start\\nvim-cmp",
url = "https://github.com/hrsh7th/nvim-cmp"
},
["nvim-lspconfig"] = {
loaded = true,
- path = "/home/talha/.local/share/nvim/site/pack/packer/start/nvim-lspconfig",
+ path = "C:\\Users\\sarcX\\AppData\\Local\\nvim-data\\site\\pack\\packer\\start\\nvim-lspconfig",
url = "https://github.com/neovim/nvim-lspconfig"
},
["nvim-treesitter"] = {
loaded = true,
- path = "/home/talha/.local/share/nvim/site/pack/packer/start/nvim-treesitter",
+ path = "C:\\Users\\sarcX\\AppData\\Local\\nvim-data\\site\\pack\\packer\\start\\nvim-treesitter",
url = "https://github.com/nvim-treesitter/nvim-treesitter"
},
["packer.nvim"] = {
loaded = true,
- path = "/home/talha/.local/share/nvim/site/pack/packer/start/packer.nvim",
+ path = "C:\\Users\\sarcX\\AppData\\Local\\nvim-data\\site\\pack\\packer\\start\\packer.nvim",
url = "https://github.com/wbthomason/packer.nvim"
},
["plenary.nvim"] = {
loaded = true,
- path = "/home/talha/.local/share/nvim/site/pack/packer/start/plenary.nvim",
+ path = "C:\\Users\\sarcX\\AppData\\Local\\nvim-data\\site\\pack\\packer\\start\\plenary.nvim",
url = "https://github.com/nvim-lua/plenary.nvim"
},
["telescope.nvim"] = {
loaded = true,
- path = "/home/talha/.local/share/nvim/site/pack/packer/start/telescope.nvim",
+ path = "C:\\Users\\sarcX\\AppData\\Local\\nvim-data\\site\\pack\\packer\\start\\telescope.nvim",
url = "https://github.com/nvim-telescope/telescope.nvim"
},
undotree = {
loaded = true,
- path = "/home/talha/.local/share/nvim/site/pack/packer/start/undotree",
+ path = "C:\\Users\\sarcX\\AppData\\Local\\nvim-data\\site\\pack\\packer\\start\\undotree",
url = "https://github.com/mbbill/undotree"
},
- ["vim-darkness"] = {
- loaded = true,
- path = "/home/talha/.local/share/nvim/site/pack/packer/start/vim-darkness",
- url = "https://github.com/Jorengarenar/vim-darkness"
- },
["vim-fugitive"] = {
loaded = true,
- path = "/home/talha/.local/share/nvim/site/pack/packer/start/vim-fugitive",
+ path = "C:\\Users\\sarcX\\AppData\\Local\\nvim-data\\site\\pack\\packer\\start\\vim-fugitive",
url = "https://github.com/tpope/vim-fugitive"
},
- ["vim-gutentags"] = {
- loaded = true,
- path = "/home/talha/.local/share/nvim/site/pack/packer/start/vim-gutentags",
- url = "https://github.com/ludovicchabant/vim-gutentags"
- },
- ["vscode.nvim"] = {
+ ["vim-nightfly-colors"] = {
loaded = true,
- path = "/home/talha/.local/share/nvim/site/pack/packer/start/vscode.nvim",
- url = "https://github.com/Mofiqul/vscode.nvim"
+ path = "C:\\Users\\sarcX\\AppData\\Local\\nvim-data\\site\\pack\\packer\\start\\vim-nightfly-colors",
+ url = "https://github.com/bluz71/vim-nightfly-colors"
}
}