summaryrefslogtreecommitdiff
path: root/src/lsp.sml
diff options
context:
space:
mode:
Diffstat (limited to 'src/lsp.sml')
-rw-r--r--src/lsp.sml13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/lsp.sml b/src/lsp.sml
index 2d80479b..920f9f35 100644
--- a/src/lsp.sml
+++ b/src/lsp.sml
@@ -931,8 +931,19 @@ fun findMatchingStringInEnv (env: ElabEnv.env) (str: string): LspSpec.completion
in
(case List.map (fn (name, c) => (name, ElabOps.reduceCon env c)) filteredEs of
[] => []
- | (name, (Elab.TRecord (Elab.CRecord (_, fields), _), _)) :: _ =>
+ | (name, (Elab.TRecord (Elab.CRecord (_, fields), l2_), l1_)) :: _ =>
getCompletionsFromFields env (name ^ ".") (Substring.string str) fields
+ | (name, (* TODO this doesn't always work. I've only managed to get it working for tables in a different module *)
+ ( ( Elab.CApp
+ ( ( (Elab.CApp
+ ( ( Elab.CModProj (_, _, "sql_table")
+ , l4_)
+ , ( Elab.CRecord (_, fields)
+ , l3_)))
+ , l2_)
+ , _))
+ , l1_)) :: _ =>
+ (debug "!!"; getCompletionsFromFields env (name ^ ".") (Substring.string str) fields)
| _ => [])
end
| _ =>