abzcoding / lvim

🧑‍🚀 Bloated LunarVim 🚀
MIT License
469 stars 65 forks source link

a year later i try lvim as nvim again for neovide #94

Closed luxus closed 1 year ago

luxus commented 1 year ago

https://github.com/LunarVim/LunarVim/pull/1777 after this got merged a year ago, i hoped to use your lvim config in .config/lvim and lunarvim in .config/nvim lunarvim itself works fine i enter export LUNARVIM_CONFIG_DIR="/Users/luxus/.config/lvim" to switch the folder but with your config it runs into trouble it looks it doesn't find the right folder.

12:14:51 [WARN ] lvim: "Invalid configuration: /Users/luxus/.config/lvim/config.lua:12: module 'user.neovim' not found:\n\tno field package.prelo
ad['user.neovim']\n\tno file './share/lua/5.1/user/neovim.lua'\n\tno file './user/neovim.lua'\n\tno file './user/neovim/init.lua'\n\tno file './l
ib/lua/5.1/user/neovim.so'\n\tno file './user/neovim.so'\n\tno file './lib/lua/5.1/loadall.so'\n\tno file './lib/lua/5.1/user.so'\n\tno file './u
ser.so'\n\tno file './lib/lua/5.1/loadall.so'" file="init.lua", line=119

https://github.com/abzcoding/lvim/blob/fb85c70cfd809299f0284988e3383b75a06626d7/config.lua#L12

any idea how could i fix it?

Uzaaft commented 1 year ago

Does it work with:exec nvim -u "/Users/luxus/.config/lvim/init.lua" ?

abzcoding commented 1 year ago

nvim -u "/Users/luxus/.config/lvim/init.lua"

you would need sth like this create a file called ~/.local/bin/neolvim

with this content

#!/usr/bin/env bash

export LUNARVIM_RUNTIME_DIR="${LUNARVIM_RUNTIME_DIR:-"/Users/luxus/.local/share/lunarvim"}"
export LUNARVIM_CONFIG_DIR="${LUNARVIM_CONFIG_DIR:-"/Users/luxus/.config/lvim"}"
export LUNARVIM_CACHE_DIR="${LUNARVIM_CACHE_DIR:-"/Users/luxus/.cache/nvim"}"
export LUNARVIM_BASE_DIR="${LUNARVIM_BASE_DIR:-"$LUNARVIM_RUNTIME_DIR/lvim"}"

neovide --  -u "$LUNARVIM_BASE_DIR/init.lua" "$@"

then call it

neolvim
luxus commented 1 year ago

yeah i know about this solution :( but i tried to make it work without any bash scripts. i wonder why it don't find user.neovim , i'm sure there must be a easy solution, it works with basic configs