i get trouble with the following issue, on erlang a function name and its arguments can be defined several times (it acts like switch-case on C/C++). the symbol definition i use is:
- Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Symbol List Function</string>
<key>scope</key>
<string>source.erlang entity.name.function.definition.erlang, source.erlang meta.expression.parenthesized</string>
<key>settings</key>
<dict>
<key>showInSymbolList</key>
<string>1</string>
<key>symbolTransformation</key>
<string>
s/^\s*\(/"" \(/g; # repeat function head
s/^/• /g; # bullets</string>
</dict>
<key>uuid</key>
<string>3CEA49B2-A5C5-405C-82E2-B8B668877C39</string>
</dict>
</plist>
look at the 1st transformation (repeat function head). it partially solves what i try to describe here, but here it goes. see an example for function definition:
- Code: Select all
where({key, 1}) -> here;
where({key, 2}) -> there;
where({key, _}) -> here.
the scope definition starts with 'source.erlang entity.name.function.definition.erlang' but it hits only once on the first, the other 'where' are not defined as 'entity.name.function.definition.erlang'. atm, i get the following result on ctrl+R:
- Code: Select all
• where({key, 1})
• "" ({key, 2})
• "" ({key, _})
hmmf, too long to describe, but, is there i way i can use value of one of the previous used symbols for the current?