Giter Site home page Giter Site logo

Comments (11)

alex-courtis avatar alex-courtis commented on May 12, 2024

Looking for cygpath is done by vim itself in various places e.g. https://github.com/neovim/neovim/blob/5d1c1da3c90adece96f491e7f12fd76c03a881c9/runtime/autoload/zip.vim although it looks to be lazy.

I don't have access to or expertise with windows so I am flying blind here.

Perhaps we can sort this out with feature flags.

Please open and :source this feature flag enumerator under WSL. I would be eternally grateful as that would be a very useful resource for future windows issues.

has.lua.gz

Please do the same for cygwin. Is that msys2?

Also powershell please.

from nvim-tree.lua.

alex-courtis avatar alex-courtis commented on May 12, 2024

Let's time the check directly. Please paste the following into executable_time.lua and :source that:

local before = vim.loop.hrtime()
vim.fn.executable "cygpath"
local after = vim.loop.hrtime()

print(after - before .. "ns")

On arch linux btrfs: 37300ns

from nvim-tree.lua.

jtledon avatar jtledon commented on May 12, 2024

When sourcing the has.lua under wsl, I get the following flags enabled:

wsl_has_list.log

When installing neovim in powershell using the official .msi installer for windows of neovim version 0.91 and sourcing the file:

pwsh_has_list.log

Additionally, when running the check directly with the commands provided for executable_time.lua, it came in at 364,133,189ns: just a little less than 10,000x slower. I ran it a few times to try and get an average and it hovered around the 355,000,000ns mark, which is higher than I was expecting because as shown in the initial video, performing the check had an impact of 0.2s and not 0.35s.

I am admittedly unfamiliar with both cygwin and msys2 and don't have either of them set up currently. If you give me a 3-4 days I'll have a bit more free time to set them up and I can respond back here with the results running under both alternatives!

from nvim-tree.lua.

alex-courtis avatar alex-courtis commented on May 12, 2024

This is a fantastic resource that will be invaluable in the future. I'd be eternally grateful for at least the cygwin one however don't feel pressured.

With all of these we can definitively map feature flags and remove the unnecessary checks, or at least make them lazy.

from nvim-tree.lua.

jtledon avatar jtledon commented on May 12, 2024

I've had pretty significant difficulties trying to get neovim installed within cygwin; the issues mostly revolve around some dependencies not being compatible with or available within cygwin. I was following the cygwin install directions and reading through some other discussions, but don't think I'll have the time to get it fully setup to run the has.lua file.

I haven't actually tried installing via msys2, though.

Please let me know if there's anything else I can do to help, or any other information that might be useful for you to have, especially pertaining to WSL2 installs.

from nvim-tree.lua.

alex-courtis avatar alex-courtis commented on May 12, 2024

Many thanks for the feature flags @jtledon , it was very enlightening: https://github.com/nvim-tree/nvim-tree.lua/wiki/Development#os-feature-flags

from nvim-tree.lua.

alex-courtis avatar alex-courtis commented on May 12, 2024

I've had pretty significant difficulties trying to get neovim installed within cygwin; the issues mostly revolve around some dependencies not being compatible with or available within cygwin. I was following the cygwin install directions and reading through some other discussions,

Wow... cygwin isn't looking good. Looking through issues I'm not seeing anything specific to cygwin or msys2 users.

msys2 support, which appears to be the same as cygwin, was added via #1295 Looking at the discussion in #1290 it seems we didn't really have any knowledge.

Options:

  1. Remove cygwin / msys support, although I'm not sure how we would actuall do that
  2. Put cygwin support behind a new option, default false
  3. Identify feature flags that can positively distinguish cygwin from wsl

I'll go with 2 for now to get things going.

from nvim-tree.lua.

alex-courtis avatar alex-courtis commented on May 12, 2024

@bstaint I'm reaching out to you as you are the only msys/cygwin user I know of.

We are having some performance issues with windows users scanning their paths for cygpath.exe

We need a definitive means of identifying cygwin without needing path scanning.

I would be most grateful if you could collect feature flags for msys2 and cygwin as per #2459 (comment)

Also... if you could explain the relationship/differences between msys and cygwin it would be most enlightening and allow us to properly support them in the future.

from nvim-tree.lua.

alex-courtis avatar alex-courtis commented on May 12, 2024

@jtledon I'd be most grateful if you tested the 2. fix:

cd /path/to/nvim-tree.lua
git pull
git checkout 2459-optional-cygwin-support

from nvim-tree.lua.

jtledon avatar jtledon commented on May 12, 2024

@alex-courtis The fix seems to work perfectly on my end! (using a dev load of that branch with lazy.nvim). All normal functionalty seems to work for me as well.

2459-nvim-tree-cygwin-off-by-default.mp4

Just for some additonal testing, I enabled the new git.cygwin_support flag within the 2459... branch and saw the exepected behavior: everything still worked fine with the plugin but the lag was reintroduced as one would assume.

Also, I just wanted to clarify from my previous statement, I'm by no means an expert on cygwin/msys2 and have never used either of them before. It's quite possible that all the install issues I was having could be easily resolved to get nvim working within them; I personally just wasn't having an easy time of it. That being said, I would be interested to hear more about them and the differences between them from someone who actually uses it.

from nvim-tree.lua.

alex-courtis avatar alex-courtis commented on May 12, 2024

saw the exepected behavior: everything still worked fine with the plugin but the lag was reintroduced as one would assume.

That's great, many thanks. All those conditionals are working as intended.

That being said, I would be interested to hear more about them and the differences between them from someone who actually uses it.

As would I. I last used cygwin the last time I used windows, 2006 or so.

from nvim-tree.lua.

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.