Home Download Buy Blog Forum Support

CodeIntel ported from Open Komodo Editor

Re: CodeIntel ported from Open Komodo Editor

Postby charlesroper on Wed Jun 22, 2011 8:03 am

When working with HTML things seem a bit wonkaloid. It only seems to suggest attributes that have already been applied to a tag elsewhere. So for instance, if I have <div> tags with class, id and role attributes, when I type <div I get a drop-down suggesting the class, id and role attributes. Otherwise, I don't get any suggestions.

Is that correct behaviour?

Here's a quick log of a fresh session editing an HTML5 doc

Code: Select all
Starting logging SublimeCodeIntel rev GIT-f26f633a (1308618629) on Wed Jun 22 09:05:08 2011
===========================================================================================
scan_multilang: path: u'C:\\xampp\\htdocs\\susy\\index.html'
****************************************
Finished scanning, updating all scope names
Updating all class constructor names

CodeIntel(cplns, calltips) for C:\xampp\htdocs\susy\index.html@261 [HTML]
-------------------------------------------------------------------------
codeintel:done eval: success
Autocomplete called (HTML) [cplns]
scan_multilang: path: u'C:\\xampp\\htdocs\\susy\\index.html'
****************************************
Finished scanning, updating all scope names
Updating all class constructor names
scan_multilang: path: u'C:\\xampp\\htdocs\\susy\\index.html'
****************************************
Finished scanning, updating all scope names
Updating all class constructor names
scan_multilang: path: u'C:\\xampp\\htdocs\\susy\\index.html'
****************************************
Finished scanning, updating all scope names
Updating all class constructor names

CodeIntel(cplns, calltips) for C:\xampp\htdocs\susy\index.html@261 [HTML]
-------------------------------------------------------------------------
codeintel:done eval: success
Autocomplete called (HTML) [cplns]
scan_multilang: path: u'C:\\xampp\\htdocs\\susy\\index.html'
****************************************
Finished scanning, updating all scope names
Updating all class constructor names

CodeIntel(cplns, calltips) for C:\xampp\htdocs\susy\index.html@261 [HTML]
-------------------------------------------------------------------------
codeintel:done eval: success
Autocomplete called (HTML) [cplns]
scan_multilang: path: u'C:\\xampp\\htdocs\\susy\\index.html'
****************************************
Finished scanning, updating all scope names
Updating all class constructor names
charlesroper
 
Posts: 107
Joined: Thu Feb 18, 2010 7:30 am

Re: CodeIntel ported from Open Komodo Editor

Postby Kronuz on Wed Jun 22, 2011 8:57 am

@dsarch, I fixed the issue. Please pull the latest... about pylint, you'll have to add it to your User folder I believe... or otherwise inside the "libs" directory inside SublimeLint.

@charlesroper, can you please be more specific? I couldn't get exactly what you mean...
Kronuz
 
Posts: 98
Joined: Mon Feb 14, 2011 3:14 pm

Re: CodeIntel ported from Open Komodo Editor

Postby charlesroper on Wed Jun 22, 2011 3:57 pm

@Kronuz I've created a screencast which might make it clearer:

http://dl.dropbox.com/u/256478/screenca ... 2_1625.swf

While I'm here, I have another question: how do I add support for a new syntax (SCSS)? It would basically be the same as CSS with a few extras. In fact, could I simply add the .scss extension to make CodeIntel class it as a CSS file?
charlesroper
 
Posts: 107
Joined: Thu Feb 18, 2010 7:30 am

Re: CodeIntel ported from Open Komodo Editor

Postby Kronuz on Wed Jun 22, 2011 4:58 pm

@charlesroper, I think I know what you mean now... It must be a bug or issue with the underlying autocomplete in the codeintel2 engine (that comes from Open Komodo). I'll have to look further later on, but it seems codeintel is uncapable of knowing what are the proper default attributes for div for some reason. That's a nice screencast though... could you make some more screencasts to show the whole SublimeCodeIntel functionality? (note you can add, if you haven't aready, a mouse binding so that when you command+click on a symbol (in python, or javascript or php, etc.) it takes you to the symbol definition (no matter in what file was defined). I've been wanting to have a screencast showing every feature, but I haven't had the time...

Regarding SCSS, you can get my SCSS bundle fork, and use the Syntaxes/SCSS.tmLanguage file, it gets you the syntax. It has support for the latest Scss and compass: https://github.com/Kronuz/SCSS.tmbundle ...If you want to add autocomplete for it, however, that's not as easy. You'll have to probably tweak and/or create a new SublimeCodeIntel/libs/codeintel2/lang_css.py lexer file and do more stuff... it won't be as easy because CSS doesn't use "imports" or anything but it can be done if you have the will. It would be nice to have SCSS code intelligence, finding mixins and user functions and all.
Kronuz
 
Posts: 98
Joined: Mon Feb 14, 2011 3:14 pm

Re: CodeIntel ported from Open Komodo Editor

Postby bizoo on Wed Jun 22, 2011 5:06 pm

charlesroper wrote:@Kronuz I've created a screencast which might make it clearer:

http://dl.dropbox.com/u/256478/screenca ... 2_1625.swf

While I'm here, I have another question: how do I add support for a new syntax (SCSS)? It would basically be the same as CSS with a few extras. In fact, could I simply add the .scss extension to make CodeIntel class it as a CSS file?

Nice screencast.
But I see you forgot to register your Sublime Text copy ;)
bizoo
 
Posts: 876
Joined: Wed Dec 08, 2010 6:53 am
Location: Switzerland

Re: CodeIntel ported from Open Komodo Editor

Postby charlesroper on Wed Jun 22, 2011 5:22 pm

@Kronuz The screencast was done in Jing. It's free and pretty useful. I might have a crack at doing a full one, but don't hold your breath as I'm finishing off a big project here at work (and procrastinating by visiting these forums!) :roll:

@bizoo I didn't forget. I tried to register some time ago, but Jon doesn't accept anything other than PayPal, which we can't use here because it rejects the company credit card. I'm going to have another go at some point soon, just haven't gotten around to it. :)
charlesroper
 
Posts: 107
Joined: Thu Feb 18, 2010 7:30 am

Re: CodeIntel ported from Open Komodo Editor

Postby charlesroper on Thu Jun 23, 2011 9:19 pm

@Kronuz Are you submitting pull requests back to Mario Ricalde, who is maintainer of the 'official' SCSS bundle? I see yours is derived from his, only it's not forked from his repo. Seeing as his bundle is linked from the Sass site, it would be great if your changes were added in. I had no idea your improved version existed!
charlesroper
 
Posts: 107
Joined: Thu Feb 18, 2010 7:30 am

Re: CodeIntel ported from Open Komodo Editor

Postby senzo on Fri Jun 24, 2011 10:53 am

I have the same problem as guillermooo i think. The indexing time increased very much and it takes now for about 30 min. with maximum cpu usage, only to index the dojo javascript library which is included in my project. I end up with about 1000 directories within ~/.codeintel/db/javascript and lots of performance warnings in the log file like:

JavaScript extra lib dirs: set([u'/Volumes/Some/Dir'])
event: This buffer is configured with 816 JavaScript import dirs: this may result in poor completion performance

Dojo is included as a .cix file in SublimeCodeIntel/libs/codeintel2/catalogs/dojo.cix and doesn't need to be indexed at all. In older versions of the plugin this didn't happen. Is it possible to exclude directories?
senzo
 
Posts: 106
Joined: Tue May 24, 2011 9:17 am

Re: CodeIntel ported from Open Komodo Editor

Postby Kronuz on Fri Jul 15, 2011 9:52 pm

I've worked out s few problems in SublimeCodeIntel, and new version should work a bit better. For anyone interested, get the latest from Github (http://github.com/Kronuz/SublimeCodeIntel).
Kronuz
 
Posts: 98
Joined: Mon Feb 14, 2011 3:14 pm

Re: CodeIntel ported from Open Komodo Editor

Postby senzo on Mon Jul 18, 2011 9:22 am

Nice to see you back and working on the plugin ;)

I still have the same problems with javascript. It would be nice if the automatic scanning of project folders could be optional.
senzo
 
Posts: 106
Joined: Tue May 24, 2011 9:17 am

PreviousNext

Return to Plugin Announcements

Who is online

Users browsing this forum: No registered users and 8 guests