{"id":219,"date":"2014-03-16T09:05:52","date_gmt":"2014-03-16T09:05:52","guid":{"rendered":"http:\/\/blog.catalystlogic.com.au\/?p=5"},"modified":"2014-03-16T09:05:52","modified_gmt":"2014-03-16T09:05:52","slug":"sublime-text-sublimecodeintel-node-js","status":"publish","type":"post","link":"http:\/\/54.253.247.134\/?p=219","title":{"rendered":"Sublime Text, SublimeCodeIntel &#038; node.js"},"content":{"rendered":"<p>Have been working through the node.js via <a href=\"http:\/\/nodeschool.io\/#learn-you-node\">Learn you node<\/a> tutorials and thought it a good opportunity to see if I could get a node.js auto complete\/hint plugin.<\/p>\n<p>Unfortunately the <a href=\"https:\/\/github.com\/tanepiper\/SublimeText-Nodejs\">nodejs plugin<\/a> is no longer active,. and it did not seem to be namespace aware, that is, it would not narrow the filter based on the namespace. Entering 'a..' gave the same filtered list as 'fn.a...', as one of the motivations of my search was to have an easy way to explore namespaces, it wasn't going to cut it.<\/p>\n<p>Enter\u00a0<a href=\"https:\/\/github.com\/SublimeCodeIntel\/SublimeCodeIntel\">SublimeCodeIntel<\/a>. I was hoping to kill two birds with one stone and find something that turned a XSD into a hint file for \u00a0XML. This would help me edit web.config files using the DotNetConfig.xsd, though no luck. Will have to resume that search another time.<\/p>\n<p>SublimeCodeIntel worked fine out of the box, until I started editing the settings. Saving the user preferences without the encompassing curly braces around the all my setting crashes SublimeText, hard. Only Ctrl-Alt-Del could kill her, though the Unexpected trailing\u00a0characters message did point me to the first line that\u00a0helped me get that sorted quickly.<\/p>\n<p>The next issue was enabling the node.js autocomplete. The <a href=\"http:\/\/www.sublimetext.com\/forum\/viewtopic.php?f=3&amp;t=6252\">sublime forums <\/a>almost got me there, though it was a post right at the bottom on an old bug on the <a href=\"https:\/\/github.com\/SublimeCodeIntel\/SublimeCodeIntel\/issues\/61\">plugin's github page<\/a> that illuminated what I was missing. There are two parts, firstly, codeintel_syntax_map.<\/p>\n<pre class=\"lang:js decode:true\">\"codeintel_syntax_map\": {\n  \"JavaScript\": \"Node.js\"\n}<\/pre>\n<p>And my missing piece of the puzzle, javascriptExtraPaths<\/p>\n<pre class=\"lang:js decode:true\">\"codeintel_config\": {\n  \"JavaScript\": {\n    \"javascriptExtraPaths\":[\".\/Packages\/SublimeCodeIntel\/libs\/codeintel2\/lib_srcs\/node.js\"],\n    \"codeintel_scan_files_in_project\": false,\n    \"codeintel_max_recursive_dir_depth\": 2\n  }\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Have been working through the node.js via Learn you node tutorials and thought it a good opportunity to see if I could get a node.js auto complete\/hint plugin. Unfortunately the nodejs plugin is no longer active,. and it did not seem to be namespace aware, that is, it would not narrow the filter based on <a class=\"read-more\" href=\"http:\/\/54.253.247.134\/?p=219\">...continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14,16],"tags":[],"class_list":["post-219","post","type-post","status-publish","format-standard","hentry","category-node-js","category-sublime-text"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"http:\/\/54.253.247.134\/index.php?rest_route=\/wp\/v2\/posts\/219","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/54.253.247.134\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/54.253.247.134\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/54.253.247.134\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/54.253.247.134\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=219"}],"version-history":[{"count":0,"href":"http:\/\/54.253.247.134\/index.php?rest_route=\/wp\/v2\/posts\/219\/revisions"}],"wp:attachment":[{"href":"http:\/\/54.253.247.134\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=219"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/54.253.247.134\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=219"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/54.253.247.134\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=219"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}