问题
Visual studio 2017 does not show function collapse icon for JS files. However, it highlights function and variable keywords.
回答1:
You can enable 'outling' (as it's called) for the current document by selecting the "Outlining" item from the "Edit" menu, and choosing "Start Automatic Outlining," as shown below:
In theory, there should be a "global" setting for this, like there is for other languages (e.g. Options -> Text Editor -> C# -> Advanced
then "Enter Outlining mode when files open") but, for JavaScript, this seems to be a 'bug' in the current release: see this Developer Community post.
来源:https://stackoverflow.com/questions/60193395/visual-studio-2017-does-not-show-collapse-icon-for-js-file