Sublime Forum

CodeIntel ported from Open Komodo Editor

#155

Thanks for the marvelous work on porting this to sublimetext2, it works great for me.

I’ve been looking at python_codeintel.py@autocomplete trying to figure out a way to get functions to autocomplete with parens (), inserting the cursor between the parentheses. It looks like completions have a ‘type’, so I should be able to do some sort of conditional on type == ‘function’…but I don’t know enough yet about the ST2 API to figure out where to go from there. Any ideas?

0 Likes

#156

Hey,

I am running Submit Text 2 beta build 2126 (not sure if that’s the latest, how do I check?) on OS X Lion 10.7.2 (11C74), Mac Pro Mid-2010 2.8 GHz Quad-Core Intel Xeon

After installing CodeIntel I kept getting the crashing error that others had previously reported, then I noticed it was still trying to build indexes each time it crashed. I had a bunch of files (like Zend Framework) that it had to index, so I left it alone for awhile and now it doesn’t crash. Works sweet!!

Thanks!

The only thing I haven’t figured out is when I get code intel on a variable (this is in PHP) it shows all functions, not just the functions that relate to that class… is this how it is supposed to work, or have I not quite finished setting it up properly?

Appreciate any ideas people have.

0 Likes

#157

Nope, got it working!

I was editing a file outside of project root.

This plugin rocks!

0 Likes

#158

Thanks for the work on this plugin.

Something ive noticed is that in most languages, hitting cmd+J to trigger the autocomplete will not work if there are any characters preceding the cursor. It seems to still work in CSS, though. Does anyone else experience this?

0 Likes

#159

Does this plugin have full functionality for PHP? I’ve read all the documentation, most of this thread and I’m certain i’ve got the necessary dependencies installed and I’ve run build.sh successfully. I can get autocomplete working using CTRL+Space however the feature I really need to work is the jump to symbol.I’ve tried the various key bindings and mouse clicks but I cannot get the jump feature to work. I’m running ubuntu 11.11. This is the killer feature i need to jump ship from netbeans.

My console output is as follows:

startup, version: 2139 linux x64 channel: stable
executable: /home/brandon/Apps/SublimeText2/sublime_text
working dir: /home/brandon
packages path: /home/brandon/.config/sublime-text-2/Packages
settings path: /home/brandon/.config/sublime-text-2/Settings
PackageSetup not required
error parsing session: No data at: 0:0
Py_GetProgramName(): sublime_text
Py_GetExecPrefix(): .
Py_GetProgramFullPath(): /home/brandon/bin/sublime_text
Py_GetPath(): ./lib/python26.zip:./lib/python2.6/:./lib/python2.6/plat-linux2:./lib/python2.6/lib-tk:./lib/python2.6/lib-old:./lib/python2.6/lib-dynload
Py_GetPythonHome(): .
catalogue loaded
found 4 files for base name Default.sublime-keymap
found 2 files for base name Default.sublime-mousemap
found 3 files for base name Main.sublime-menu
Reloading plugin /home/brandon/.config/sublime-text-2/Packages/Default/comment.py
Reloading plugin /home/brandon/.config/sublime-text-2/Packages/Default/copy_path.py
Reloading plugin /home/brandon/.config/sublime-text-2/Packages/Default/delete_word.py
Reloading plugin /home/brandon/.config/sublime-text-2/Packages/Default/detect_indentation.py
Reloading plugin /home/brandon/.config/sublime-text-2/Packages/Default/duplicate_line.py
Reloading plugin /home/brandon/.config/sublime-text-2/Packages/Default/echo.py
Reloading plugin /home/brandon/.config/sublime-text-2/Packages/Default/exec.py
Reloading plugin /home/brandon/.config/sublime-text-2/Packages/Default/fold.py
Reloading plugin /home/brandon/.config/sublime-text-2/Packages/Default/font.py
Reloading plugin /home/brandon/.config/sublime-text-2/Packages/Default/goto_line.py
Reloading plugin /home/brandon/.config/sublime-text-2/Packages/Default/indentation.py
Reloading plugin /home/brandon/.config/sublime-text-2/Packages/Default/kill_ring.py
Reloading plugin /home/brandon/.config/sublime-text-2/Packages/Default/mark.py
Reloading plugin /home/brandon/.config/sublime-text-2/Packages/Default/new_templates.py
Reloading plugin /home/brandon/.config/sublime-text-2/Packages/Default/open_file_settings.py
Reloading plugin /home/brandon/.config/sublime-text-2/Packages/Default/paragraph.py
Reloading plugin /home/brandon/.config/sublime-text-2/Packages/Default/save_on_focus_lost.py
Reloading plugin /home/brandon/.config/sublime-text-2/Packages/Default/scroll.py
Reloading plugin /home/brandon/.config/sublime-text-2/Packages/Default/side_bar.py
Reloading plugin /home/brandon/.config/sublime-text-2/Packages/Default/sort.py
Reloading plugin /home/brandon/.config/sublime-text-2/Packages/Default/swap_line.py
Reloading plugin /home/brandon/.config/sublime-text-2/Packages/Default/switch_file.py
Reloading plugin /home/brandon/.config/sublime-text-2/Packages/Default/transform.py
Reloading plugin /home/brandon/.config/sublime-text-2/Packages/Default/transpose.py
Reloading plugin /home/brandon/.config/sublime-text-2/Packages/Default/trim_trailing_white_space.py
Reloading plugin /home/brandon/.config/sublime-text-2/Packages/Diff/diff.py
Reloading plugin /home/brandon/.config/sublime-text-2/Packages/Git/git.py
Reloading plugin /home/brandon/.config/sublime-text-2/Packages/HTML/encode_html_entities.py
Reloading plugin /home/brandon/.config/sublime-text-2/Packages/HTML/html_completions.py
Reloading plugin /home/brandon/.config/sublime-text-2/Packages/Package Control/Package Control.py
Reloading plugin /home/brandon/.config/sublime-text-2/Packages/SublimeCodeIntel/python_codeintel.py
loading bindings
loading pointer bindings
Package Control: Skipping automatic upgrade, last run at 2011-11-28 09:59:44, next run at 2011-11-28 21:59:44 or after
found 1 files for base name Default.sublime-theme
theme loaded
app ready
pre session restore time: 0.186002
startup time: 0.261272
loaded 937 snippets

My .codeintel/config is:

{
        "PHP": {
                "php": '/usr/bin/php',
                "phpExtraPaths": ],
                "phpConfigFile": 'php.ini'
        }
}

Am I missing something?

0 Likes

#160

Hi. Big thanks to developers for this amazing plugin. I have one question. Autocomplete works well, but not for ExtJS library. It doesn’t work for it at all. When I try it in OpenKomodo it doesn’t work too. But in OpenKomodo I can choose an api database. So I choose ExtJS library and have autocomplete with ExtJS. I watched sources directory of SublimeCodeIntel and found some CIX files. ExtJS is in the list of this files. So i want to know if I have a chance to get autocomplete from databases.

0 Likes

#161

Can you guys please get the latest version (now 1.3) and try it?

This version should fix the issues you were having in Linux, plus now you shouldn’t need to build the libraries anymore, libpcre is now statically linked and SublimeCodeIntel should now work out of the box in Linux (32 and 64 bit) :smiley:

Get it from the usual GitHub repo: github.com/Kronuz/SublimeCodeIntel

v1.3 (20-12-2011):
- This build should fix many of the problems seen in Linux systems.
- Libraries for Linux rebuilt with libpcre statically (libpcre bundled for Linux builds).
- calltip() is now thread safe (which caused some strange behavior in Linux where Sublime Text 2 ended up being unresponsive).

0 Likes

#162

[quote=“Kronuz”]Can you guys please get the latest version (now 1.3) and try it?

This version should fix the issues you were having in Linux, plus now you shouldn’t need to build the libraries anymore, libpcre is now statically linked and SublimeCodeIntel should now work out of the box in Linux (32 and 64 bit) :smiley:

Get it from the usual GitHub repo: github.com/Kronuz/SublimeCodeIntel

v1.3 (20-12-2011):
- This build should fix many of the problems seen in Linux systems.
- Libraries for Linux rebuilt with libpcre statically (libpcre bundled for Linux builds).
- calltip() is now thread safe (which caused some strange behavior in Linux where Sublime Text 2 ended up being unresponsive).[/quote]

Not working on Ubuntu 2.6.38-11-generic x64

When I try ALT+LEFT-CLICK, plugin starts scanning the project but never ends (or takes longer than 5 minutes…) Tested with a fresh WordPress project and a Zend Framework one.

¿Can I send you some sort of log or give you more information to help solve the problem?

0 Likes

#163

I think an update to ST2 broke this plugin, as now I don’t even have the message about my indexes being built. I’ve tried fresh installs of SublimeCodeIntel and it still doesn’t seem to do anything. It’s really frustrating because this broke my entire flow for me. Hopefully a fix is pushed out soon.

0 Likes

#164

It doesn’t work. Keeps writing “Processing PHP”, or “Updating indexes” or “Doing CodeIntel”… And the pop up never shows up. It only works with CSS right now.

0 Likes

#165

I confirm: "Keeps writing “Processing PHP”, or “Updating indexes”
Ubuntu 11.10

tried

$ sudo apt-get install g++ $ sudo apt-get install python-dev
and

build.sh

No success :frowning:

0 Likes

#166

Are You sure this instruction is correct?
“…] go to your Packages/SublimeCodeIntel/src folder, then simply run:”

$ ./build.sh

When I run it in src folder as above, I got:
bash: ./build.sh: (no access)
When try

$ sudo ./build.sh

I got:

sudo: ./build.sh: command not found

But when try just:

$ sh build.sh

Script runs but ends with error:

cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default] ../scintilla/src/LexUDL.cxx:21:18: fatal error: pcre.h: No such file or directory compilation terminated. error: command 'gcc' failed with exit status 1

0 Likes

#167

OK, last error solved, installed this packages:

sudo apt-get install php5-dev sudo apt-get install libpcre3-dev
but still no expected results on ctrl+space :frowning:

0 Likes

#168

hi kronuz i’m running the lastest x64 dev build on win 7 x64…but since the last 2 dev build or so i can’t manage to make it working, any updates, fix or else?

ty

0 Likes

#169

[quote=“Fed03”]hi kronuz i’m running the lastest x64 dev build on win 7 x64…but since the last 2 dev build or so i can’t manage to make it working, any updates, fix or else?

ty[/quote]

I get this in my console:

Exception in thread scanning thread: Traceback (most recent call last): File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/threading.py", line 532, in __bootstrap_inner self.run() File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/threading.py", line 484, in run self.__target(*self.__args, **self.__kwargs) File "./SublimeCodeIntel.py", line 604, in _codeintel_scan File "/Users/rob/Library/Application Support/Sublime Text 2/Packages/SublimeCodeIntel/libs/codeintel2/manager.py", line 351, in buf_from_content buf = buf_class(self, accessor, env, path, encoding) File "/Users/rob/Library/Application Support/Sublime Text 2/Packages/SublimeCodeIntel/libs/codeintel2/lang_php.py", line 1168, in __init__ super(PHPBuffer, self).__init__(*args, **kwargs) TypeError: super(type, obj): obj must be an instance or subtype of type

Regards,

Rob…

0 Likes

#170

ty, but…what??? XD
can u explain me in simple words?

0 Likes

#171

any news about an update to fix the current broken plugin?

0 Likes

#172

That’s pitty that it doesn’t work on Ubuntu finally. It was the most important plugin for me to rapid coding with SublimeText :frowning:

0 Likes

#173

+1

0 Likes

#174

Is any work being done on fixing this on Ubuntu ?

0 Likes