 
 KernelManager = require './kernel-manager'
 
-module.exports = AutocompleteProvider = ( ->
-    selectors = _.map KernelManager.getAvailableKernels(), ({language}) -> '.source.' + language
+module.exports = AutocompleteProvider = do ->
+    selectors = _.map KernelManager.getAvailableKernels(), ({language}) ->
+        '.source.' + language
+            .replace 'coffeescript', 'coffee'
+            .replace 'javascript', 'js'
     selector = selectors.join(', ')
     return {
         selector: selector

        # from things, kill any processes, etc.
        dispose: ->
    }
)()


            # adapted from http://stackoverflow.com/questions/5474008/regular-expression-to-confirm-whether-a-string-is-a-valid-identifier-in-python
            python: /([^\d\W]|[\u00A0-\uFFFF])[\w.\u00A0-\uFFFF]*$/

            # adapted from http://php.net/manual/en/language.variables.basics.php
            php: /[$a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/
