LazyVim / starter

Starter template for LazyVim
Apache License 2.0
957 stars 764 forks source link

Config folder ignored when removing { "LazyVim/LazyVim", import = "lazyvim.plugins" } #8

Closed GnussonNet closed 1 year ago

GnussonNet commented 1 year ago

Hello! I cloned this repo because I loved the idea of not needing any init.lua files in each and every folder and subfolder.

For installing plugins this worked great! I was able to add new plugins by just creating a file in the plugins folder and configure it.

But i quickly discovered that when I removed the { "LazyVim/LazyVim", import = "lazyvim.plugins" } line to not install the default plugins, the config folder was ignored. Is it possible to get this to work without the default plugins?

I know this starter boilerplate is made for LazyVim, but I would love to use this without the need of the default plugins.

Thanks, Gnusson

folke commented 1 year ago

You could do:

{ "LazyVim/LazyVim", config = true }

GnussonNet commented 1 year ago

Then I get this error becuse it expects me to use Tokyonight

Error detected while processing /Users/gnusson/.config/nvim/init.lua:
Could not load your colorscheme
...ocal/share/nvim/lazy/LazyVim/lua/lazyvim/config/init.lua:11: module 'tokyonight' not found:
^Ino field package.preload['tokyonight']module tokyonight not found
^Ino file './tokyonight.lua'
^Ino file '/opt/homebrew/share/luajit-2.1.0-beta3/tokyonight.lua'
^Ino file '/usr/local/share/lua/5.1/tokyonight.lua'
^Ino file '/usr/local/share/lua/5.1/tokyonight/init.lua'
^Ino file '/opt/homebrew/share/lua/5.1/tokyonight.lua'
^Ino file '/opt/homebrew/share/lua/5.1/tokyonight/init.lua'
^Ino file './tokyonight.so'
^Ino file '/usr/local/lib/lua/5.1/tokyonight.so'
^Ino file '/opt/homebrew/lib/lua/5.1/tokyonight.so'
^Ino file '/usr/local/lib/lua/5.1/loadall.so'
# stacktrace:
  - /LazyVim/lua/lazyvim/config/init.lua:11 _in_ **colorscheme**
  - /LazyVim/lua/lazyvim/config/init.lua:99
  - /LazyVim/lua/lazyvim/config/init.lua:97 _in_ **setup**
  - /LazyVim/lua/lazyvim/init.lua:5 _in_ **setup**
  - lua/config/lazy.lua:9
  - init.lua:2
folke commented 1 year ago

You can change the colorscheme to something else. Check the docs

GnussonNet commented 1 year ago

Yeah, sorry my bad. What I actually meant on my first question was to get a clean setup, where I configure options, keybinds etc from scratch.

Something like { import = "config" },

folke commented 1 year ago

You can just remove all lazyvim stuff and then do in your init.lua:

require("config.options")
require("config.lazy")
require("config.keymaps")
require("config.autocmds")
GnussonNet commented 1 year ago

Awesome, thank you for taking your time <3