~glacambre/firenvim

6f4d06bf58fbb7fc93f50a29988a1c5225b6d799 — Ghjuvan Lacambre 2 years ago 972263d + 01eb46b
Merge pull request #135 from glacambre/replace_osx_path

Replace osx path
3 files changed, 24 insertions(+), 6 deletions(-)

M .travis.yml
M TROUBLESHOOTING.md
M autoload/firenvim.vim
M .travis.yml => .travis.yml +2 -1
@@ 15,9 15,10 @@ before_install:
  - mkdir -p "$HOME/.config/nvim/"
  - echo "set rtp+=$(pwd)" >> "$HOME/.config/nvim/init.vim"
install:
  - npm install
  - npm ci
  - npm run build
  - npm run install_manifests
  - cat "$HOME/.local/share/firenvim/firenvim"
cache:
  directories:
    - node_modules

M TROUBLESHOOTING.md => TROUBLESHOOTING.md +2 -2
@@ 71,7 71,7 @@ Clone the firenvim repository somewhere (e.g. `git clone https://git.sr.ht/~glac
+exec '/usr/bin/nvim' -u NORC --cmd 'set rtp+=/tmp/firenvim' --headless -c 'call firenvim#run()'
```

Then, try reloading your config twice/focusing a textarea twice. If firenvim suddenly starts working, this might be a `$PATH` issue on your end. See [this section](#make-sure-firenvims-path-is-the-same-as-neovims) in order to fix it.
Then, try reloading your config twice/focusing a textarea twice. If firenvim suddenly starts working, this might be a `$PATH` issue on your end. Revert the changes you just made and try the instructions in [this section](#make-sure-firenvims-path-is-the-same-as-neovims) in order to fix it.

## Make sure firenvim's $PATH is the same as neovim's



@@ 82,4 82,4 @@ In order to fix this, call firenvim#install() and give it a prologue that sets t
nvim --headless -c "call firenvim#install(0, 'export PATH=\"$PATH\"')" -c quit
```

Note that this sets your `$PATH` in stone and that in order to update it you'll need to run the above command again. If you want to avoid doing that, you could also try the methode described [here](https://github.com/glacambre/firenvim/issues/122#issuecomment-536348171).
Note that this sets your `$PATH` in stone and that in order to update it you'll need to run the above command again. If you want to avoid doing that, you could also try the method described [here](https://github.com/glacambre/firenvim/issues/122#issuecomment-536348171).

M autoload/firenvim.vim => autoload/firenvim.vim +20 -3
@@ 139,10 139,27 @@ function! s:get_chromium_manifest_dir_path()
endfunction

function! s:get_progpath()
        if $APPIMAGE == ""
                return v:progpath
        let l:result = v:progpath
        if $APPIMAGE != ""
                " v:progpath is different every time you run neovim appimages
                let l:result = $APPIMAGE
        endif
        return $APPIMAGE
        if match(l:result, '^/usr/local/Cellar/') == 0
                let l:warning = "Warning: homebrew path detected. "
                " On OSX, if v:progpath points to homebrew's cellar, it's
                " going to be a version-specific path that will break when
                " users update neovim.
                let l:constant_path = '/usr/local/opt/nvim'
                if executable(l:constant_path)
                        let l:result = l:constant_path
                        let l:warning = l:warning . "Using '" . l:constant_path . 
                                                \ "' instead of '" . v:progpath
                else
                        let l:warning = "Firenvim may break next time you update neovim."
                endif
                echo l:warning
        endif
        return l:result
endfunction

function! s:get_executable_content(data_dir, prolog)