Giter VIP home page Giter VIP logo

Comments (5)

justinmk avatar justinmk commented on June 9, 2024 1

Thank you for debugging that!

I think nvim should probably detect this and show a more useful error, since it is tricky to troubleshoot.

Let's keep this issue open, though ideally it will be resolved in Nvim itself.

from vscode-neovim.

justinmk avatar justinmk commented on June 9, 2024 1

these nvim executables can all be run from the terminal without issue.

Thanks to your troubleshooting, I confirmed the issue is reproducible in the terminal if you remove "Downloads" access permissions for the terminal app:

image

And !ls $VIMRUNTIME is a way to test for the problem:

:!ls $VIMRUNTIME
ls: /Users/xx/Downloads/t/nvim-macos/share/nvim/runtime: Operation not permitted
shell returned 1

from vscode-neovim.

justinmk avatar justinmk commented on June 9, 2024 1

Created neovim/neovim#27527

Nvim's :checkhealth command already warns about this case, but it's worth checking if the Lua loader error could be improved.

Proposal

vscode-neovim itself can and should check if $VIMRUNTIME is accessible. #1816

from vscode-neovim.

justinmk avatar justinmk commented on June 9, 2024

module 'vim.version' not found:

That exists on both Nvim 0.9 and 0.10.

This likely happening because you have not installed the Nvim runtime files and you haven't set $VIMRUNTIME correctly. Edit: technically true but it should work anyway. $VIMRUNTIME is correct when inspected from the : prompt of vscode-neovim:

:echo $VIMRUNTIME
/.../nvim-macos/share/nvim/runtime

I suppose vscode-neovim could try to automatically set $VIMRUNTIME if it sees that bin/nvim lives next to a runtime/ directory.

it may be worth adding a note to the README to avoid using the CI builds.

There is nothing wrong with the Nvim CI builds.

Note the /Users/runner/work paths, being paths from the CI runners rather than paths from my local machine.

Those fallback paths are indeed hardcoded at build-time, but they're only fallback paths.

from vscode-neovim.

mbhutton avatar mbhutton commented on June 9, 2024

After more trial and error, it turned out that the root cause was a permissions issue for the Downloads directory.

By default VS Code on macOS doesn't have permission to read from the $HOME/Downloads directory, and this is simply how it fails when trying to use an nvim executable from a directory that VS Code doesn't have permission to read. Oddly it's able to spawn the nvim executable itself, but just without the ability to read its own runtime files.

So, clearly no bug in the plugin, so I'll close this issue [edit: re-opening as requested] .

I'll update the title to indicate the root cause in case anyone else stumbled on this.

The fix for anyone else encountering this, either:

  1. Move the extracted neovim directory to somewhere where VS Code has permission to read, and/or
  2. System Preferences -> Privacy and Security -> Files and Folders -> Visual Studio Code -> [x] Downloads/Desktop/Documents

Thanks!

from vscode-neovim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.