Exafunction / codeium.nvim

A native neovim extension for Codeium
MIT License
647 stars 50 forks source link

On Windows Terminal the detection of the OS is not "Windows" it is "Windows_NT" #63

Closed Koalhack closed 1 year ago

Koalhack commented 1 year ago

Hello, in your code you use vim.loop.os_uname().sysname to determine which OS is used but I tested this method on my own instance and this method returned 'Windows_NT' and not "Windows" so all your conditions for uuid, gzip, uname and others don't work correctly for Windows users.

image

image

I hope I've helped you and I apologize for the extra work.

WillEhrendreich commented 1 year ago

ok, so what happens if you try

lua = require("codeium.io").get_system_info() because I get

{
  arch = "x86_64",
  is_aarch = false,
  is_arm = false,
  is_unix = false,
  is_windows = true,
  is_x86 = true,
  os = "windows"
}

that being said, my codeium has not been working for a while, and I've just not had the time to look into it.

how did you start to even look into the code? what part of it led you to think it was the os detection that was an issue?

Koalhack commented 1 year ago

Hello, I tested your command and the result was the same as yours and I don't know why the last time i see in your code I doesn't see the "Windows _NT" conditions, certainly my fault and inspect old commit by error.

But to respond to you, when i install your plugin I was having an uuid error and I was have to add the path of uuidgen.exe to my environnement variable and it worked but after add the codeium token, the autocompletion not worked, I tested it on Linux WSL with the same dotfiles and configuration and it work, so i investigated into your code and I see that the error with the uuidgen was not suppose to arrive on windows because you use another method for the uuid generation. So I continue to investigate your code and see your verification method but I was not seeing "Windows_NT" just "Windows" condition.

Its probably my fault because before investigated your code I look all open and close issue about my issue.