GithubHelp home page GithubHelp logo

clemos / haxe-sublime-bundle Goto Github PK

View Code? Open in Web Editor NEW

This project forked from joa/haxe-sublime2-bundle

234.0 21.0 86.0 2.32 MB

Sublime Text bundle for Haxe programming language

License: Apache License 2.0

Python 99.98% Haxe 0.02%

haxe-sublime-bundle's Introduction

TravisCI Build Status AppVeyor Build Status

Introduction

An Haxe Bundle for Sublime Text 2 and Sublime Text 3

Features

  • Syntax highlighting, auto-completion, code hints
  • Code [generation](../../wiki/Code generation) / [navigation](../../wiki/Code navigation)
  • Error highlighting / [navigation](../../wiki/Code navigation#error-navigation)
  • NME, OpenFl and Flambe support
  • Haxelib integration
  • More

Installation

Usage

Reviews

haxe-sublime-bundle's People

Contributors

0b1kn00b avatar aduros avatar andyli avatar aroben avatar bmharper avatar clemos avatar elsassph avatar emr4378 avatar jasononeil avatar jdonaldson avatar jgranick avatar joa avatar johnfn avatar jonathanhirz avatar jskuse avatar kennygoff avatar lbones-ai avatar lexoyo avatar madneon avatar matttuttle avatar mlopes avatar nadako avatar pixelami avatar roaoao avatar roccoc avatar ruby0x1 avatar ryanlanciaux avatar thehippo avatar theremix avatar zshazz 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

haxe-sublime-bundle's Issues

feature: go to symbol

Is it possible to add a feature that navigates to the symbol at the cursor?
Like F4 in FlashDevelop.

Thank you.

Suggestion: autocomplete arguments

Imagine you have a function like this:

function add(x: Int, y: Int) { return x + y;}

Now, if you type in

add(

, imagine how cool it would be if it could complete to something like this:

add(x: Int, y: Int)

Now that would be pretty useless if you just had to delete them, but imagine if you could tab from one to argument the next, like you can do with Snippets. Suddenly this would be very handy and you wouldn't have to squint at the bottom of your screen to see argument lists any more. Eclipse has a similar feature.

I'm not sure if this would be possible, but if so it would be a great boon. I could help out if you could point me in the right direction.

Build (Command+B)

Build still doesn't work for me and it doesn't trace any useful debug information about that in the console, except "Build Failed".

Error highlighting

It would be good to somehow trigger error highlighting (I'm not 100% sure you can even show errors in Sublime?) to make it easier to see errors etc (maybe do it on building?).

Font size Sublime text 2 "status bar"

Hi!

As this bundle displays code hinting for method calls in the “status bar”, I’ve found it useful to increase the font-size of Sublimes status bar. It makes it a lot easier to catch the current methods signature by just glancing at the bottom of the screen.

Instructions for how to increase the font size can be found on this page.
http://superuser.com/questions/469161/increase-the-font-size-on-sublime-text-2-status-bar

Maybe someone else would find this information useful as well.

Best!

/E.

Minor code completion issue

Hi!

I'm trying out Sublime Text 2 and the haxe bundle again. Thanks for all your work!

I just wanted to point out a minor spot where completion isn't provided, but where it would be nice. Let's imagine I have a DisplayObject called "Footer", and I want to manipulate it.

If I type "Foot" and press enter, "Footer." is completed and I have the pop-up box with properties and methods for my Footer object.

If I type "Footer", click away, then click back and type a period, I will also receive the pop-up box.

However, if I begin typing and ignore the completion for "Footer", but instead type "Footer." myself, I receive no completion after the period. It is fairly common that I might type the full name of an object rather than letting completion provide it for me, but once I've typed it, I'd like to receive completion.

Not sure if this is a limitation somehow, or just a minor little thing?

Thank you!

HaXe Autocomplete

I'm looking for some advice on how to correctly track down this problem.

I'm on WIndows 7 with the most recent version of Sublime.
I've tried a Fresh install of HaXe/NME using the bundled installer and a fresh install of Sublime and all associated packages (just in case)
Haxe is in a non-default directory, but compilation works fine (Using Ctrl+Enter).

Any Auto Complete action results in a <Fatal error: Exception failure("Couldn't connect on 127.0.0.1:6000")> which sounds like a problem with the HaXe Auto Complete server maybe?

I have no idea how to start narrowing this down. Any guidance would be awesome.

Cannot find class from haxelib

Hi!

Does the bundle work with classes pulled from haxelib?

Completion is working better now, but it is telling me that it cannot find 'com.eclecticdesignstudio.motion.Actuate'

I do have an HXML file (with -lib actuate) and it compiles fine.

(is it supposed to be creating AutoComplete_.hx, and leaving it there after closing the program? I wasn't sure if that was a problem, or expected)

Thank you again! This just keeps getting better :)

Haxelib shortcut key overlaps with core editor shortcut

I just installed the Haxe bundle and found that one of the shortcut keys overlaps with a core Sublime Text editing shortcut key. Ctrl+Shift+L is already used by default for splitting a long selection into multiple lines. I'm fairly new to Sublime Text so honestly I don't know how useful this shortcut key is, but I'd prefer that addon packages didn't step on the toes of core features.

Strange bug with sublime & erazor

i didn't know where to post it (erazor or sublimetext)
but i think it is more ST2 related (and you are related to both projects)

it's a bit hard to explain but it's about this error showing after specific target compilation (CTRL-enter)

here is my test code :

class Erazor 
{

    static public function main()
    {
        var temp:String=new JView().execute({test:"popo"});
        trace("temp="+temp);
    }
}

@:template("<div class='frame' >@test</div>")
class JView extends erazor.macro.Template<{test:String}>{}

and

class Neko 
{

    static public function main()
    {
        var temp:String=new NView().execute({test:"popo"});
        neko.Lib.print(temp);
    }
}

@:template("<div class='frame' >@test</div>")
class NView extends erazor.macro.Template<{test:String}>{}

wich i compile with :

-main Erazor
-lib erazorGit
-js raz.js

--next

-main Neko
-lib erazorGit
-neko index.n

-cmd open index.html
-cmd neko index.n

everything goes fine when building all target cases ( CTRL+B)
but when i'm switching targets ( CTRL+SHIFT+B) and then compile (CTRL+ENTER)
i get this error
"Field execute should be declared with 'override' since it is inherited from superclass"

i use caue waneck's git source for macro erazor .
do you know what's going on ?
thx

NME AutoComplete problems

I am using this excellent bundle with latest 2165 beta sublime text and when writing something like "nme" or "nme." I dont get the autocompletion panel available for all NME classes.

Maybe this is something that changed with autocompletion for latest version.

The build.hxml is the one following (from nme-bunnymark)

-lib nme
-cp src
-swf9 bin/flash/dummy.swf
-cmd nme test build.nmml flash

-cmd nme test build.nmml mac

-cmd nme update build.nmml ios

-cmd open bin/iphone/MyApplication.xcodeproj

Package Control

Might be time to push the bundle to Package Control maybe.

I feel it's really getting usable

  • next quick features imho would be Build+Run (especially for Flash) and maybe basic NME project files support,
  • next more complex feature would be to display a completion list of all types, probably something to try doing using a macro.

Cheers.

Build a project without running it

Perhaps the feature already exists and I haven't found it:
I use SublimeText2 with nme. When I want to build a project I use Ctrl+Enter. This builds and automatically runs the project and usually that's ok..
But sometimes I would like to build without running the project (like F8 in FlashDevelop), just to check if everything compiles.
Is there an option for that and if not, would you implement it for the next version?

Frequent crashes

Hello here !

First of all, really good work.

Env :
Linux Ubuntu
Sublime build 2165
Very very last haxe-sublime2-bundle

What's happening :
Really often, when I type something ("stage", for instance), haXe tries to autocomplete. I don't care about that.
It (really) often fail to autocomplete. That's not a problem either, I just type a dot (.) after "stage".
Then, randomly, "stage", disappear, the new line too, I'm at the previous line with just my dot.
So I just do "Ctrl + Z", and then, Sublime crash 100% of time.

That's happens REALLY often, making the plugin unusable, so I had to disable it.

If you can please fix that, and the performance issue too, it would definitely make Sublime THE good IDE for haXe.

Thanks.
Blue112.

Completion bug after coma character

I'm re-posting this message from Philippe here to remember it's not completely fixed:

this context detection is much too rudimentary, and really to make it correctly is going to be very tricky. I'd suggest to look how it's done in FlashDevelop code - although far from being perfect it's what you can achieve efficiently without AST.

First disambiguate the coma itself:
http://code.google.com/p/flashdevelop/source/browse/trunk/FD4/External/Plugins/ASCompletion/Completion/ASComplete.cs#3058

Second, find the actual function call (they can be imbricated):
http://code.google.com/p/flashdevelop/source/browse/trunk/FD4/External/Plugins/ASCompletion/Completion/ASComplete.cs#1510

Wrong position of cursor

Hi again.

Same env.

Really often, when I working with haXe plugin, my cursor doesn't move anymore. I mean, the visual representation of it doesn't move (the blinking | ).
I can still move it, write new characters, erase other, insert lines, and all the things, but my cursor won't move until I :

  • Click somewhere with my mouse
  • Restart sublime.

That's really annoying. Any though ?

NME classes not appearing on suggestions list

When typing names of nme classes such as Sprite, nme.display.Sprint doesn't show up in the suggestions list.
It starts happening with commit 0fcded7 "tweaks + cache lib classes and packages".

If I roll back to a version before that commit (such as 8026916) it starts working.

My nmml file contains the following line:
<haxelib name="nme" />

And my build.hxml contains:
-lib nme

I'm able to reproduce it with any project on nme 3.5.5 with any commit from 0fcded7 to the current HEAD of master.

This is a screenshot of the suggestion window on commit 0fcded7:

Screen Shot 2013-03-11 at 13 19 26

This is a screenshot of the suggestion window on commit 8026916:

Screen Shot 2013-03-11 at 13 17 17

I've been able to reproduce this also with the sample projects that come with recent versions of nme (such as running "nme create PiratePig")

EDIT
A further investigation led me to the conclusion that nme entries are being excluded from the list because of the condition on line 1138 of HaxeComplete.py (https://github.com/clemos/haxe-sublime2-bundle/blob/master/HaxeComplete.py#L1138). This seems to be related to the inclusion of "nme" on the targetPackages list on line 1047 (https://github.com/clemos/haxe-sublime2-bundle/blob/master/HaxeComplete.py#L1047).

Thanks,
Marco Lopes

feature ? alternate haxe version

hello clemos ..
it would be nice to have an alternate sublimebuild for nightly builds .
in case we have two versions of haxe and doesn't want to break environnment variables.

i tried to make it but not succeed

like :

{
"cmd": ["HAXE_LIBRARY_PATH=:haxe3nightly/haxe/std haxe3nightly/haxe/haxe" ,"build.hxml"],
"file_regex": "^([^:]):([0-9]+): characters [0-9]+-([0-9]+) :.$",
"working_dir": "${project_path:${folder}}",
"selector": "source.haxe.2,source.hxml"

}

of course "haxe3nightly should be the right path to the nightly test environement.
any idea on how to make it ?
thx

expat.py woes on Ubuntu 11.04

I wanted to try out the plugin, but unfortunately I keep getting stuck with the error that says it cannot load module pyexpat

I'm running Ubuntu 11.04. I have tried symlinking to /usr/lib/python2.6, and confirmed that /usr/lib/sublime-text-2/lib/python2.6 was in the paths that Sublime is searching, but it still doesn't work.

I appear to have Python 2.6.6 final installed.

Any ideas? Thanks!

Autocomplete annoyances

If I type:

  • this.
  • (Ctrl+Space) shows instance members
  • (Backspace) removes the dot and still shows the instance members but filters with "this" characters

PS: ST2 autocomplete has become really annoying and I had to disable it...

Ctrl+Enter in nmml

Would be nice to be able to build a project when the active document is a nmml.

Just some of my findings in working with this plugin

So far I love it. I've tried many other haxe development options on Linux and this one is my favorite. However it is far from perfect. I'm going to go ahead and compare it to development in FlashDevelop on windows.

-No completion at places like after "extends" keyword.
-Packages like "flash9.display" come out. The number 9 breaks the package, i have to manually delete the 9 then CTR + I.
-Doesn't detect properties of a Sprite object. After typing "foo.x" and then typing =, some random word comes out because "x" was no included in the auto complete list.

Hope to see this plugin updated soon!

Add Support of multiple build_*.hxml

I have one project where multiple build_*.hxml are existant.

One of them is for building the libraries/framework, another one is to build the corresponding example files. Depending on the workflow of UnitTests (or similar) in haXe there might be a third and fourth one in the near future.

Is there already a way to support multiple build_*.hxml or at least planned to add such a feature?

AttributeError: type object 'HaxeComplete' has no attribute 'inst'

Hey guys,

I just switched over to Linux, updated all my packages (which included SublimeText), installed PackageControl and used that to install your Haxe bundle.

It worked in the past, but now (after I installed python 2.6 to get past the expat.py error) I keep receiving this same message:

AttributeError: type object 'HaxeComplete' has no attribute 'inst'

This doesn't happen all the time. If I have a variable called "hello", it will provide completion for hello. However, if I add a period and try and access one of its child properties, this is the message I always get in the console window.

I thought this might have been because my hxml file was missing, so I ran "nme display Actuate\ Example.nmml linux > ActuateExample.hxml", dragged the folder into SublimeText and tried again, but it doesn't seem to work... same error.

Is the version of the bundle on package control bad, or is it always up-to-date? Any idea what's happening?

Thanks!

Does the completion broken when using nme 3.5.5?

Just update nme to 3.5.5, now there's no completion for variables any more.
I don't know whether it's caused by my settings(I did not change any setting).
BTW, I use haxelib upgrade to update libs.

automatic parenthesis for methods

When autocompletion writes a method name it automatically add the opening "(". I think it is a design decision but I personally don't like it much. First I am not used to it from previous experiences with other editors. Second I often use methods as reference or subjects for "using" so I need to manually remove the extra parenthesis by hand. Of course it is a minor issue but I'd love to see it removed.

p.s. You work on this plugin is really making my transition to MacOSX a pleasure

Problems with auto completion on Windows and paths with special characters

On Windows 7 (x86-64) and the latest bundle (from the package manager), if the path contains special characters (like, for instance, the latin 'í'), I see the following message on my status bar (and no completion):

Error while running haxe: 'ascii' codec can't encode character u\'xed' in position 44: ordinal not in range(128)

The current path to the file is 'C:\Users\jonas.malaco\Desktop\uidí\UID.hx'. If I remove the 'í', everything works again...

all --cmd are executed at once

When you have more than one build command per .hxml and each has one or more -cmd, I'd expect that only the --cmd that fall under the current build are executed, instead all of them are executed.
Another strange behavior seems to exist when more than one .hxml exist, only the --cmd on the first one work.

hss not working

i get an error when passing syntax to hss :
Error loading syntax file "Packages/haXe/HSS.tmLanguage": Unknown include #mixin_attributes

also there seems to be no build system for hss
a simple one like this do the stuff:

{
"cmd": ["hss","$file"]
}

Crashing on autocomplete/intellisense

Just installed SLT2, haxe, and nme fresh on my newish MBP. Now both monodevelop and SLT2 both crash when just before an autocomplete comes up. Here's the Console.app crash report : git://gist.github.com/3278256.git
anyone have the same problem?

cannot use block comment

I cannot use block comment using command + / nor with the menu .
any reason for that ?

btw: the zen-html coding conflict has disappear ! thx.

Feature : Autoimport ?

Hey Clemos, nice work with the bundle !

I would like to know if it was planned/possible to add an autoimport feature in sublime haxe bundle, like, ctrl+o and it cleans unused imports, and ctrl+i on a class name autofind the correct full class name and import it (like : ctrl+i on Sprite autoimport nme.display.Sprite)

Thanks !

CTRL+B behavior

I am not sure what should happen using CTRL+B (I suppose I can switch the .hxml file with that) but what happens on my Mac is that the cursor goes left of one char.

Can you add these lines to find_hxml?

This will account for the --remap compiler flag that can be present in an hxml file. A lot of people remap flash to nme...

            if l.startswith("--remap") :
                spl = l.split(" ")
                if len( spl ) == 2 :
                    currentBuild.args.append( tuple(l.split(" ") ) )
                else :
                    sublime.status_message( "Invalid build.hxml : no Main class" )

Thanks!

[Feature] Auto-import ?

Hi !
Could he have an auto-import feature ?

Would work like :
new[space] => autocompletion with classes.
Typing "Web" and choosing neko.Web => adds import neko.Web; at the top of my file, and shows up neko.Web constuctors parameters if it has some, of just adds (); if it doesn't.

Would be really great, as it's one of the FD feature I most miss.

Thanks.
Blue112.

error message

Hi
I am not sure that it belongs to the plugin or sublime itself... But I had forgotten to install haxe before building, and the error message is unclear:

[Errno 2] No such file or directory
[cmd:  [u'haxe', u'build.hxml']]
[dir:  /home/lexa/Documents/www/Dropbox/fdt-workspace/Silex/build]
[path: /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games]
[Finished]

dot autocompletion for "for"

When I am inside a "for" declaration and I want to write the three dots I receive an autocompletion for each dot. The perfect solution would be to add the three dots in one keystroke or ignore autocompletion in that context.

CTRL+Enter does not work as expected

When I hit CTRL+Enter all I get is a newline at the end of the current line. There is nothing going to be compiled.

Is there a way to configure the keys that are used by this behaviour?

Settings for less aggressive intellisense?

I use SublimeText 2 and haxe-bundle on Ubuntu 12.04 32bit. The intellisense is a little too aggressive and kind of slow my typing down, since there is a noticeable lag, for example

var fo_

when the cursor is on that position, there is a noticeable lag because SublimeText tried to do intellisense there. Can this be changed or optional? Or maybe make it faster? I used Sublime at work for web stuff (PHP, JS) and it never bother me, even though the laptop that I use at work is relatively less powerful than what I have at home.

conflict

i updated the bundle today via package control ( clemos repository )

i have now a conflict with zen-coding bundle which is not working anymore ..
desinstalled haxe > zencoding working .

is it now possible to have sublimeText in his own package folder ( don't need to paste it in an HaXe folder ) >great

but autocompletion is completely fucked up !
.dot completion is not working anymore nor ":" ( deux points .. chais pas dire en anglais );

but keep the good work

List of methods/properties appear and disappear when typing .

When typing a name of an object followed by dot, the names of the window containing the names of the methods and properties appear for a fraction of a second and then disappear again. If I then hit CRTL-Space, the windows works as expected.

The issue is happening on Mac OS 10.6.8 and Sublime Text 2 build 2139.

To reproduce follow the following steps:

Write the name of an object available on your current scope, followed by the dot character, example:

myObject.

An autocomplete window will popup and disappear almost immediately.

Cheers,
Marco Lopes

NME compile errors can't be jumped to

This line needs to be added to run_nme() in HaxeComplete.py:

"file_regex": "^([^:]):([0-9]+): characters [0-9]+-([0-9]+) :.$",

...so that you can double click on haxe errors and be taken there.

Thanks,
Mike

Haxe plugin does not work anymore

Since a few days a got the follwing error messages when starting sublime. (And Haxe support obviously does not work anymore)

Error loading syntax file "Packages/HaXe/Hxml.tmLanguage": Error parsing plist xml: Failed to open file In file "Packages/HaXe/Hxml.tmLanguage"
Error loading syntax file "Packages/HaXe/HaXe.tmLanguage": Error parsing plist xml: Failed to open file In file "Packages/HaXe/HaXe.tmLanguage"

(I'm on Ubuntu 12.04 64bit)

Hidden method signature in CodeHint window

If I have a function with the signature

function someFunction( a:String , b:String , c:String ):Void {

}

Calling out codeHinting for this function, I see ...

someFunction(...) Void

Functions with short argument signatures, like ...

function someOtherFunction( a:String ):Void {

}

... works fine and I get someOtherFunction( a:String ) Void in the codeHinting window, as expected.

The issue is the same for methods in the standard library.

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.