codota / tabnine-nvim

Tabnine Client for Neovim
https://tabnine.com
342 stars 31 forks source link

Help in setup with Windows #185

Closed 007interesting closed 3 weeks ago

007interesting commented 3 weeks ago

I am experiencing issues logging into Tabnine with nvim using the nvchad config. Here’s how I’ve integrated Tabnine into my setup -

-> Updating init.lua and plugins.lua -

. . .
require("tabnine").setup {
  disable_auto_comment = true,
  accept_keymap = "<A-l>",
  dismiss_keymap = "<A-c>",
  debounce_ms = 800,
  suggestion_color = { gui = "#808080", cterm = 244 },
  exclude_filetypes = { "TelescopePrompt", "NvimTree" },
  log_file_path = nil, -- absolute path to Tabnine log file
  ignore_certificate_errors = false,
}
local plugins = {
    { "codota/tabnine-nvim", build = "pwsh.exe -file .\\dl_binaries.ps1" }
} 
return plugins

-> Restarted the nvim -> [BUG] Running :TabnineHub did nothing -> Attempted :TabnineLoginWithAuthToken, but it also resulted in no response

amirbilu commented 3 weeks ago

@aarondill can you assist?

aarondill commented 3 weeks ago

what nvim version are you using? nvim -v -V1 Is the build script running correctly? The plugin is likely installed into ~/AppData/Local/nvim/lazy/tabnine-nvim. what are the contents $plugin/ and $plugin/binaries/, and the file $plugin/binaries/.active?

This is why we have the issue template. It isn't designed for windows, but the same information should've been collected before creating the issue.

aarondill commented 3 weeks ago

PS, @amirbilu should we use log_file_path for debug logs in the nvim plugin to make debugging easier? currently it's only used in the chat.

007interesting commented 3 weeks ago

what nvim version are you using? nvim -v -V1 Is the build script running correctly? The plugin is likely installed into ~/AppData/Local/nvim/lazy/tabnine-nvim. what are the contents $plugin/ and $plugin/binaries/, and the file $plugin/binaries/.active?

This is why we have the issue template. It isn't designed for windows, but the same information should've been collected before creating the issue.

what nvim version are you using? nvim -v -V1 Is the build script running correctly? The plugin is likely installed into ~/AppData/Local/nvim/lazy/tabnine-nvim. what are the contents $plugin/ and $plugin/binaries/, and the file $plugin/binaries/.active?

This is why we have the issue template. It isn't designed for windows, but the same information should've been collected before creating the issue.

> nvim -v -V1 NVIM v0.10.1 Build type: Release LuaJIT 2.1.1713484068

Yes the build script is running fine ~/AppData\Local\nvim-data\lazy\tabnine-nvim> pwsh.exe -file .\dl_binaries.ps1 downloading 4.187.0/x86_64-pc-windows-gnu

Contents image

I tried running Tabnine.exe, and it did nothing, got no response.

Thanks

007interesting commented 3 weeks ago

@aarondill I tried manual registration with Tabnine.exe -

.\binaries\4.187.0\x86_64-pc-windows-gnu\TabNine.exe --key eyJ... Activation failed: Error(ApiRequests(Error(ErrorParsingServerResponseAsJson { response_text: "Not Found", error: "expected value at line 1 column 1" }, State { next_error: None, backtrace: InternalBacktrace { backtrace: None } })), State { next_error: None, backtrace: InternalBacktrace { backtrace: None } })

aarondill commented 3 weeks ago

tabnine.exe isn't intended to be run manually, it requires specific input to stdin to actually do anything. Can you confirm (using task manager, or similar programs) that when you open a file in neovim, tabnine.exe is running (and doesn't die immediately)?

007interesting commented 3 weeks ago

Yes the tabnine is running fine Screenshot (1)

007interesting commented 3 weeks ago

Hey @aarondill , it works now! I deleted the lazy/tabnine-nvim folder, opened nvim, and it reinstalled the plugin. Now, when I use TabnineLoginWithAuthToken, it prompts me to enter the auth token, which wasn't working initially.

Thanks for your help.