usagi-flow / evil-helix

Bringing the Helix editor to the evil side
https://github.com/usagi-flow/helix
Mozilla Public License 2.0
313 stars 9 forks source link

Windows Evil-Helix #38

Closed haininhhoang94 closed 1 month ago

haininhhoang94 commented 3 months ago

Hello there, I would like to know if there is some compiled version of evil-helix on Windows, I have tried to compile it myself but I have failed. (It get link.exe error)

I would appreciate it if someone could help me with this. Thanks in advance!

sdsalyer commented 2 months ago

I was able to install rustup-init.exe and choose the defaults for installation options (1.74.0-x86_64-pc-windows-msvc via Visual Studio installer). Afterwards, cloning the repo and checkout @usagi-flow 's branch feat-ci-ms and cd into the directory. Then run cargo install --path helix-term --locked I got this command from the build document, which may also be helpful.

In a fresh terminal, it's all there and working:

PS C:\Users\spenc> where.exe hx
C:\Users\spenc\.cargo\bin\hx.exe
PS C:\Users\spenc> hx --version
evil-helix release-20240716 (128999e9, helix 24.7)

Hope this helps in the meantime but it looks like usagi-flow just about has this implemented (I suspect the GNU toolchain is more problematic than the Visual Studio option on Windows, but this did take up an extra 5GB of disk space just to compile this rust app).

usagi-flow commented 2 months ago

Thank you for sharing your experiences!

As you correctly noted, I prepared a branch in which I tried to produce windows builds in a few different ways.

Unfortunately, while helix actually builds, the tree-sitter grammars are causing issues (even with cargo-cross), and cargo-xwin simply freezes - for a reason still unknown to me. And no bundled grammars means no syntax highlighting out-of-the-box. I'd rather get this right instead of releasing half-baked windows binaries.

Either way, thanks for your patience. I'll try to find some time in the coming days to think about how we can get this done.

usagi-flow commented 2 months ago

@haininhhoang94 @sdsalyer Thank you very much for your patience. It took a little while to find the time to find a solution (the treesitter integration made it hard to cross-compile), but we can now build windows binaries.

I amended the last release and added a windows build to it, although I'd be happy to hear if it works for you. You can download it from here: https://github.com/usagi-flow/evil-helix/releases/tag/release-20240716 (The artifact was produced by this workflow run, should you want to compare hashes.)

Regarding the installation: You should be able to extract the package anywhere, just make sure the extracted directory is on your PATH. If you use MSys2 / Cygwin / Git Bash..., you should be able to install it under /opt as recommended on in the README.

If someone could be so kind to confirm that it works well (especially syntax highlighting), I'll clean up and merge the PR.

sdsalyer commented 2 months ago

I think it's looking good. I didn't remove my old helix, but ran the hx.exe from the zip, e.g. C:\Users\<username>\Downloads\helix-amd64-windows\helix\hx.exe. Hope this helps! Thanks for taking the time to add the Windows support!

image

image

image

yocoldle commented 2 months ago

@haininhhoang94 @sdsalyer Thank you very much for your patience. It took a little while to find the time to find a solution (the treesitter integration made it hard to cross-compile), but we can now build windows binaries.

I amended the last release and added a windows build to it, although I'd be happy to hear if it works for you. You can download it from here: https://github.com/usagi-flow/evil-helix/releases/tag/release-20240716 (The artifact was produced by this workflow run, should you want to compare hashes.)

Regarding the installation: You should be able to extract the package anywhere, just make sure the extracted directory is on your PATH. If you use MSys2 / Cygwin / Git Bash..., you should be able to install it under /opt as recommended on in the README.

If someone could be so kind to confirm that it works well (especially syntax highlighting), I'll clean up and merge the PR.

Seems that the editor.statusline.mode.normal/insert/select setting doesnt work at current windows release?

haininhhoang94 commented 1 month ago

my evil helix work as expected in windows. Thanks ! @usagi-flow and everyone!