Sublime Forum

CodeIntel ported from Open Komodo Editor

#55

This seems to work on/off for me (javascript). Is there anyway I can debug with logs or something?

0 Likes

#56

Dude. Using standart hotkeys is not good. Like <super + j> macos. I’m using it every day and I have to delete it from your plugin after every update. It’s annoying a bit. Can you do something with it?

btw, Can you share your theme for st2 and for autocomplete window from screencast, please? :smile:

0 Likes

#57

@squ1b3r, I got that super+j from the Komodo Editor, that’s the same key they use for showing the autocomplete… but we could all vote and find better key bindings (I already changed the cmd+click to alt+click for compatibility issues in ST2 too)…

The current bindings are:
cmd + j = Show CodeIntel autocomplete popup
cmd + f3 = Jump to symbol definition
alt + click = Jump to symbol definition

  • for windows and linux, the above “cmd” = “ctrl”

Regarding the color theme in the screencast, it’s based in the RailsCasts theme, and modified a bit. About the background in the autocomplete, I’m using Soda Dark theme (github.com/buymeasoda/soda-theme). I’m attaching it here for anyone who wants it :smile:

@rdougan, the logs currently are at ~/.codeintel/codeintel.log …what do you mean “on/off” ?
Kronuz.tmTheme.zip (1.99 KB)

0 Likes

#58

@Kronuz thanks man!

0 Likes

#59

@Kronuz

I’ve managed to get it working fairly well now with all your latest updates. Thank you.

Few questions:

  • Is it possible to tell it NOT to automatically scan all the files, or perhaps give it an ignore.json or something similar?
  • Can I give it a JSON file of all the available methods and their scopes? (can’t find any documentation on CodeIntel)
0 Likes

#60

I have a small problem with codeintel. Take a look here.
The thing is: i write something, the completion appear and if i continue to type something that is not in the suggested list will insert the first suggestion. Is also happen on html files.

Did i do anything wrong?
Thanks.

0 Likes

#61

I put this on the github, but figured I’d put it here in case anyone else has a similar problem. I’ve pulled the most recent version of SublimeCodeIntel from Git, and installed it. However, when ST2 opens up, the error in the console I get is:
“ImportError: Could not find a suitable _SilverCity binary for your platform and architecture.”
I tried running build.sh from the src directory, but it fails to build Scintilla with this error: pastebin.com/JNpJaAhA

Any suggestions?

0 Likes

#62

To build you need the python libraries compiled with 4bytes Unicode (check the build.sh for the exact option needed while building python) …indeed, new binaries need to be compiled for the latest version to work…

If anyone manages to compile them in any platform an architecture, please send them over so others can benefit from it. Please try to compile libpcre statically if you can. I have no access to Linux or Windows at the moment as to do so myself :frowning:

0 Likes

#63

Is there a way to remove the delay you have in this? so when I start typing no matter what it pops up? For php and css so far I’ve noticed I don’t get the dropdown until I stop typing.

0 Likes

#64

[quote=“guillermooo”]Hey Kronuz,

This looks like a fantastic package, but… I can’t make it work on Windows.

What I’ve done:

  1. Installed the packages as per your instructions
  2. Created a new folder
  3. Created a new file one.py
  4. Typed in some Python functions.
  5. Pressed super+j

The status bar reports that CodeIntel is creating the indexes, but it does so every time I press the shortcut and nothing else happens.[/quote]

[quote=“Kronuz”]@guillermooo, I have somewhat improved the loggings and fixed a couple issues. Could you please pull the latest and try again?

The indexes are saved at ~/.codeintel/db/ and there’s a log file at ~/.codeintel/codeintel.log (that gets wiped out and recreated every time you start Sublime Text).[/quote]

@Kronuz, I got the same problem as guillermooo.
I already using the lastest build from git, and i don’t find any files/folder under “.codeintel/”, except the “config” file. I have marked the “.codeintel” as not read-only already.

I am using portable build of Sublime Text 2 (tried 32 and 64bit) under Windows 7 64bit.

0 Likes

#65

Plugin aint working for me, I used git to clone it in my /Packages directory, no luck, auto-complete does not kicks off! Any ideas?

0 Likes

#66

I really need someone to compile the new binaries for Widows and Linux :frowning: …I rushed into updating some code, but now SublimeCodeIntel doesn’t work in those platforms anymore for that reason :-S …anyone willing to help us compiling those!?

0 Likes

#67

Hi, man. Just updated to your last version and got this:

Reloading plugin /Users/squ1b3r/Library/Application Support/Sublime Text 2/Packages/SublimeCodeIntel/python_codeintel.py
Traceback (most recent call last):
  File "./sublime_plugin.py", line 65, in reload_plugin
  File "./python_codeintel.py", line 86, in <module>
    from codeintel2.common import *
  File "/Users/squ1b3r/Library/Application Support/Sublime Text 2/Packages/SublimeCodeIntel/libs/codeintel2/common.py", line 76, in <module>
    import SilverCity
  File "/Users/squ1b3r/Library/Application Support/Sublime Text 2/Packages/SublimeCodeIntel/libs/SilverCity/__init__.py", line 19, in <module>
    LanguageInfo.do_registration()
  File "/Users/squ1b3r/Library/Application Support/Sublime Text 2/Packages/SublimeCodeIntel/libs/SilverCity/LanguageInfo.py", line 116, in do_registration
    import CSS
  File "/Users/squ1b3r/Library/Application Support/Sublime Text 2/Packages/SublimeCodeIntel/libs/SilverCity/CSS.py", line 42, in <module>
    class CSSHTMLGenerator(HTMLGenerator.SimpleHTMLGenerator, CSSHandler):
  File "/Users/squ1b3r/Library/Application Support/Sublime Text 2/Packages/SublimeCodeIntel/libs/SilverCity/CSS.py", line 50, in CSSHTMLGenerator
    def generate_html(self, file, buffer, lexer = CSSLexer()):
  File "/Users/squ1b3r/Library/Application Support/Sublime Text 2/Packages/SublimeCodeIntel/libs/SilverCity/CSS.py", line 26, in __init__
    _CSSLexerTemplate.__init__(self, properties)
  File "/Users/squ1b3r/Library/Application Support/Sublime Text 2/Packages/SublimeCodeIntel/libs/SilverCity/CSS.py", line 17, in __init__
    WordList(Keywords.css_properties_3),
AttributeError: 'module' object has no attribute 'css_properties_3'

os: macosx lion

0 Likes

#68

@sublimator, yes, I tried it once, but it wouldn’t work (different python versions I guess) …I might have done something wrong though.

0 Likes

#69

Is this supposed to work under Windows 7 64Bit?

0 Likes

#70

[quote=“squ1b3r”]Hi, man. Just updated to your last version and got this:

Reloading plugin /Users/squ1b3r/Library/Application Support/Sublime Text 2/Packages/SublimeCodeIntel/python_codeintel.py
Traceback (most recent call last):
  File "./sublime_plugin.py", line 65, in reload_plugin
  File "./python_codeintel.py", line 86, in <module>
    from codeintel2.common import *
  File "/Users/squ1b3r/Library/Application Support/Sublime Text 2/Packages/SublimeCodeIntel/libs/codeintel2/common.py", line 76, in <module>
    import SilverCity
  File "/Users/squ1b3r/Library/Application Support/Sublime Text 2/Packages/SublimeCodeIntel/libs/SilverCity/__init__.py", line 19, in <module>
    LanguageInfo.do_registration()
  File "/Users/squ1b3r/Library/Application Support/Sublime Text 2/Packages/SublimeCodeIntel/libs/SilverCity/LanguageInfo.py", line 116, in do_registration
    import CSS
  File "/Users/squ1b3r/Library/Application Support/Sublime Text 2/Packages/SublimeCodeIntel/libs/SilverCity/CSS.py", line 42, in <module>
    class CSSHTMLGenerator(HTMLGenerator.SimpleHTMLGenerator, CSSHandler):
  File "/Users/squ1b3r/Library/Application Support/Sublime Text 2/Packages/SublimeCodeIntel/libs/SilverCity/CSS.py", line 50, in CSSHTMLGenerator
    def generate_html(self, file, buffer, lexer = CSSLexer()):
  File "/Users/squ1b3r/Library/Application Support/Sublime Text 2/Packages/SublimeCodeIntel/libs/SilverCity/CSS.py", line 26, in __init__
    _CSSLexerTemplate.__init__(self, properties)
  File "/Users/squ1b3r/Library/Application Support/Sublime Text 2/Packages/SublimeCodeIntel/libs/SilverCity/CSS.py", line 17, in __init__
    WordList(Keywords.css_properties_3),
AttributeError: 'module' object has no attribute 'css_properties_3'

os: macosx lion[/quote]

I can confirm this error happens (on Snow Leopard, too) with the current code on GitHub.

Martin

0 Likes

#71

Same error here with osx lion using latest version from github.

0 Likes

#72

Kronuz, you don’t seem to have had much luck getting these binaries compiled for you. I’m running Win7 here and, assuming it’s a relatively easy process, will gladly compile a windows version of whatever you need. But I am in dire need of instructions, including and dependencies (linkables and also the compiler I need to use) if I’m to attempt it. And obviously based on the list of things I need I’ll be able to tell you whether I’m going to be able to help or not. Let me know, anyway.

0 Likes

#73

Windows binaries! Please :frowning: This would be so awesome!

0 Likes

#74

@squ1b3r, is that traceback from editing a css file?

@alexrussell, for the compiler you’ll need Vusual Studio (probably it can be compiled with VS express version, but I’m not entirely sure). You’ll need python with it’s libraries and headers (same version and architecture as the one binded with Sulime Text 2 for windows) and you’ll also need to compile libpcre (as a static library) since SilverCity needs to link against it. Next, doing “python setup.py build” should compile everything after going out to the console VS provides for building stuff (32 and 64 bits, depending). Please check “build.sh” which contains the steps for building stuff in Mac OS X and Linux, but I dont think I’m missing anything… except the extensions for windows libraries will be “.pyd”, not “.so”. If you can buil using this procedure, please post about it here. Consider building both 32 and 64 bits libraries if you can.

For building under Linux, you’ll have to run build.sh, but the only catch is you’ll need to compile python yourself with UCS-4 (for 4 bytes Unicode strings)… also, in Linux, you’ll also have to preferably build libpcre yourself too (as a static library) to avoid having it as an external dependency.

Please, if anyone can build these for 32 and 64 bits architectures in these platforms, it would be very much appreciated.

0 Likes