Giter VIP home page Giter VIP logo

codecomplice's Introduction

CodeComplice

This Project started as a fork of the SublimeCodeIntel plugin. I invested months of work to improve and refine the plugin and I intend to keep on doing so! If you're coming from the original SublimeCodeIntel, take a close look at the Configuring section below!


Based on the open-source Code intelligence from Open Komodo Editor.

Supported languages for Code Intelligence (CIX, CodeIntel2):

Go
Python
Python3
Django
PHP
Perl
Ruby
JavaScript (Node.js basics)
CSS, SCSS, Sass

other languages ported from Komodo but not revised:

HTML, HTML5, Mason, RHTML, Smarty, Tcl, TemplateToolkit, Twig, XBL, XML, XSLT, XUL

Provides the following features:

  • Jump to Symbol Definition - Jump to the file and line of the definition of a symbol.
  • Imports autocomplete - Shows autocomplete with the available modules/symbols in real time.
  • Function Call tooltips - Displays information in the status bar about the working function.

Plugin should work in all three platforms (MacOS X, Windows and Linux).

Installing

  1. Open command pallet (default: ctrl+shift+p)
  2. Type package control install and select command Package Control: Install Package
  3. Type complice and select "CodeComplice"

Without Git: Download the latest source from GitHub and copy the whole directory into the Packages directory.

With Git: Clone the repository in your Sublime Text Packages directory, located somewhere in user's "Home" directory::

git clone git://github.com/spectacles/CodeComplice.git

The "Packages" packages directory is located differently in different platforms. To access the directory use:

OS X:
Sublime Text -> Preferences -> Browse Packages...
Linux:
Preferences -> Browse Packages...
Windows:
Preferences -> Browse Packages...

Using

  • Start typing code as usual, autocomplete will pop up whenever it's available. CodeComplice will also allow you to jump around symbol definitions even across files with just a click ..and back.

    For Mac OS X:

    • Jump to definition = Control+Click
    • Jump to definition = Control+Command+Alt+Up
    • Go back = Control+Command+Alt+Left
    • Manual Code Intelligence = Control+Shift+space

    For Linux:

    • Jump to definition = Super+Click
    • Jump to definition = Control+Super+Alt+Up
    • Go back = Control+Super+Alt+Left
    • Manual Code Intelligence = Control+Shift+space

    For Windows:

    • Jump to definition = Alt+Click
    • Jump to definition = Control+Windows+Alt+Up
    • Go back = Control+Windows+Alt+Left
    • Manual Code Intelligence = Control+Shift+space

Don't despair! The first time you use it it needs to build some indexes and it can take more than a few seconds.

It just works!

Configuring

Basic settings can be configured in the User File Settings.

All settings can be overridden in the *.sublime-project file under the value "codeintel_settings". For Example::

{
    "codeintel_settings":
    {
        "codeintel_database_dir": "~/.codeintel/databases/myProject",
        "codeintel_language_settings":
        {
            "JavaScript": {
                "codeintel_scan_files_in_project": true,
                "codeintel_scan_exclude_dir": ["/min/"]
            }
        }
    }
}

If you put this in your *.sublime-project file, the codeintel-machine will use the given directory as its database, scan the project folders for JavaScript source files but exclude paths that somehow match with the regular expression "/min/"

To define settings specifically for a language, use the "codeintel_language_settings" setting. Example::

{
    "codeintel_settings":
    {
        "codeintel_language_settings":
        {
            "PHP": {
                "php": '/usr/bin/php',
                "phpConfigFile": 'php.ini',
                "codeintel_live": true
            },
            "Perl": {
                "perl": "/usr/bin/perl",
                "codeintel_tooltips": "popup"
            },
            "Ruby": {
                "ruby": "/usr/bin/ruby",
                "codeintel_word_completions": "buffer"
            },
            "Python": {
                "python": '/usr/bin/python',
                "codeintel_scan_extra_dir": ["dir/one", "dir/two"]
            },
            "Python3": {
                "python3": '/usr/bin/python3',
                "codeintel_selected_catalogs": ["PyWin32"]
            }
        }
    }
}

This is an extreme example, but should give you an impression of the flexibility of the language settings.

For adding additional library paths (django and extra libs paths for Python or extra paths to look for .js files for JavaScript for example), either add those paths as folders to your project, use the "codeintel_scan_extra_dir" setting. It is recommended to configure this setting on a "per-language" basis, as a great number of import dirs will slow down the autocompletion process.

Do NOT edit the default CodeComplice settings. Your changes will be lost when CodeComplice is updated. ALWAYS edit the user CodeComplice settings by selecting "Preferences->Package Settings->CodeComplice->Settings - User". Note that individual settings you include in your user settings will completely replace the corresponding default setting, so you must provide that setting in its entirety.

Available settings:

  • Information for all possible settings is available in the CodeComplice.sublime-settings file in the package.

Troubleshooting

To force re-indexation of the code intelligence database you need to follow these steps:

  • Close Sublime Text

  • Open a terminal or navigate through your directories to find the database directory (default:~/.codeintel) that contains codeintel.log, VERSION and the directory db. In Windows, this should be at %userprofile%\.codeintel.

  • Delete the whole directory and all of its content.

  • Start Sublime Text and enjoy a clean re-indexing!

What's New

v1.1.2 (2015-03-09):

  • fix Ruby support and Rails catalog

  • improve working with very large buffers (>10000 lines)

  • PHP: fix goto_defn of extended class, if interface is also implemented

  • JS: improve jQuery catalog with Deferred, Promise and jqXHR objects

v1.1.1 (2015-02-18):

  • zipping stdlibs, reducing plugin size by 2/3.

  • JavaScript: adjust minimal trigger length from 4 to 3 chars.

  • remove extensive JavaScript info logging -> speedup

  • separate trigger_types in JavaScript -> speedup

  • fix doublettes in JavaScript calltips

v1.1.0 (2015-02-15):

  • added support for golang. ported from komodo-go

  • avoid unnecessary trigger evaluation this will be a appreciable speedup on older systems

v1.0.6 (2015-02-11):

  • this is now working

  • Python Trigger complete-local-symbols (the full way, not the SublimeCodeIntel way!)

  • usability tweaks

License

The plugin is based in code from the Open Komodo Editor and has a MPL license.

Ported from Open Komodo by German M. Bravo (Kronuz).

Uses CSS from Intellitip under the MIT License.

codecomplice's People

Contributors

rmccue avatar spectacles avatar wizza-smile avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

codecomplice's Issues

ST3 build 3088 update

There seems to be a problem with CodeComplice on ST3 build 3088,
I'm getting lots of: (on startup)

Traceback (most recent call last):
  File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 272, in on_modified
    callback.on_modified(v)
  File "C:\Users\CZR\AppData\Roaming\Sublime Text 3\Packages\CodeComplice\CodeComplice.py", line 1516, in on_modified
    sublime_scope = getSublimeScope(view)
  File "C:\Users\CZR\AppData\Roaming\Sublime Text 3\Packages\CodeComplice\CodeComplice.py", line 416, in getSublimeScope
    return view.scope_name(pos)
  File "C:\Program Files\Sublime Text 3\sublime.py", line 737, in scope_name
    return sublime_api.view_scope_name(self.view_id, pt)
UnicodeDecodeError: 'utf-8' codec can't decode bytes in position 18-19: invalid continuation byte

Tried to do some digging, turns out it could be a bad encoded .py file ? Of course I checked some, but all seem encoded UTF-8 (which is ok)

Win 8.1 x64, ST 3 3088, CodeComplice 1.1.3 (installed from GIT, not package manager).
Everything was fine untill the recent ST update.

Current status:

  • Autocomplete still works with proper function definition BUT, code_intel_auto_complete command stopped working, giving errors like:
+ Warning: evaluating 'numberFormat' at ajax_form.php#8: could not resolve first part of 'numberFormat'
evaluating 'numberFormat' at ajax_form.php#8: could not resolve first part of 'numberFormat'

(tested custom function numberFormat() for above example)

Scan documented properties like "Products[]"

/**
 * @property Order[] $orders
 */
class User extends ActiveRecord {
    public function getOrders() {
        return $this->hasMany(Order::className(), ['user_id'=>'id']);
    }
}

The code above works in client code like:

$user = User::findOne($id);
$user->order[0]->(some Order methods or properties)

because of magic getter method.

SublimeCodeIntel and SublimeCodeIntel3 scaned all doc blocks properties and give me tooltip like property name, but now, after i install today CodeComplice and clean up index, it's broke!

Also i don't see anymore some tooltips if i type something like this:

$user->orders[0]->prod

it's must to complite like products because Account class have @property Product[] $products in doc block

How to add my custom CIX file for a given library ?

I have created successfully a custom auto-complete catalog for a library X(JavaScript language),
i've tried to put it on its own file for organisation purposes :

...CodeComplice/libs/codeintel2/catalogs/customX.cix

i've also tried to add it to CodeComplice.sublime-settings under :
JavaScript.codeintel_selected_catalogs alongside with jQuery

"JavaScript": {
            "codeintel_scan_extra_dir": [],
            "codeintel_scan_exclude_dir":["/build/", "/min/"],
            "codeintel_scan_files_in_project": false,
            "codeintel_max_recursive_dir_depth": 2,
            "codeintel_selected_catalogs": ["jQuery","customX"]
},
...

But it is not working, and it works only if i put the entire custom library definition inside the JavaScript catalog located in :

...CodeComplice/libs/codeintel2/stdlibs/JavaScript.cix

Notice : I asked this question already at SublimeCodeIntel and got no answer.
Any help or suggestions would be more than appriciated and thank you.

.sublime-completions disabled when CodeComplice is present

Hi,

I've noticed that if I have installed CodeComplice and completions package, e.g. "PHP Completions Kit", these completions are not appearing in Sublime's standard autocomplete (Ctrl+Space).
I like to use this package because these completions are not included in PECL catalog.

When I remove CodeComplice completely from Packages folder, PHP Completions become available.

It seems that it does not matter if I remove PHP from codeintel_enabled_languages or set codeintel setting to false.

Can this issue be resolved in some simple way?

CSS tooltips doesn't work?

When I write ( | is cursor position ) in CSS file:

position: | 

and press to show autocomplete ( ctrl + shift + space ) - nothing display...
When I press space + shift, they display options (relative, fixed, absolute etc.)

In the other side, when I have code in HTML/PHP file:

<div class="some-class" | >

the tooltip display (attributes) when I press ctrl + space or ctrl + shift + space...

Plugin doesn't work now...

The tooltip doesn't wan't to display...

  • I try to delete the .codeintel folder
  • I try the plugin on fresh ST installation (only ST + CodeComplice)
    When I try to 'run' autocomplete (ctrl + shift + space) in console I have:
    processing `JavaScript': please wait...
    current triggername: 'javascript-complete-object-members'
    end nothing happens....

Edit.
I downloaded the version 1.1.0 from releases, and they work OK - the 1.1.1 version not
Testes on ST 3 Build 3070

PHP Trait doesn't work

When I try to ctrl+click on a class Trait, I get this error:

evaluating 'Authenticatable' at User.php#13: could not resolve first part of '\Illuminate\Auth\Authenticatable'

From what I can see it get the right namespace and name, but it can't open it.

codeintel_scan_exclude_dir does not seem to work

I tried this :
"codeintel_scan_exclude_dir":["/build/", "/min/","/node_modules/","_doc","output","/^/"],
in javascript, but when I try to navigate to a symbol that is defined in multiple places, I get the wrong one (in an excluded path). A quick scan of the code seems to indicate that the setting is not used
and, while we are at it, what is the format expected here ? is it regular expression ? if yes,
does "/" signify the opening delimiter, or a "path" character ?

[Bug] Goto Definition class extended

@wizza-smile
I prefer to use CodeComplice Goto Definition, (goto_python_definition command) than ST Goto Definition.
Today i catch a bug while go to definition of class Extended.
Select Collection and choose Jump to Symbol Definition context menu, instead of open Collection class, it open SesssionInterface file.

class Session extends Collection implements SessionInterface
{
}

Please resolve this

Indexing exception

On update index i got follow exception:

Exception! /var/www/gui/public/js/services/UsersService.js:328 (JavaScript)
Traceback (most recent call last):
  File "/home/alex/.config/sublime-text-3/Packages/CodeComplice/CodeComplice.py", line 906, in get_trg
    trg = getattr(buf, type, lambda *a: None)(*args, **kwargs)
  File "/home/alex/.config/sublime-text-3/Packages/CodeComplice/libs/codeintel2/buffer.py", line 208, in preceding_trg_from_pos
    return self.langintel.preceding_trg_from_pos(self, pos, curr_pos, trigger_type=trigger_type)
  File "/home/alex/.config/sublime-text-3/Packages/CodeComplice/libs/codeintel2/lang_javascript.py", line 580, in preceding_trg_from_pos
    DEBUG=DEBUG)
  File "/home/alex/.config/sublime-text-3/Packages/CodeComplice/libs/codeintel2/langintel.py", line 492, in preceding_trg_from_pos
    trg = buf.trg_from_pos(p, implicit=False, trigger_type=trigger_type)
  File "/home/alex/.config/sublime-text-3/Packages/CodeComplice/libs/codeintel2/buffer.py", line 175, in trg_from_pos
    return self.langintel.trg_from_pos(self, pos, implicit, type=trigger_type)
TypeError: trg_from_pos() got an unexpected keyword argument 'type'
+ Info: Error indexing! Please send the log file: '/home/alex/.codeintel/codeintel.log

this happens not only with JS, with PHP i have same problem

Worse-than-useless popup question

On first run, CodeComplice prompted me with the following message in a modal dialog:

An existing Python rule definition exists, and codecomplice wants to overwrite it with its own version. Is that okay?

How the ---- am I supposed to know how answer this question? What rule is it replacing? What is it to be replaced with? What is a rule? I can't actually view the file that it intends to modify because the modal dialog is preventing me from using my text editor. I have to decide right now with absolutely no context, no clear way to undo my decision, and in fact no way to even go in after-the-fact and figure out what I lost.

This is not helpful.

Params not showing after using tab

When I use tab to complete a method name, then the params only show if I use the ctrl+shift+space shortcut. If I manually type the brackets or put the cursor there, they show automatically.

Sublime Dev Build 3111+ Not Working

Is anybody else having problems with CodeComplice indexing projects after updating Sublime Text to a dev build greater then version 3111?

Index updating

i have index updating every time when i write some Ruby(Rails) code like ActiveRecord::
Because of that i should waiting a while(10-20 seconds) before tooltip show me suggestions

Provide more information

More like a question than an issue, but I wondered whether it was possible to provide more information around the completion text, things like:

  • documentation present above the method (code documentation)
  • method signature
  • Object this method comes from
  • line in code

This information would really help providing context and (at times) choosing the right completion.

Coffeescript?

Hi! First of all, excited to see more code intelligence plugin development.

I'm struggling to find Coffeescript codeintel support.

CoffeeComplete Plus technically works. The problem is it's abandoned and has glaring bugs that make it mostly unusable. Though, that plugin seems to literally be the best chance at codeintel autocompletion for CS across IDE's like; Visual Studio, Komodo, Webstorm, Light Table, Atom. They all don't support it in any capacity.

Is there something about Coffeescript that makes it difficult to build this kind of functionality for? It seems to be rather popular otherwise (eg. Atom).

Relates to SublimeCodeIntel/SublimeCodeIntel#87

I never see manual autocompletion

I never see manual autocompletion (ctrl + shift + space).
I remove .codeintel/ + sublime code intel plugin ... and install your plugin ...

Can you help me?

EDIT: after updating index (10 min indexing / medium project is working).... My mistake.

Advantage: is fast against last update CodeIntel ;).

Improve to future - better PHP code intelisense ... it´s little tragedy in comparing with PHP IDE (ie: PHP Storm , PHP Designer etc.)

See screenshot:
http://files.rjwebdesign.cz/i/20150213-142547---532x190---%25t---%25pn.png

Im looking for some CONSTANTS from Form object .. nothing given.

[Request] Autocomplete when implements an interface, abstract methods

Hi

  1. Sometimes i extends an abstract class or implements an interface eg \ArrayAccess. The Interface require implements methods offsetGet, offsetSet..etc.
    Could you tell CodeComplice auto implements the methods ?
  2. previous version, you implemented __construct, __destruct methods, but still missing dynamic method __get, __set.

Getting 'could not resolve first part of' Error

I just did a clean install of ST3 - as I restalled my favorite plugins, I installed SublimeCodintel first (before I found this repo) -- then when tested the functionality using ALT-CLICK on a function name in PHP, I recieved this at the console:

Updating indexes for 'PHP'... The first time this can take a while.
Doing CodeIntel for 'PHP' (hold on)...
current triggername: 'php-defn-defn'
Done 'PHP' CodeIntel! Full CodeIntel took 304ms

**+ Warning: evaluating 'add_theme_support' at functions.php#18: could not resolve first part of 'add_theme_support'**

After searching for a bit I found this repo, and decided to switch (as recommended) to see if this would address the problem. Its the same thing with CodeComplice.

I also deleted all of the data in %userprofile%\.codeintel and restarted ST3, tested again as advised. Same error. Thoughts? Thanks

Ruby autocompletion don't work

There is no autocompletion at all.

When i typing 1. i want to see all methods like abs, abs2, ago, etc... But i need to trigger this manually.

Autcomopletetion work if i start typing first letters of method e.g. Time.n, but tooltip also offers me none Time object methods or functions, like this:

    Time.namespace :say_controller do

    end

Time don't have namespace method at all. It's a cross-language bug of plugin.

Also, when i typing chaining method calls, completion dosen't work, even manual, e.g. i have expression 1.hour.from_now, i'm expect some completion when i type 1.hour.f(hour is a method, not property)

Scan documented properties.

In this https://github.com/yiisoft/yii2/blob/master/framework/web/Application.php \yii\web\Application class we have documented properties like $session and $user, now i dont have compeltions in tooltip after Yii::$app-> like session or getSession(). I think this because in https://github.com/yiisoft/yii2/blob/master/framework/BaseYii.php BaseYii class we have:

    /**
     * @var \yii\console\Application|\yii\web\Application the application instance
     */
    public static $app;

There is 2 different classes. And i think plugin scan the first, when it should to scan both.

Also in https://github.com/yiisoft/yii2/blob/master/framework/base/Application.php \yii\base\Application class we have a lot of documented magic properties, but tooltip offers only methods.

This is strange, because after "codeintel_framework_compat_mode": true that setting all works fine, until this moment. Maybe plugin stopped read user defined settings?

Error when processing `Python': please wait...

I installed via Package Control

When I Ctrl+Click on a name I see this in the console and nothing else happens:

+ Info: processing `Python': please wait...
processing `Python': please wait...
No handlers could be found for logger "process"
/Users/anentropic/Library/Application Support/Sublime Text 2/Packages/CodeComplice/libs/codeintel2/lang_go.py:16: UserWarning: Unable to import zope.cachedescriptors.property
  warnings.warn("Unable to import zope.cachedescriptors.property")
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 "./CodeComplice.py", line 846, in _codeintel_scan
RuntimeError: Must call on main thread, consider using sublime.set_timeout(function, timeout)

Only autocomplete matching types

Given I have a function foo() that accepts a string, doing the below should only auto complete strings (or maybe there should atleast be an option to).

$bar = 123;
$foo = "123";

foo( $ ); // should only show a completion for $foo, as $bar is of type int

I tried to dig into the code to accomplish this - however I got pretty lost! It seems codeintel2 can resolve the type from a variable, for example, $a = new Query(); $a-> // will show completions from Query however in the case of autocompletions the autocompletions for current scope doesn't seem to return type information, hence the information at that point is lost.

"Could not complete last request in time" error

Doesn't work for me. Here's a console dump:

Done 'PHP' CodeIntel! Full CodeIntel took 44ms
Doing CodeIntel for 'PHP' (hold on)...
current triggername: 'php-complete-functions'
+ Event: Adding php-5.5 stdlib
Adding php-5.5 stdlib
+ Info: Could not complete last request in time!
Could not complete last request in time!

Not select text inside a tag

The problem appears when I established CodeComplice. When I delete CodeComplice, the problem isn't present. Thanks.

Summary

Bug to

{ "keys": ["ctrl+shift+a"], "command": "expand_selection", "args": {"to": "tag"} },

Expected behavior

Select text inside a tag

Actual behavior

Occurs nothing

Steps to reproduce

Ctrl+Shift+A:

key evt: shift+control+a
command: expand_selection {"to": "tag"}
Traceback (most recent call last):
  File "E:\Sublime Text 3\sublime_plugin.py", line 231, in run_callback
    expr()
  File "E:\Sublime Text 3\sublime_plugin.py", line 314, in <lambda>
    run_callback('on_selection_modified', callback, lambda: callback.on_selection_modified(v))
  File "E:\Sublime Text 3\Data\Packages\CodeComplice\CodeComplice.py", line 1598, in on_selection_modified
    rowcol = view.rowcol(view_sel[0].end())
  File "E:\Sublime Text 3\sublime.py", line 538, in __getitem__
    raise IndexError()
IndexError

Environment

  • Operating system and version:
    • [√] Windows 10 Education
    • Mac OS ...
    • Linux ...
  • Sublime Text:
    • Build 3114

Timeout while resolving completions

Hello there,

When I'm working with somewhat bigger code base, it's easy to cause a timeout.
Even after I excluded framework and all external libraries there's still chance to make the script timeout.

I suggest that timeouts should be configurable.

Menu disabled

Menus are disabled after installing the package (ST3 build 3143)

Preference menu after installing CodeComplice
Preference menu after installing CodeComplice

Right clic on folder after installing CodeComplice
Right clic on folder after installing CodeComplice

Adding CodeComplice to ignored_packages
Adding CodeComplice to ignored_packages

Preference menu after disabling CodeComplice
Preference menu after disabling CodeComplice

Right clic on folder after disabling CodeComplice
Right clic on folder after disabling CodeComplice

Is there support for auto-completion from a parent class?

I mean, is this feature even presumed?

Let say, I have a base class:

class ABook
{
    const TYPE_NOVEL = 'novel',
    const TYPE_USER_MANUAL = 'manual';
    const TYPE_COLORING_BOOK = 'coloring';
    // ...
}

Then, in another file, I want to reference one of those constants:

class UsedBook extends ABook {
    // ...
    if ($this->type == self::TYPE_ /// <<< here, I need a list of all available types to be suggested

Split efforts and split community is being generated

I strongly believe this should not be happening. A lot of users are already using SublimeCodeIntel and this is a fork of the same project. I do think your new additions and your efforts are great @wizza-smile, and I still don't see what is the purpose of forking an already well established project with a very large userbase instead of directly contributing to it.

It is my believe that forking a project should not happen except under plea of dire necessity and with very strong justification; i.e., only when goals are very different, when people with commit access (core developers) don't accept features or patches from contributors, if core developers themselves cannot agree in what direction to go, or if core developers reject direction or use cases the community members want. None of the above is true in this case, and stating "competition" as an argument is not enough reason to split efforts for me.

The goals and roadmap I wanted for SublimeCodeIntel can be delayed/changed and put on the table for discussion, I'm a reasonable man; and the least I want is to hurt the project or see the userbase confused about what to use. For everyone's sake, I'd rather step down the project if my efforts are no good enough for the community.

If your concerns are that you want to be able to release new versions and have a big saying in what the direction of the project is, you are more than welcome to join the SublimeCodeIntel organization as a maintainer. We need all the help we can get and someone interested as you are and with the skills you have would allow for a faster growing project with more ambitious and bigger goals.

I propose we talk and build a roadmap and join efforts to find help getting the project's goals fulfilled. I hereby formally extend an invitation to join efforts instead of diverging them.

[Bug] Go Definition

I don't remember when the issue starts occured, but today i try to use GoTo Definition of CodeCompilce to go to a method in current class, but it does not work.

This is error log:

Exception in thread scanning thread:
Traceback (most recent call last):
  File "./threading.py", line 901, in _bootstrap_inner
  File "./threading.py", line 858, in run
  File "/Users/ptcong/Library/Application Support/Sublime Text 3/Packages/CodeComplice/CodeComplice.py", line 869, in _codeintel_scan
    buf.scan(mtime=mtime, skip_scan_time_check=is_dirty)
UnboundLocalError: local variable 'mtime' referenced before assignment

I just check the CodeComplice.py, and it seem does not define mtime variable if is_dirty = false

Change ctrl-click assignment

Is it just me or contextual menu is no longer available after installation of CodeComplice ?

How can I change the "Jump to definition" key ?

Self reply: found it in the Default (OSX).sublime-mousemap

This should not be the default behaviour, imho. Still posting the issue in case it helps someone

tree.py 55.line problem

Roaming\Sublime Text\Packages\CodeComplice\libs\codeintel2\tree.py:55: UserWarning: Not using codeintel's patched elementtree: this may cause problems
warnings.warn("Not using codeintel's patched elementtree: "
reloading settings Packages/User/Preferences.sublime-settings

Does "codeintel" setting work?

I would like to disable CodeComplice by default (in "User/CodeComplice.sublime-settings") and enable it only in some projects.

But it seems that "codeintel": false is not working, CodeComplice is still working.

Regards,
Armando

[Bug] autocomplete global, environment variables

Hi @wizza-smile,

When i want to use an element of $_SERVER variable, it suggest $DOCUMENT_ROOT
the code become to $_SERVER['$DOCUMENT_ROOT'] It is not correct. It should be $_SERVER['DOCUMENT_ROOT'].
And some keys are missing, eg: HTTP_REFERER.

Could you resolve this (should check $_SERVER, $_REQUEST, $_ENV);

stuck at `Info: Update indexing..`/ `Info: processing PHP: please wait` and not show suggestions.

@wizza-smile
When i working on Xenforo, even is first time or N time i open the project. when i request ctrl + space suggestions, status bar display Info: processing.. and not hint suggestions.
If i typing fast, feeling SublimeText make high CPU and text typing is very slow - lag. (often issues when i working on vBulletin project)

Even when i type if($_SE and request for if($_SERVER... (that defined in CodeCompilce - CC std lib) sometimes have no suggestions. >"< sometimes it when i type slow it show @@.

For Info: Update indexing or Info: processing...PHP: please wait in first time opened project, after a few seconds, it show Timeout.

Is working with large source like Xenforo include Zend, CC have problem while indexing/processing ?

You can try with Xenforo source code, and open any php file, then type if($_SE) .. first time or N time, it often no display suggestions.
For high CPU problem, you should try with vBulletin source code, open any file and type

if($_GET['abc']) {
echo 123;
exit;
}

should type this fast and see it.

CodeComplice.py, line 98, in <module> from codeintel2.common import CodeIntelError, EvalTimeout, LogEvalController, TRG_FORM_CPLN, TRG_FORM_CALLTIP, TRG_FORM_DEFN

Update 1.1.3 broke everything on every copy of Sublime Text I use (v3 on all)
Downgraded to 1.1.2 and works ok.

"CodeComplice.py", line 98, in <module>
    from codeintel2.common import CodeIntelError, EvalTimeout, LogEvalController, TRG_FORM_CPLN, TRG_FORM_CALLTIP, TRG_FORM_DEFN
ImportError: No module named 'codeintel2'
Unable to parse binding {caption: Tag: Lint Selection or Document, command: tag_lint}

Logs before that one:

reloading plugin CodeComplice.CodeComplice
Traceback (most recent call last):
  File "sublime_plugin.py", line 74, in reload_plugin
    m = importlib.import_module(modulename)
  File "./importlib/__init__.py", line 90, in import_module
  File "<frozen importlib._bootstrap>", line 1584, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1565, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1532, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 584, in _check_name_wrapper
  File "<frozen importlib._bootstrap>", line 1022, in load_module
  File "<frozen importlib._bootstrap>", line 1003, in load_module
  File "<frozen importlib._bootstrap>", line 560, in module_for_loader_wrapper
  File "<frozen importlib._bootstrap>", line 868, in _load_module
  File "<frozen importlib._bootstrap>", line 313, in _call_with_frames_removed

Enhancements in tooltip

. When I use tab to autocomplete (e.g. method), the tooltip doesn't show (I must open the tooltip manually by press ctrl + shift + space )

var x = 'simple string';
x.sli (use tab to autocomplete) -> x.slice()

When I write all the method by no using tab/autocomplete, after open ( the tooltip automatically open...

. When I write the function arguments, it will be nice to see which argument now is active (e.g. by underline him)

function simple(a, b , c) {
    return a;
}
simple(5, <now underline 'b' in tooltip)

changing keybindings

If there is a way to change keybindings mention it in the readme file, otherwise please make it configurable.

Does not work for $this->var, but works $var

Probably this is not specific to CodeComplice, but to SublimeCodeIntel as well.

Let's say I have the following PHP class.

class aClass
{
    private $bClass;
    public function __construct(bClass $bClass)
    {
        $this->bClass = $bClass;

        //$bClass-> works fine (pops up the method hints)
        //$this->bClass-> doesn't work
    }
}

How do I fix this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.