Welcome to Komodo 11’s New CodeIntel


Ever since it was introduced back in Komodo 3, CodeIntel (short for “Code Intelligence”) has been one of Komodo’s best features. With the rise of interpreted languages like Perl, Python, and Ruby, being able to obtain useful code completions for dynamic objects is crucial. Also, having the ability to show function arguments as you type, being able to jump to symbol definitions with the click of a mouse, and being able to view the overall structure of your code at a glance are all extremely useful tools for developers that CodeIntel has provided over the years.

CodeIntel Version 1

When it was originally introduced, CodeIntel version 1 ran “in-process”. This means that when you typed a trigger character like ‘.’, CodeIntel would pause Komodo until it produced a list of potential code completions. A lot of work was put into minimizing this pause, but as code bases grew, the pauses became longer and longer.

CodeIntel Version 2

In order to address the pausing issue in CodeIntel version 1, CodeIntel version 2 was re-architected to be largely “out-of-process”, which meant much of it was a stand-alone program that received requests from Komodo, and transmitted back appropriate responses. Nevertheless, CodeIntel 2 retained some of the previous optimizations needed to minimize pauses when it was “in-process”. For example, many completions would only trigger after typing 2 or 3 characters, or on a special character like ‘.’ or character sequence like ‘->’. As a result, Codeintel version 2 was not able to show completions outside some defined constraints.

Introducing CodeIntel Version 3

Komodo 11 introduces the next iteration of CodeIntel: CodeIntel version 3. Despite the version number, CodeIntel 3 is almost a complete re-write of CodeIntel as we knew it. The only part of CodeIntel 2 we kept was our language parsing routines, the routines that extracted class names, function names and arguments, variable names, module imports, etc. from source code. Everything else is completely new:

  • We have a brand new SQLite database, which is a huge upgrade from our existing XML file database. SQLite allows for lightning-fast CodeIntel queries, as well as the ability to fetch CodeIntel that simply was not possible before.
  • We can provide completions nearly anywhere now, thanks to new context-sensitive language parsing routines. As mentioned previously, CodeIntel 2 only showed completions under certain conditions. Now, CodeIntel 3 has the ability to show completions anywhere it is useful to do so.
  • Behind the scenes, CodeIntel 3 is backed by a tried-and-true implementation of Symbol Tables. These are the structures that track things like classes and their methods, functions and their arguments and variables, and modules and their exports. This implementation is not only fast, but greatly simplifies symbol and symbol relationship management.
  • Also behind the scenes, CodeIntel 3’s new architecture allows for CodeIntel for new languages to be added more easily than in CodeIntel 2. We plan on opening up the ability for users to add their own CodeIntel routines in follow-up Komodo 11 releases. Stay tuned!

Next Steps

This is just the beginning of CodeIntel 3, as our primary focus for Komodo 11 was to have CodeIntel 3’s foundation finished. CodeIntel 3 for the most part maintains feature-parity with CodeIntel 2, with some of the exceptions listed above. However, we have big ideas for future releases now that the groundwork has been laid. For example, we have open tickets for implementing fuzzy completions, designing new language parsers, and enabling user extensions.
Check out the new CodeIntel for yourself! Create a free account on the ActiveState Platform to try Komodo IDE today!
Try Komodo IDE

Recent Posts

Webinar - Securing Python and Open Source Ecosystems
Securing Python and Open Source Ecosystems

Dustin Ingram, Fellow at the Python Software Foundation (PSF), joins us to discuss trust and security for PyPI and other repositories in light of recent supply chain attacks, and steps being taken to secure the open source ecosystem.

Read More
Scroll to Top