yatli / fvim

Cross platform Neovim front-end UI, built with F# + Avalonia
MIT License
1.34k stars 30 forks source link

Path not recognized on mac #170

Open Sammyalhashe opened 3 years ago

Sammyalhashe commented 3 years ago

Hi there, great work on this, I have been looking for something like this for neovim for a long, long time.

I am definitely missing something here, or just missed it in the documentation. I am using neovim's built-in lsp client with clangd. Upon startup, the lsp client looks for the clangd executable in my path. When I open the lsp client from Fvim, it tells me that the executable cannot be found (it works in tui, just FYI). Are there any settings so that I can manually add the path or something to make finding executables on my machine work?

yatli commented 3 years ago

I recently changed the osx launcher (https://github.com/yatli/fvim/blob/master/lib/fvim-osx-launcher) behavior, so that:

  1. It looks for the user's default shell
  2. It uses the default shell as a login shell, run /usr/bin/env to extract the environment variables
  3. It creates an isolated environment from the extracted info, and launches FVim.

You can check for logs in the Console app. Search for events that start with "FVim:", it will print the captured PATH var so you can inspect what's wrong with it. Also check SHELL variable to see if it's your default shell -- and other variables to see if your default rc file is sourced.

Another gotcha is that the launcher may not be able to extract the environment from an interactive session. So if you have this at the beginning of your rc:

# If not running interactively, don't do anything
[ -z "$PS1" ] && return

Everything afterwards will not be sourced.

celioreyes commented 3 years ago

@Sammyalhashe I was having similar issues with MacVim (for Golang specifically) and I installed FVim to see if my issues were isolated to MacVim and they weren't. I had the same issues where my environment wasn't being loaded.

I used this to fix my MacVim references, I haven't gone back to test FVim (I should since I'm planning on moving to that), I can confirm with you in a few minutes if it's working on FVim now.

Oh I should add that this is for ZSH btw!

Any ways here's that link I used to fix my issue: https://github.com/b4winckler/macvim/wiki/Troubleshooting#for-zsh-users

nyngwang commented 2 years ago

So what's the solution?

nyngwang commented 2 years ago
TheLazyLemur commented 2 years ago

So I am experiencing the same issue with Ubuntu.

The solution seems to be to launch fvim from a terminal instance. I am looking into a better solution for the time being. I will update you if I find a better solution.

nyngwang commented 2 years ago

Good news: I'm not using GUI (neo)vim anymore :) Unsubscribed.