17

I am having a very strange IntelliSense issue, and I'm not sure if it's Visual Studio 2013 or ReSharper 8.1. When I'm working in views (cshtml) within script tags (javascript), something keeps changing "function" to "Function" with a capital "F."

<script type="text/javascript">
    var something = function() .... //on tab or completing the ()'s, it changes to Function
</script>

This isn't a huge deal, of course, but it's becoming a pain in my neck as I keep having to go back and lower-case the "F." Does anyone know why this is happening?

I'm running Visual Studio 2013 Ultimate with ReSharper 8.1 C# edition.

AJ.
  • 16,368
  • 20
  • 95
  • 150
  • could it be your Resharper cache needs clearing, see: http://stackoverflow.com/questions/21283306/how-do-you-remove-a-specific-entry-from-intellisense-resharper – Piers Myers Jan 23 '14 at 15:31
  • @PiersMyers Hmmm, clearing the cache seems to have resolved it. You should post your comment as an answer so I can upvote and select as answer. – AJ. Jan 23 '14 at 15:39

4 Answers4

11

Clearing the caches would probably work - Resharper->Options->Environment->General and click the Clear Caches button.

Piers Myers
  • 10,611
  • 6
  • 46
  • 61
7

I'm experiencing the same issue with ReSharper 8.1.23.546, and it hasn't been resolved with a cache clear. It is reported to have been fixed in build 8.1.1000+

The only thing that worked for me was to disable auto-popup for JavaScript, as described here:

http://youtrack.jetbrains.com/issue/RSRP-400812

  • Go to Resharper > Options > Intellsense > Autopop > JavaScript
  • Choose 'Display but do not preselect' for all the drop down items

This is less a fix than a way to make the irksome behavior go away until I can get an upgrade.

I love ReSharper, but this was annoying enough that I was contemplating buying a ticket to the Czech Republic to poke someone in the eye.

kiprainey
  • 3,241
  • 4
  • 29
  • 29
5

Clearing cache didn't fix my issue. The best fix for me was to remove the "(" character from being able to auto-complete in my JS since I always just type "function(".

I did this by going to Resharper > Options > Intellisense > Completing Characters, and put a "(" in the Do not complete on box for JavaScript.

enter image description here

cchamberlain
  • 17,444
  • 7
  • 59
  • 72
4

I was having issues with R# grabbing every function it could find instead of what is in the _refereneces.js file so I changed the intellisense to use visual studio's instead of R#.

enter image description here

DeadlyChambers
  • 5,217
  • 4
  • 44
  • 61