Sublime Forum

CodeIntel ported from Open Komodo Editor

#190

[quote=“mpedrummer”]It’s the file referred to in the “Configuring” section here - github.com/Kronuz/SublimeCodeIntel

For me, it was ~/.codeintel/config - that file was empty. I just pasted the example from github in there, and it started working for me.[/quote]

You are a lucky man. I tried with the configuration file at ~/.codeintel/config, adde a config file at project .codeintel directory, to recompile plugin libraries … and nothing … just CPU at 100% and “Updating indexes for PHP…” message = (

0 Likes

#191

I’m waiting for it to break :smile:

My co-worker, who had initially gotten it to work in Ubuntu, has subsequently had it stop working. We haven’t been able to figure out why.

Oh, computers. You suck, and I love you.

0 Likes

#192

[quote=“mpedrummer”]I’m waiting for it to break :smile:

My co-worker, who had initially gotten it to work in Ubuntu, has subsequently had it stop working. We haven’t been able to figure out why.

Oh, computers. You suck, and I love you.[/quote]

Noooooooo!!! You are my only hope!!! :cry:

0 Likes

#193

OK, here’s a hint maybe - we got his working again, though it took deleting as much evidence that Sublime had ever existed as we could find :smile:

At some point, he had moved the directory that contained the executable into .config/sublime-text-2, which turned out to be a horrible idea.

After reinstalling, he ran the build.sh that comes with SublimeCodeIntel, and it works!

0 Likes

#194

Hello!

I’ve got some problem with this package.

What I’ve done:

  1. Installed the packages
  2. Created a new folder
  3. Created a new file test.rb
  4. Typed in some Ruby class
class Test
end
  1. Pressed super+j

In ~/.codeintel/codeintel.log I see

Updating indexes for 'Ruby'... The first time this can take a while. Doing CodeIntel for 'Ruby' (hold on)... eval 'Test' at test.rb#6 <Trigger 'ruby-defn-defn' at 37 (explicit)> Unexpected error with evaluator: 'Test' at test.rb#6 Traceback (most recent call last): File "/Users/andrew/Library/Application Support/Sublime Text 2/Packages/SublimeCodeIntel/libs/codeintel2/tree.py", line 328, in eval defns = self.eval_defns() File "/Users/andrew/Library/Application Support/Sublime Text 2/Packages/SublimeCodeIntel/libs/codeintel2/tree_ruby.py", line 293, in eval_defns self._base_scoperefs = self._calc_base_scoperefs(start_scoperef) File "/Users/andrew/Library/Application Support/Sublime Text 2/Packages/SublimeCodeIntel/libs/codeintel2/tree_ruby.py", line 305, in _calc_base_scoperefs scoperefs = [curr_scoperef, (self.built_in_blob, [])] File "/Users/andrew/Library/Application Support/Sublime Text 2/Packages/SublimeCodeIntel/libs/codeintel2/tree_ruby.py", line 965, in built_in_blob if isinstance(self.libs-1], StdLib): File "/Users/andrew/Library/Application Support/Sublime Text 2/Packages/SublimeCodeIntel/libs/codeintel2/tree_ruby.py", line 155, in libs self._libs = self.langintel.libs_from_buf(self.buf) File "/Users/andrew/Library/Application Support/Sublime Text 2/Packages/SublimeCodeIntel/libs/codeintel2/lang_ruby.py", line 323, in libs_from_buf libs = self._buf_indep_libs_from_env(env):] File "/Users/andrew/Library/Application Support/Sublime Text 2/Packages/SublimeCodeIntel/libs/codeintel2/lang_ruby.py", line 444, in _buf_indep_libs_from_env = self._ruby_info_from_ruby(ruby, env) File "/Users/andrew/Library/Application Support/Sublime Text 2/Packages/SublimeCodeIntel/libs/codeintel2/lang_ruby.py", line 355, in _ruby_info_from_ruby p = process.ProcessOpen(argv, env=env.get_all_envvars(), stdin=None) AttributeError: 'module' object has no attribute 'ProcessOpen' done eval: eval error

I’ve tried other languages (e. g. Python) but I got similar errors.

0 Likes

#195

We are working on v2.0 of SubimeCodeIntel, available at github.com/Kronuz/SublimeCodeIn … evelopment (development branch). This should fix many of the bugs that were there (making it slow and making CPU usage go crazy for too long)… please if anyone’s willing, I’d appreciate any feedback.

We need suggestions for proper and working key and mouse bindings for “jump to definition” (currently alt+click) and the autocomplete popup manual trigger. Any thought would be welcome.

0 Likes

#196

[quote=“Kronuz”]We are working on v2.0 of SubimeCodeIntel, available at github.com/Kronuz/SublimeCodeIn … evelopment (development branch). This should fix many of the bugs that were there (making it slow and making CPU usage go crazy for too long)… please if anyone’s willing, I’d appreciate any feedback.

We need suggestions for proper and working key and mouse bindings for “jump to definition” (currently alt+click) and the autocomplete popup manual trigger. Any thought would be welcome.[/quote]

that’s a REAL good news!!!

0 Likes

#197

Indeed!!

0 Likes

#198

Awesome! Looking forward to it. Thanks!

0 Likes

#199

The development version does not work on my computer (Ubuntu Linux 12.04 kernel 3.2.0-26-generic x86_64).

I’ve done this:

When I try to go to the definition of an element with CTRL+SUPER+ALT+UP nothing happens. Neither pressing SHIFT+CTRL+SPACE to autocomplete.

I tried recompiling libraries at ~/.config/sublime-text-2/Packages/SublimeCodeIntel/src/ but nothing new happens.

The file ~/.codeintel/codeintel.log:

Starting logging SublimeCodeIntel rev GIT-unknown (1341919357) on Wed Jul 11 09:06:22 2012
==========================================================================================
+ Info: Invalid language: Plain text. Available: JavaScript, Mason, XBL, XUL, RHTML, SCSS, Python, HTML, Ruby, Python3, XML, XSLT, Django, HTML5, Perl, CSS, PHP, Less, Smarty, Node.js, Tcl, TemplateToolkit, Twig
+ Info: processing `PHP': please wait...
Updating indexes for 'PHP'... The first time this can take a while.
+ Info: processing `PHP': please wait...
Doing CodeIntel for 'PHP' (hold on)...
unknown UDL-based XML completion: <built-in function id>
done eval: error
Done 'PHP' CodeIntel! Full CodeIntel took 24ms
Updating indexes for 'PHP'... The first time this can take a while.
Doing CodeIntel for 'PHP' (hold on)...
unknown UDL-based XML completion: <built-in function id>
done eval: error
Done 'PHP' CodeIntel! Full CodeIntel took 32ms
0 Likes

#200

I’m in the same situation as xavi above. I installed via git, but the result is the same.

0 Likes

#201

CodeIntel just doesn’t work on Win7. Not sure what the deal is… :frowning:

0 Likes

#202

Yeah I’ve burnt alot of time with this one over the last weekend.

Its patchy inconsistent and since I’m on the win7x64 side of things I’m finding most input is “huh works for me you must be dumb or something…” not so helpful. and many answers on here are from other platforms so sifting this info to determine whats useful is quite hard work.

I have found that with in config files the newer:

{
	"Python": 
	{
		"python": '%ProgramFiles(x86)%/Autodesk/Maya2012/bin/mayapy.exe',
	    "env": 
	    {
        	"PYTHONPATH":'%ProgramFiles(x86)%/Autodesk/Maya2012/bin/python26.zip:$PYTHONPATH',
		
        }
	}
}

On winx64 just does not work.
Does not work with explicit paths, does not work with native envVars, although I don’t know if it should?
It also does not work with python packaged in .zip, should it? who knows… be nice if it did mind.
Nor does it work with an extracted typical installation of python i.e. c:/Python26/
at least in my experience

However the older:

[code]{
“Python”:
{
“python”: “C:/Python26”,

    "pythonExtraPaths":
    
        "C:/Data/PythonProjects/homeProjects"
    ]
    
    // "env": 
    // {
    //     "PATH":"C:/Python26:C:/Data/PythonProjects/homeProjects",
    //     "PYTHONPATH":"C:/Python26: C:/Data/PythonProjects/homeProjects"
    // }
    
}

}[/code]
seemed to work more reliably, however more reliable in the sense that some .py files in the same project work and complete quite nicely and gave me quite a chill a thing of beauty and so much promise, yet another file in the same project in the same directory would not complete anything at all, most frustrating! yes I have been blowing away the db files and rebuilding between each alteration test cycle to see what changes.

I am unsure if comments in code blocks above cause failure?
I am unsure if the “env” settings can even be put in the config files? I did try… no gravy…

the:
“python”: “C:/Python26”
forces it to use the specified python version which is nice otherwise it seems to find python in system paths somewhere, not sure where it gets them from the registry as that was the only place I found an entry for my local x64Python version at one point, I don’t have PYTHONPATH and PATH pointing to installations on my machine. Any more checking is probably going to be a debugging and dissection session.

I have found I only get db files in the:
C:/Users/user/.codeintel/db
and not in the:
C:/Data/PythonProjects/myProjects/.codeintel/db
even though I have configs there I don’t know if I should…

I would like to see :
PYTHONPATH : “path…”, “path…”]
rather than :
PYTHONPATH : “C:/Python26: C:/Data/PythonProjects/homeProjects:$PYTHONPATH”
as its far easier to deal with.

and that $PYTHONPATH is it accessing the current system PYTHONPATH, is that consistent for all platforms, what is it doing?

All the apparently stupid questions I’m asking really need documentation to assist this tool(me and CodeIntel), sometimes you have to over communicate stuff that may seem really obvious, when to some its really not.
If I could get some sort of consistency I’d be quite happy to use it, its got so much potential and is really nice… when it works!

But really as a result of the experience I’ve gone back to WINGIDE as it just works… and the auto-complete and the debuggers are really something I need for speed whilst working in a development environment.
But I am using Sublime more and more for general stuff replacing a stack of other editors that all have bits of things that are really useful that sublime has or as I figure it out I can probably add.

0 Likes

#203

I am having problems with CodeIntel. First I install the version on Package Control but due to the poor performance with automatic popup, I removed and update to the development version. Now I cannot get it to work, just

[code]+ Info: processing `PHP’: please wait…
Doing CodeIntel for ‘PHP’ (hold on)…
unknown UDL-based XML completion:
done eval: error
Done ‘PHP’ CodeIntel! Full CodeIntel took 15ms

  • Info: processing `PHP’: please wait…
    Doing CodeIntel for ‘PHP’ (hold on)…
    done eval: success[/code]
    Don’t know how to get to work.
0 Likes

#204

I’ve just installed SublimeText 2, and the codeIntel package, in a Php environment, and, it’s building indexes for about 2h30.
Hope it’s not a bug, but it’s damn long.

I’m trying to get rid of eclipse (way too heavy for me)

0 Likes

#205

hi, could you help me to correctly configure plugin for the development in php?
is installed on a osx
Thks

0 Likes

#206

CodeIntel’s one of those plugins you just have to learn to appreciate when it actually works and ignore when it doesn’t. If having it working consistently is a dealbreaker for you, you might be better off looking at other editors/IDEs. Don’t get me wrong though, I understand why you’d be annoyed: ST evangelists have a habit of boasting about its code completion capabilities, often entirely neglecting to mention that it’s dependent on a plugin which is currently mediocre on a good day.

I’m not saying CodeIntel’s badly done - it’s the best there is at what it does - but it just has a long way to go.

I don’t personally rely on it because I can’t get it setup stably on Ubuntu 11.04 x86 or Windows 7 x64. The languages I use most are either not supported or have much more reliable alternatives. C++, Java and C# all have their own pretty dependable plugins and completions for web languages like JS and PHP can be achieved well enough with packages like AndyJS and AndyPHP. Python - if you’re into that kind of thing - has SublimeRope and PyTags. Really it’s only a handful of languages that have absolutely no alternatives.

0 Likes

#207

In order to view code hints/lists, make sure that you are setting the file’s syntax. To do this, just go to command palette and type Set and you should get a slew of scripting languages.

0 Likes

#208

Im using archlinux (which uses python 2.7) how can i build these binaries here ? get-vidmate.com instasave

0 Likes

#209

If you’re looking for code intelligence in Sublime, I would recommend giving LSP a try,

0 Likes