question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

how to make --wsl launch lunarvim and not just plain nvim

See original GitHub issue

Hi

I want to use fvim as the gui for nvim on wsl. I see I can start fvim like this

fvim --wsl

and it works fine, but I use lunarvim as my preferred setup. As is, fvim is starting nvim without lvim’s configuration.

FYI, lvim is just launching this:

export LUNARVIM_CONFIG_DIR="${LUNARVIM_CONFIG_DIR:-/home/jm/.config/lvim}"
export LUNARVIM_RUNTIME_DIR="${LUNARVIM_RUNTIME_DIR:-/home/jm/.local/share/lunarvim}"

exec nvim -u "$LUNARVIM_RUNTIME_DIR/lvim/init.lua" "$@"

Is there a way to make fvim start lvim in wsl instead of plain nvim?

I think I can achieve something similar like this:

SET NVIMSOCKET=66555
start /b cmd /c wsl lvim --listen "127.0.0.1:%NVIMSOCKET%" --headless
start C:\tools\fvim\fvim.exe --nvr 127.0.0.1:%NVIMSOCKET%

but I prefer to double check here if there is a better/cleaner way.

Thanks for this project!!

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
jmlucjavcommented, Apr 4, 2022

Sure, I will keep an eye on this. Good luck if your hardware mishap!

0reactions
indika-devcommented, Sep 29, 2022

Hi! I found a little workaround for starting Lunarvim with fvim:

  • add the environment variables for Lunarvim to your ~/.bashrc:

export LUNARVIM_RUNTIME_DIR=“${LUNARVIM_RUNTIME_DIR:-”/home/user/.local/share/lunarvim"}" export LUNARVIM_CONFIG_DIR=“${LUNARVIM_CONFIG_DIR:-”/home/user/.config/lvim"}" export LUNARVIM_CACHE_DIR=“${LUNARVIM_CACHE_DIR:-”/home/user/.cache/lvim"}"

  • then start Fvim with the following command line: .\FVim.exe --wsl -u /home/user/.local/share/lunarvim/lvim/init.lua
  • in config.lua you can then add the configuration for fvim:

if vim.g.fvim_loaded then vim.cmd [[set guifont=FiraCode\ Nerd\ Font:h14]] vim.cmd [[FVimCursorSmoothMove v:true]] vim.cmd [[FVimCursorSmoothBlink v:true]] vim.cmd [[FVimCustomTitleBar v:true ]] vim.cmd [[FVimFontAutoSnap v:true]] vim.cmd [[FVimUIPopupMenu v:true]] vim.cmd [[FVimUIWildMenu v:true]] – Ctrl-ScrollWheel for zooming in/out – nnoremap <silent> <C-ScrollWheelUp> :set guifont=+<CR> – nnoremap <silent> <C-ScrollWheelDown> :set guifont=-<CR> – nnoremap <A-CR> :FVimToggleFullScreen<CR> end

Drawback is, that Telescope based menus aren’t working at all. Therefore, Lunarvim still isn’t usable with Fvim, but this might be the next step in the right direction.

edit:

Drawback is, that Telescope based menus aren’t working at all.

That is not correct! The dashboard menus are not working! If you call telescope directly with e.g. :Telescope projects, then all works as expected!

edit 2: :Telescope projects does not work within the dashboard! You must have a source file open in the editor! Therefore you can open config.lua with “Configuration” and then everything is working as expected.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Opening buffers at startup is taking 350+ ms · Issue #2309
I am using default LunarVim in WSL2. Below is the startup time with cache. times in msec clock self+sourced self: sourced script cl......
Read more >
Neovim on Windows
I guess this command can only work on Linux? I just want to open all my files in one single Qt window, preferably...
Read more >
Setting Up Neovim on WSL2 - Evan Calzolaio - Medium
Setting up Neovim on WSL2 can be tricky, here are the right steps to follow… ... run $ nvim , then: # create...
Read more >
Installation
Make sure you have installed the latest version of Neovim v0.9.0+ . Have git , make , pip , python ... Release​. (Neovim...
Read more >
I've been using vim for years, switched to neovim, and at ...
FWIW, I just needed to install the default nvim-lspconfig plugin (it's provided by the Neovim maintainers, and it doesn't do anything besides provide...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found