Closed hugary1995 closed 2 years ago
Press ctrl-space instead. I can look into this. I might be able to add space as a trigger key for auto complete.
On Tue, Jul 5, 2022, 6:55 AM Gary (Tianchen) Hu @.***> wrote:
I am not sure if this is a missing feature, but this has been possible in Atom and was quite useful:
When the editor focus is here: [image: image] https://user-images.githubusercontent.com/31555204/177332095-fcefc026-7c9c-4344-b188-5c0d85a45802.png
If I press space in Atom it will show me a list of available options, but nothing happens in VSCode. Perhaps there is another way to do this. Idk
— Reply to this email directly, view it on GitHub https://github.com/idaholab/moose-language-support/issues/8, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABRMPQIGYEBSSTYG77JR7LVSQWCTANCNFSM52WEAD4Q . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Thanks. ctrl-space is as good as anything.
The ctrl-space list shows a bunch of irrelevant parameters that don't belong to the object.
I'll investigate. Is there a certain input that triggers this?
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
xmax = 5
ymax = 2
nx = 50
ny = 20
[]
[subdomain]
type = SubdomainBoundingBoxGenerator
input = gmg
bottom_left = '0 0 0'
top_right = '2 2 0'
block_id = 1
[]
[break]
type = BreakMeshByBlockGenerator
[]
[]
If I press ctrl-space at the empty line, I get bottom_left
and top_right
shown in the list of available options, among others.
I don't see those rogue parameters.
Are those rogue parameters shown with an abc
icon? That would mean they come from the built in autocomplete that just takes words from the current document as the basis.
They are not shown with an abc icon. But here's more information:
ctrl-space
inside Mesh/break
, the behavior is correct.Mesh/subdomain
and press ctrl-space
, some rogue parameters will show up, and they come from Mesh/break
. Mesh/break
and press ctrl-space
, the rogue parameters will show up, and they come from Mesh/break
.So it seems to me that the list of options are being cached somehow.
Ok, found the bug. Any assignment of an object or array in JavaScript is by default assigning it like a reference to the original. So the plugin was actually polluting the syntax definition.
Ok, I released moose-language-support@0.3.2
(should be on the Marketplace in a minute)
I can confirm 0.3.2 fixed this bug.
I am not sure if this is a missing feature, but this has been possible in Atom and was quite useful:
When the editor focus is here:
If I press
space
in Atom it will show me a list of available options, but nothing happens in VSCode. Perhaps there is another way to do this. Idk