-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Workspace not getting indexed #196
Comments
Hi @Zaccheuss, Could you share the output of the following command within the project?
I'm replying from my phone, so I apologize in advance for any typos. |
The output is I am using coc if that matters. I did try manually adding a workspace file by running
I still see an empty output though. I may be off-base here but based on your comment I did try and override the lua in function M.setup()
local timer = uv.new_timer()
timer:start(
0,
30000,
vim.schedule_wrap(function()
if #utils.buf_get_clients() > 0 then
-- local root_paths = utils.set(lsp.buf.list_workspace_folders())
-- print("Debug") <- does not get shown when logging via :messages
local root_paths = utils.set({"~/path/to/project/"})
tabnine_binary:request({ Workspace = { root_paths = root_paths } }, function() end)
end
end)
)
end
|
@Zaccheuss can you sure your |
@Zaccheuss I've added an option to define workspace_folders #197 require("tabnine").setup({
--- ...
workspace_folders = {
paths = { "/your/project" },
get_paths = function()
return { "/your/project" }
end,
},
--- ...
}) Let me know if you're able to get workspace indexing working this way |
@amirbilu Thanks for the information and the PR. I created a minimal require('packer').startup(function(use)
use 'wbthomason/packer.nvim'
use 'neovim/nvim-lspconfig'
use { 'codota/tabnine-nvim', run = "./dl_binaries.sh" }
end)
require'lspconfig'.ts_ls.setup {}
require('tabnine').setup({
disable_auto_comment=true,
accept_keymap="<Tab>",
dismiss_keymap = "<C-]>",
debounce_ms = 800,
suggestion_color = {gui = "#808080", cterm = 244},
exclude_filetypes = {"TelescopePrompt", "NvimTree"},
log_file_path = "~/tabnine.log",
ignore_certificate_errors = false,
workspace_folders = {
paths = { "/path/to/project" },
get_paths = function()
return { "/path/to/project" }
end,
},
}) I have also pulled the However I still see the I can see the correct workspace folder when I log with this command I also did a quick test of the Tabnine VSCode extension in the same project and the files are getting indexed there. |
Maybe this is just a visual bug. After using the Chat function more it seems that the files are actually getting indexed. For example when I prompt the model it returns a list of relevant files in the As a test I removed props that I was passing into a component and the model was able to see what the missing props were from the other component file. It is now working as I expect. @amirbilu Seems like this issue is largely fixed, though there still appears to be a visual bug which could cause confusion. |
@Zaccheuss can you share logs? See readme on how to set log path |
This is after the following steps:
Log output:
|
I imagine this could be related to the fact the everything is running in WSL.
Describe the bug
When I open the chat window via
:TabnineChat
I get the message:Workspace indexing: Not yet started
that infinitely loads.To Reproduce
Steps to reproduce the behavior:
:TabnineChat
Expected behavior
I would expect the workspace files to be indexed so I can use the context of the codebase when interacting with the AI models.
Version Info:
Running Ubuntu in WSL (version 2)
cat /etc/os-release
nvim -v
I am using
vim-plug
ls -A ~/.local/share/nvim/plugged/tabnine-nvim/binaries
cat /path/to/plugin/binaries/.active
I don't have this file
ls -A -- "$(nvim --headless -c 'lua io.stdout:write(vim.fn.stdpath("data"))' -c qa)"/*/tabnine-nvim/binaries/
cat -- "$(nvim --headless -c 'lua io.stdout:write(vim.fn.stdpath("data"))' -c qa)"/*/tabnine-nvim/binaries/.active
No matches found
The text was updated successfully, but these errors were encountered: