idea-php-dotenv-plugin
idea-php-dotenv-plugin copied to clipboard
Go to is not working if variable is not access directly (JavaScript)
- Create a
.env
file
USER = 'Aaron'
- Create
index.js
file
const user = process.env.USER
Move caret to USER
and press Ctrl + B (Declaration or Usages) - the .env
would be opened, just as expected
- Now change code to
const env = process.env
const user = env.USER
Move caret to USER
and press Ctrl + B (Declaration or Usages) - the caret would be moved to process.env
. But it should move to .env
file, just like in point 2, because the code is actually the same
- Now change code to
const {env} = process
const user = env.USER
The USER
is unresolved, Ctrl + B is not working at all. But it should be resolved, and Ctrl + B should work the same as in point 2, because the code is actually the same
Hi, @Alexsey That's true. Current implementation of completion and Go to declaration in JavaScript is very simple. It just tries to autocomplete all process.env.* calls. I'll do some research, maybe I could make it more smart.
Thank you, that would be really cool!