From 2786ff0a86f32911429351a6aca4cec65e1a5b85 Mon Sep 17 00:00:00 2001
From: neon-dev <1169307+neon-dev@users.noreply.github.com>
Date: Mon, 8 Jan 2018 12:55:04 +0100
Subject: [PATCH] [sql-hint addon] Switch order of hints

Show column hints (if a defaultTable is set) above table hints, since
you are far more often in clauses where you need those.
---
 addon/hint/sql-hint.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/addon/hint/sql-hint.js b/addon/hint/sql-hint.js
index f5ec2cac1..5600c8390 100644
--- a/addon/hint/sql-hint.js
+++ b/addon/hint/sql-hint.js
@@ -273,8 +273,8 @@
     if (search.charAt(0) == "." || search.charAt(0) == identifierQuote) {
       start = nameCompletion(cur, token, result, editor);
     } else {
-      addMatches(result, search, tables, function(w) {return w;});
       addMatches(result, search, defaultTable, function(w) {return w;});
+      addMatches(result, search, tables, function(w) {return w;});
       if (!disableKeywords)
         addMatches(result, search, keywords, function(w) {return w.toUpperCase();});
     }
-- 
GitLab