Sublime Forum

CodeIntel ported from Open Komodo Editor

#51

@nerdshark, Jon just hinted me about what the problem is… it seems it’d be fixed if you install libpcre… since it’s a dependency at the moment.

0 Likes

#52

I DO have it installed. The problem is that it looks for a specific version of pcre (libpcre.so.3), rather than one without the version in the filename (libpcre.so). Changing that should make everything hunky-dory.

0 Likes

#53

@nerdshark, could you try making a symbolic link called libpcre.so.3 to libpcre.so or whatever version you have (hopefuly it’ll work)… and please, let me know if it does work. :smile:

0 Likes

#54

Yes, I tried that and it works. Created the symlink from /usr/lib/libpcre.so to /usr/lib/libpcre.so.3 fixes the issue. Now all that needs to be fixed is how the library is being built so that it links against libpcre.so rather than libpcre.so.3

0 Likes

#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