Closed pru-brennaveen closed 2 years ago
Thanks for the bug report!
Can you try the following example?
let a = "123";
f(a);
It should show up as follows:
The 3 dots under let
are the suggestion indicator. Does it show for you?
Btw, in v1.86.0 the default suggestion level was changed from info
(blue squiggly underline) to hint
(3 dots) to make the suggestions look less distractive and indicate that they are not problems (many users perceived the squiggly line as such). You can set individual suggestions to different levels in the Visual Studio Code settings.
No joy :(
The red squiggle on f is just eslint complaining that f is not defined.
Do you have a p42.toml
in the root folder of your workspace? If so, please check if the refactoring is deactivated there (see https://p42.ai/documentation/p42-for-vscode/configuration#configuration-file for details, specific paths and/or refactorings could be disabled).
If not, can you set "p42.logging.error.enabled": true
in your VS Code settings, restart VS Code, open the file that should show suggestions, and then check if any errors are logged in the 'Output' panel (select P42)?
I don't have a p42.toml file so no worries there.
I added the setting (although vscode greys it out saying "Unknown Configuration Setting") and restarted vscode. There was nothing logged to the output panel.
The extension appears to be working because vscode shows that it had a 153ms activation time.
Thanks for checking! The "unknown configuration setting" is expected (the options are not exposed in the UI).
Just to make sure I'm not missing anything, what is the extension of the JavaScript file that you are working on?
P42 only works with certain extensions such as .js
, .ts
or .mjs
(see https://p42.ai/documentation/p42-for-vscode/faq for all extensions).
It is a .js file, but I think I've narrowed down the problem. It appears that the issue is related to multiple folders in the workspace. I created a test.js file with your code and saved it to a folder called p42-tests then ran the following tests:
Test 1
Test 2
Thanks for the investigation! I'll take a look at the multiple folders issue today and see if I can confirm & fix it.
Update: I have reproduced the issue, now working on a fix.
@pru-brennaveen I have just released version 1.86.1
, which adds support for multiple workspace folders. Please re-open this issue if you still encounter the bug in 1.86.1
or higher. Thanks again for the bug report!
Works! You are awesome, thanks for the super quick response and a great addon!
Thanks! I hope you find the extension helpful!
Suggestions don't appear to be working in my vscode for some reason. I've put in some code that I know should trigger a refactor suggestion, but no suggestions appear on the code or the suggestions sidebar. I tried uninstalling and reinstalled and all of the suggestions settings are set to hint.
Does anyone have any suggestions on how I can fix this?
P42 v1.86.0
VScode Version: 1.64.2 (user setup) Commit: f80445acd5a3dadef24aa209168452a3d97cc326 Date: 2022-02-09T22:02:28.252Z Electron: 13.5.2 Chromium: 91.0.4472.164 Node.js: 14.16.0 V8: 9.1.269.39-electron.0 OS: Windows_NT x64 10.0.22000