Comments (7)
Yes it does. I have to do this first though:
- Open VS code
- Open the codeActions.py file
- Put the cursor in the
os
line - Close codeActions.py file
- Reload VS code
- Open codeActions.py file
- Try quick fix
No matter how long I wait, it shows this:
If I move the cursor it works again.
My guess is that VS code isn't reasking. It must be asking as we're still loading the index information.
from pylance-release.
this happens regardless how long you waited before doing the first code action?
from pylance-release.
Let me try again to make sure, but I believe so.
from pylance-release.
my guess is the first code action request came before indexing is done, so we returned code action response without import os
and that response is cached until new trigger such as caret move or text change or etc. so, control+. won't show import os
until that happen.
I guess we could trigger whatever that would trigger new code action request when indexing is done (if such thing exists like semantic refresh or etc)
from pylance-release.
hmmm.. it doesn't repro for me somehow in WSL. if you enable logLeve: Trace
and do ctrl+. after index is done
log, is it still happening? it might not happening to me since I don't have much packages installed so indexing
is relatively cheap.
from pylance-release.
CTRL+. seems to work. It's just the quick action lightbulb that has the wrong data. And if I do CTRL+. and then click on the lightbulb, the lightbulb then has the correct data.
from pylance-release.
I see. then ctrl+.
must doing new code action request
but existing lightbulb
is using cached info.
just looked through LSP spec on code action -https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_codeAction - but couldn't find any refresh
or similar request. looks like when to refresh code action info seems baked in the code itself.
we might want to ask LSP
to add something like this - https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#semanticTokens_refreshRequest - for code actions?
from pylance-release.
Related Issues (20)
- "Not a known attribute" error HOT 12
- pylance crashing all the time HOT 1
- Pylance Performance Issue HOT 1
- pylance crash: Allocation failed - JavaScript heap out of memory HOT 16
- report HOT 2
- issue HOT 1
- Add all missing imports for file HOT 1
- "Go to declaration": it would be good to have suggestions HOT 1
- provide standalone file mode HOT 4
- "Go to symbol in workspace" does not see the symbol HOT 1
- Pylance is analyzing something forever (profile included) HOT 3
- What is the version of pylance corresponding to vscode version 1.80.2? HOT 2
- cyclic symbolic detection is broken
- I end up configuring this more than actually optimizing my code like pycharm provides HOT 2
- Cannot import keras.models in Pylance even though it's reexported in the `__init__.py` HOT 4
- Find all references finds references in 3rd party libraries
- Go to definition when already on a definition of a variable jumps to the first use
- Renames are not being applied to notebook cells HOT 1
- Docstring templating HOT 1
- "Add...to extraPaths" doesn't work in multiroot workspace HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pylance-release.