Closed ghost closed 1 year ago
Hey, Nice to meet you! I'd love it if you provide your dotfiles so, I can test it locally. But anyways, thanks for the (large) amount of info!
Nevertheless, I'm pretty sure that lazy.nvim assumes that anything inside a import
(e.g import = "x"
) is a string. So, lazy won't loop inside the array to import it. (I assume)
Anyways, try replacing your lua/plugins/init.lua
with this:
-- Vim.fn.stdpath("data") is in Linux systems: ~/.local/nvim
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
-- If it's not found - indicating that it's not found - Git clone it (~)_(~)
if not vim.loop.fs_stat(lazypath) then
-- Show a lovely message indicating that we're boostrapping lazy :)
print(" Bootstrapping lazy.nvim!")
-- lazy.nvim recommends to use vim.fn.system but, via `vim.cmd("!...")` we can know the progress ;)
vim.cmd("!git clone --filter=blob:none https://github.com/folke/lazy.nvim.git --branch=stable " .. lazypath)
print(" Done!")
end
-- Add it to RTP. So, we can require it later on
vim.opt.rtp:prepend(lazypath)
-- Import plugins from `lua/plugins`
require("lazy").setup(
{
{ import = "plugins.ui" },
{ import = "plugins.code" },
{ import = "plugins.langs" },
{ import = "plugins.version_control" },
},
{
defaults = {
-- Lazy-load by default
lazy = true,
-- Use the latest version of the plugin (screw semantic versioning)
version = false,
},
install = {
-- Install missing plugins.
missing = true,
colorscheme = {
-- These are a list of plugins to load when installing a plugin
-- It's listed on order. catppuccin -> habamax
"catppuccin",
"habamax",
},
},
performance = {
rtp = {
disabled_plugins = {
-- I can disable more plugins such as `rplugin` and `netrw`, it'll decrease functionality.
"gzip",
"tarPlugin",
"tohtml",
"zipPlugin",
"matchit",
"matchparen",
"netrwPlugin",
"rplugin",
"nvim",
"tutor",
-- "spellfile",
},
},
},
}
)
Try and test this.
The things I changed is:
import
inside an arrayLet me know if it works!
A heartfelt thanks to you! Yeah, It worked!
I'm glad it worked! I'll go ahead and close this issue for now. If you have any more questions, feel free to ask!
Do you have any discord
id so that I can talk with you personally?
Yeah! async#8467
Yeah!
async#8467
Check your DMs please.
Sorry, I'm quite busy.
Intro
Hi @asyncedd, I @Swayam25 a full-stack developer. I was previously using
vscode
then I switched toneovim
it's just because I have a pc withUbuntu v23.04
,2GB ram
,500 GB
HDD.Intel Pentium G2030 processor
. I coded all my projects on this pc viavscode
. Just before some months I got to know aboutvim
. Yeah I am too usinglazy.nvim
. I had installedLazyVim
but it wasn't too customizable for me and they also gave some plugins which I don't need just It slows downneovim
after some research I found out yourrepo
and I customized some of your codes to meet my need and changed theplugins
folder structure, but now Im getting this error.The Issue
Error Message
File Structure
File:
nvim/lua/plugins/init.lua
File:
nvim/init.lua
What I got to know from this
When I do
import = "plugins.ui"
it works but when I do multi importimport = {}
it sucks.Steps To Reproduce
Run
nvim
Expected Behavior
It should load all the
plugins
with itssubfolders