How to format word insid list which show when I do autocomplete?
<p>I define my own languge .... in my languge functions and I want to do autocomplete with my function .... I want to do 2 things ...</p>

<p>the first thing is :</p>

<p>for example :
if I have class called className contain fun1 and func2
I want when I Type className and press "." (className.) to show me list contain :
int fun1
double fun2</p>

<p>and when I select int fun1 only fun1 is selected (something like label and value ... the label here is :int fun1 and the value is : fun1 ...when I selected the label I want to value is type on codemirror ) How I can do it ?</p>

<p>the second thing is :</p>

<p>How I can color the words in label in different color for example :
in label (int fun1) I want do color the word int by red color and fun1 by blue color insid the label ... How I can do it ?
if I can't do it with codemirror there are any plugin to do it with codemirror ??
Thanks in advance</p>

<p>EDIT :
Hi I find this plugin <a href="http://codemirror.net/doc/manual.html#addon_show-hint" rel="nofollow">here</a>... But I did not knew How I can change displayText and text for my own language
I used this code for autocomplete my language :</p>

<pre><code>var orig = CodeMirror.hint.anyword;
var inner;
CodeMirror.hint.anyword = function(cm) {
    inner = orig(cm) || { from: cm.getCursor(), to: cm.getCursor()};
inner.list.length = 0; 
inner.list.push("fun1");
inner.list.push("fun2");
  return inner;
}

   extraKeys: {
        "Ctrl-Space": "autocomplete",
        "Ctrl-Space":function(cm){  CodeMirror.showHint(cm, CodeMirror.hint.anyword); },
        "'.'": "autocomplete",
        "'.'" : function(cm) { 
            setTimeout(function(){cm.execCommand("autocomplete");}, 10);
            CodeMirror.showHint(cm, CodeMirror.hint.anyword);
         },
</code></pre>

<p>can any body help me How to change displayText and text for my CodeMirror.showHint .... plz help </p>