From dc74ec281ada2d3baab3e589698cea3d98360eb8 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Wed, 21 Jan 2015 17:28:57 +0800 Subject: [PATCH] skip non-golang autocomplete --- static/js/editors.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/static/js/editors.js b/static/js/editors.js index 3755fac..5c55dd4 100644 --- a/static/js/editors.js +++ b/static/js/editors.js @@ -406,6 +406,11 @@ var editors = { }); CodeMirror.commands.autocompleteAfterDot = function (cm) { + var mode = cm.getMode(); + if (mode && "go" !== mode.name) { + return CodeMirror.Pass; + } + var token = cm.getTokenAt(cm.getCursor()); if ("comment" === token.type || "string" === token.type) {