I followed all the instructions in the top answer here
But when I associate a file as "Groovy" I see the "no candidates found for method call" on all the groovy commands like "pipeline", "environment", etc in my groovy scripts.
I tried downloading the groovy SDK from apache as well as brew, but both result in the same issue.