0

The next item in the list is the one I want: 'a' for 'anchor'. Why would such a suggestion show up in an HTML context? This is an annoying time-waster. I have not been able to track down where this setting lives.

[edit] I am looking for a way to remove 'anfn' from the suggestion list when I type 'a' in an HTML page.

[edit] Apparently, this is not possible to do in VSCode.

  • I mean it's not really an issue that it's there as a suggestion, but nevertheless I understand your question. How is the one line suggestion wasting your time? –  Jun 12 '22 at 16:30
  • It wastes my time because my intention is the anchor tag to auto-complete but it is 2nd in the list of suggestions. So I have to navigate to it and select it. Considering how many times I need an anchor tag vs an anonymous function in a HTML page it is a waste of time. – William Lucas Jun 13 '22 at 17:53
  • Ohh, didn't know it was in the second page. –  Jun 13 '22 at 18:02

2 Answers2

0

The anfn is showing up when you type 'a' as part of the IntelliSense and autofill in Visual Studio Code. While anonymous functions may have no use in HTML, they certainly do in JavaScript, which is commonly used with HTML to build webpages. This article should help you in seeing that there is a link between anonymous functions, JS, and HTML. This article should help in customizing IntelliSense, there may be a setting for what you want to do.

  • Thanks for the articles. The third article looked promising but unfortunately, I did not see a solution. I am looking for a way to remove the suggestion 'anfn' from the list when I type 'a'. I am very familiar with IntelliSense, anonymous functions, HTML, and javascript. – William Lucas Jun 13 '22 at 18:02
  • @William Lucas - Ah okay, sorry the last one didn't help. Does [this Stack Overflow question](https://stackoverflow.com/questions/58049533/delete-a-specific-intellisense-suggestion-in-vs-code) help? –  Jun 13 '22 at 18:04
  • After looking at your suggested link and following it to other similar questions, this appears to be not possible in VSCode. It is sad that VSCode does not know what is relevant in an HTML environment. I appreciate your time on this. – William Lucas Jun 13 '22 at 18:49
  • @William Lucas - Yep that's what I [unfortunately] found too –  Jun 13 '22 at 18:55
0

This "anfn" thing is coming from JavaScript (ES6) code snippets extension. If you disable that then clicking a will show emmet generated results <a href=""></a>.

I couldn't find a way to prioritize Emmet over JavaScript (ES6) code snippets. :( So disabling JavaScript (ES6) code snippets is the only solution. (?)

Mashiur
  • 568
  • 4
  • 7