My neovim config stopped working, but I have tried other configs and templates and it did not work as well

My neovim returns the following error message everytime I try to open it:

Error detected while processing /home/garamog/dotfiles/nvim/.config/nvim/init.lua:                                                      
E5113: Error while calling lua chunk: /home/garamog/.config/nvim/lua/garamog/remaps.lua:46: module 'telescope.builtin' not found:       
        no field package.preload['telescope.builtin']                                                                                   
        no file './telescope/builtin.lua'                                                                                               
        no file '/usr/share/luajit-2.1/telescope/builtin.lua'                                                                           
        no file '/usr/local/share/lua/5.1/telescope/builtin.lua'                                                                        
        no file '/usr/local/share/lua/5.1/telescope/builtin/init.lua'                                                                   
        no file '/usr/share/lua/5.1/telescope/builtin.lua'                                                                              
        no file '/usr/share/lua/5.1/telescope/builtin/init.lua'                                                                         
        no file './telescope/builtin.so'                                                                                                
        no file '/usr/local/lib/lua/5.1/telescope/builtin.so'                                                                           
        no file '/usr/lib64/lua/5.1/telescope/builtin.so'                                                                               
        no file '/usr/local/lib/lua/5.1/loadall.so'                                                                                     
        no file './telescope.so'                                                                                                        
        no file '/usr/local/lib/lua/5.1/telescope.so'                                                                                   
        no file '/usr/lib64/lua/5.1/telescope.so'                                                                                       
        no file '/usr/local/lib/lua/5.1/loadall.so'                                                                                     
stack traceback:                                                                                                                        
        [C]: in function 'require'                                                                                                      
        /home/garamog/.config/nvim/lua/garamog/remaps.lua:46: in main chunk                                                             
        [C]: in function 'require'                                                                                                      
        /home/garamog/.config/nvim/lua/garamog/init.lua:1: in main chunk                                                                
        [C]: in function 'require'                                                                                                      
        /home/garamog/dotfiles/nvim/.config/nvim/init.lua:1: in main chunk                                                              
Press ENTER or type command to continue

The file ~/.config/nvim/lua/garamog/remaps.lua is as follows:

vim.g.mapleader = " "
local map = vim.keymap.set
-------------- Editor -----------------
map("n", "<leader>so", ":w<CR>:so<CR>", { desc = "Save and source file." })

--map("n", "<leader>po", ":Ex<CR>")

--Splitig buffers
map("n", "<leader>hs", ":split<CR>", { desc = "" })
map("n", "<leader>vs", ":vsplit<CR>")

map("n", "<leader>ss", ":w<CR>")
map("n", "<leader>hl", ":nohlsearch<CR>")

-- esc clears highlights
map("n", "<Esc>", "<cmd>noh<CR>", { desc = "General Clear highlights" })

-- Ctrl+C to copy whole file.
map("n", "<C-s>", "<cmd>w<CR>", { desc = "General Save file" })
map("n", "<C-c>", "<cmd>%y+<CR>", { desc = "General Copy whole file" })



------- Moves Items in visual mode  ---------
map("v", "J", ":m '>+1<CR>gv=gv")
map("v", "K", ":m '<-2<CR>gv=gv")

------- Joining lines makes the cursor stay where it was ---------
map("n", "J", "mzJ`z")

------- Moves maintaining the cursor in the middle of the screen ---------
map('n', '<C-d>', '<C-d>zz')
map('n', '<C-u>', '<C-u>zz')
map('n', 'n', 'nzzzv')
map('n', 'N', 'Nzzzv')
map('x', '<leader>p', ""_dp")

------- Clipboard ---------
map('n', '<leader>y', ""+y", {desc = "Saves to clipboard"})
map('v', '<leader>y', ""+y", {desc = "Saves to clipboard (visual mode)"})
map('n', '<leader>Y', ""+Y", {desc = "Saves current line to clipboard"})
map('n', '<leader>p', ""+p", {desc = "Pastes from clipboard"})
map('n', '<leader>P', ""+P", {desc = "Pastes back from clipboard"})

------- Telescope Remaps ---------
local builtin = require("telescope.builtin")
map("n", "<C-p>", builtin.find_files, {})
-- map("n", "<leader>fg", builtin.live_grep, {})
map("n", "<leader>fb", builtin.buffers, {})
map("n", "<leader>fh", builtin.help_tags, {})

-- telescope
map("n", "<leader>fw", "<cmd>Telescope live_grep<CR>", { desc = "telescope live grep" })
map("n", "<leader>fb", "<cmd>Telescope buffers<CR>", { desc = "telescope find buffers" })
map("n", "<leader>fh", "<cmd>Telescope help_tags<CR>", { desc = "telescope help page" })
map("n", "<leader>ma", "<cmd>Telescope marks<CR>", { desc = "telescope find marks" })
map("n", "<leader>fo", "<cmd>Telescope oldfiles<CR>", { desc = "telescope find oldfiles" })
map("n", "<leader>fz", "<cmd>Telescope current_buffer_fuzzy_find<CR>", { desc = "telescope find in current buffer" })
map("n", "<leader>cm", "<cmd>Telescope git_commits<CR>", { desc = "telescope git commits" })
map("n", "<leader>gt", "<cmd>Telescope git_status<CR>", { desc = "telescope git status" })
map("n", "<leader>pt", "<cmd>Telescope terms<CR>", { desc = "telescope pick hidden term" })
-- map("n", "<leader>th", "<cmd>Telescope themes<CR>", { desc = "telescope nvchad themes" })
map("n", "<C-p>", "<cmd>Telescope find_files<cr>", { desc = "telescope find files" })
map( "n", "<leader>fa", "<cmd>Telescope find_files follow=true no_ignore=true hidden=true<CR>", { desc = "telescope find all files" })

------- Neotree ---------
map('n', '<leader>po', ':Neotree source=filesystem reveal=true position=left <CR>')

------- Copilot ---------
map('n', '<leader>cd', ':Copilot disable<CR>')
map('n', '<leader>ce', ':Copilot enable<CR>')


------- Terminal --------
-- terminal
map("t", "<C-x>", "<C-\><C-N>", { desc = "terminal escape terminal mode" })

The interesting part is that when I remove all the telescope mappings, it loads the config.

Another thing is that I using my custom nvchad config, it didn’t even load the config neither returned and error message.
When trying to clone the default nvchad config, it sort of worked, but only up to a certain number of plugins.

I have also tried multiple times to rm the local files such as ~/.local/share/nvim and ~/.local/state/nvim and ~/.cache as well.

My dotfiles
I am using Fedora 40.

Let me know if I can provide any relevant information.

Modules are not available before lazy loads them.

To fix this add require('garamog.remaps') to end of your init.lua
then you will get issue that you need to remap leader before initialzing lazy for that remove vim.g.mapleader = " " from remaps.lua and add it before calling require('lazy').setup

vim.cmd('set expandtab')
vim.cmd('set tabstop=1')
vim.cmd('set softtabstop=1')
vim.cmd('set shiftwidth=1')
vim.g.mapleader = " "


require('garamog.set')

---------- Lazy - Package Manager ------------
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
  vim.fn.system({
    "git",
    "clone",
    "--filter=blob:none",
    "https://github.com/folke/lazy.nvim.git",
    "--branch=stable", -- latest stable release
    lazypath,
  })
end
vim.opt.rtp:prepend(lazypath)

require("lazy").setup('plugins')

require('garamog.remaps')

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật