angelozerr / CodeMirror-XQuery

XQuery Editor based on CodeMirror
37 stars 14 forks source link

autocomplete for property values? #4

Open jgoldhammer opened 11 years ago

jgoldhammer commented 11 years ago

Do you have any idea how to make an autocomplete for function parameters of type string? For example, I have a function getProperty with one parameter of type string. So there are many valid property names like 'cm:name', 'cm:title' or 'cm:modified' [getProperty("cm:name")]. How can I describe that via tern.js? I do not wanna create all kind of combinations (getProperty("cm:name" , getProperty("cm:title"), getProperty("cm:modified") in the json file.

angelozerr commented 11 years ago

If I understand your need, you wish do


getProp // Ctrl+Space

and completion displays :


getProperty("cm:name") getProperty("cm:title")

getProperty("cm:modified")

If it that, please post your question on Tern.js dev mailling list https://groups.google.com/forum/?fromgroups#!forum/tern-dev

If some update should be done with CodeMirror Tern addon, I will do it.