[SOLVED][LSP] My auto-import using nvim-cmp isn't providing/ showing me all the available imports. It only shows a limited or no options at all

I was hopping to get some help here setting up my LSP. I’ll try describing my problem to the best of my abilities but please understand I am still very new to all this. If I am missing some piece of information which I should have added, let me know.

So in VS code tsserver when I press import A, it would show me files in my sub-directory such as App.js, AppDrawer_mui, etc... which I have exported and are available for importing to my current file. Now this does not happen in nvim. In nvim I’d first of all have to wait a solid second or two for the LSP options to kick in, otherwise it will only show me buffer suggestions and snippts. But after waiting I would still not get all the option. For import React from "React I get a suggestion when I type import Rea but I don’t get a suggestion for useEffect on import useEf and other inbult modules. Now this is all for Javascript but this also apply to python. Typing from num would give me the suggestion from numpy in vs code but not in pylsp in nvim.

My guess is, I am missing some configuration, but I am not sure which one it is. Here are some of my stats.

I’ve been trying to solve this problem for 2 days now but no progress. Really frustrating. (ᗒᗣᗕ)՞ Any and all help will be appreciated. (๑ ‵ ● ‿ ● ‵ ๑)

Solution found. Or rather the problem. LSP is actually working alright. The issue is that the auto-import will only kick in when it is used on a fresh line. Meaing, if you write import Rea and expect to get an auto complete, it won’t. It needs to be the first word in the line like this Rea without the prefix import,otherwise it will not work.