<blockquote>
<p>Wouldn't it be possible to feed the symbol information (e.g. from llvm) to TM (and extend TM to do what's necessary)?</p>
</blockquote>

<p>It surely would be possible, but I'm not sure if TM is up to the job (I don't know enough about it to evaluate that). The main goal is to get proper support for C and C++, which as <a href="https://github.com/elextr" class="user-mention">@elextr</a> always mentions, is quite poor at present (in C it doesn't support pointer dereferences, local types, local variables, parameters, and additionally in C++ it doesn't support template arguments, non-global symbols, lambda parameters or lambda locals, in most languages it switches modes randomly between useful completions and everything under the sun, etc).</p>

<blockquote>
<p>I'm not familiar with LLVM/clang so I don't know what would be necessary for this and if something like this is doable.</p>
</blockquote>

<p>The API basically that you create a TranslationUnit by parsing source files, and from that you get access to the complete AST (manually walkable or via a visitor API), and then it has special functions made for IDE's that works on the translation units, like it has one "<a href="http://clang.llvm.org/doxygen/group__CINDEX__CODE__COMPLET.html#ga50fedfa85d8d1517363952f2e10aa3bf">codeCompleteAt</a>" which provides a list of every possible valid thing that could be completed there and still make valid code, or "<a href="http://clang.llvm.org/doxygen/group__CINDEX__LEX.html#ga6b315a71102d4f6c95eb68894a3bda8a">tokenize</a>" which quickly lexes/parses the code providing a list of "tokens" which can be used for to do stuff like semantic-highlighting (eg. unlike currently how Scintilla will highlight all same named tokens alike, you can have the class "string" in namespace std highlighted as a class when used as such or if you name a variable "string", have it coloured as an identifier). It also has all kinds of other useful stuff like an <a href="http://clang.llvm.org/doxygen/group__CINDEX__DIAG.html">API for diagnostics</a> (eg. to replace the weird regex-based makefile output parser currently used in Geany), and a lot more.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany/pull/1187#issuecomment-242585178">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABDrJ0JEIhhYAzHmJpcrzpFiJy7-hC3iks5qji_IgaJpZM4JqVBL">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJ5EFg2vUIujURlt6q3AXz6JhWwePks5qji_IgaJpZM4JqVBL.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/geany/geany/pull/1187#issuecomment-242585178"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/geany/geany","title":"geany/geany","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/geany/geany"}},"updates":{"snippets":[{"icon":"PERSON","message":"@codebrainz in #1187: \u003e Wouldn't it be possible to feed the symbol information (e.g. from llvm) to TM (and extend TM to do what's necessary)?\r\n\r\nIt surely would be possible, but I'm not sure if TM is up to the job (I don't know enough about it to evaluate that). The main goal is to get proper support for C and C++, which as @elextr always mentions, is quite poor at present (in C it doesn't support pointer dereferences, local types, local variables, parameters, and additionally in C++ it doesn't support template arguments, non-global symbols, lambda parameters or lambda locals, in most languages it switches modes randomly between useful completions and everything under the sun, etc).\r\n\r\n\u003e I'm not familiar with LLVM/clang so I don't know what would be necessary for this and if something like this is doable.\r\n\r\nThe API basically that you create a TranslationUnit by parsing source files, and from that you get access to the complete AST (manually walkable or via a visitor API), and then it has special functions made for IDE's that works on the translation units, like it has one \"[codeCompleteAt](http://clang.llvm.org/doxygen/group__CINDEX__CODE__COMPLET.html#ga50fedfa85d8d1517363952f2e10aa3bf)\" which provides a list of every possible valid thing that could be completed there and still make valid code, or \"[tokenize](http://clang.llvm.org/doxygen/group__CINDEX__LEX.html#ga6b315a71102d4f6c95eb68894a3bda8a)\" which quickly lexes/parses the code providing a list of \"tokens\" which can be used for to do stuff like semantic-highlighting (eg. unlike currently how Scintilla will highlight all same named tokens alike, you can have the class \"string\" in namespace std highlighted as a class when used as such or if you name a variable \"string\", have it coloured as an identifier). It also has all kinds of other useful stuff like an [API for diagnostics](http://clang.llvm.org/doxygen/group__CINDEX__DIAG.html) (eg. to replace the weird regex-based makefile output parser currently used in Geany), and a lot more."}],"action":{"name":"View Pull Request","url":"https://github.com/geany/geany/pull/1187#issuecomment-242585178"}}}</script>