Skip to content

Cannot open files in home directory in Cygwin #170

@delphinus

Description

@delphinus

ref #164

This is because vim.uv.os_homedir() returns C:\Users\foo, but the exact home directory ($HOME) in Cygwin is C:\cygwin64\home\foo.


procedure to fail opening files

  1. :cd C:\Windows (outside of the home directory)
  2. :Telescope frecency and try to open C:\Users\foo\AppData\Local\Nvim\init.lua
  3. Internally, it makes the path be normalized: ~\AppData\Local\Nvim\init.lua.
  4. Then Neovim tries to open ~\AppData\Local\Nvim\init.lua, and then fails. This is because ~ is not C:\Users\foo but \home\foo in Cygwin.

procedure to open files successfully

  1. :cd C:\Users\foo (home directory)
  2. :Telescope frecency and try to open C:\Users\foo\AppData\Local\Nvim\init.lua
  3. Internally, it makes the path to relative one: AppData\Local\Nvim\init.lua.
  4. Neovim successfully opens the file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions