Raised This Month: $12 Target: $400
 3% 

[TOOLS] Atom Sourcepawn Syntax Highlighting v0.6.0


Post New Thread Reply   
 
Thread Tools Display Modes
Drixevel
AlliedModders Donor
Join Date: Sep 2009
Location: Somewhere headbangin'
Old 01-12-2015 , 15:28   Re: [TOOLS] Atom Sourcepawn Syntax Highlighting v0.3.1
Reply With Quote #11

Quote:
Originally Posted by Bubka3 View Post
Have you been able to compile directly from Atom?

It's something I can do in Sublime and I really miss it.
I asked that question above and they linked a few things but I haven't figured them out.
Drixevel is offline
Wliu
Veteran Member
Join Date: Apr 2013
Old 01-15-2015 , 17:43   Re: [TOOLS] Atom Sourcepawn Syntax Highlighting v0.3.1
Reply With Quote #12

Honestly, I never got that to ever work in Notepad++, so I never did get to feel the awesomeness of in-program compiling .

I could try to make another package for it if no generic solution exists.
__________________
~Wliu
Wliu is offline
Drixevel
AlliedModders Donor
Join Date: Sep 2009
Location: Somewhere headbangin'
Old 01-15-2015 , 22:45   Re: [TOOLS] Atom Sourcepawn Syntax Highlighting v0.3.1
Reply With Quote #13

Quote:
Originally Posted by Wliu View Post
Honestly, I never got that to ever work in Notepad++, so I never did get to feel the awesomeness of in-program compiling .

I could try to make another package for it if no generic solution exists.
If you could make a package for it that allows us to compile scripts using 'spcomp.exe', I would love you forever.
Drixevel is offline
Wliu
Veteran Member
Join Date: Apr 2013
Old 01-17-2015 , 20:57   Re: [TOOLS] Atom Sourcepawn Syntax Highlighting v0.3.1
Reply With Quote #14

Quote:
Originally Posted by r3dw3r3w0lf View Post
If you could make a package for it that allows us to compile scripts using 'spcomp.exe', I would love you forever.
So I've made some nice progress on this. It works (only tested on Linux, may or may not work on Windows/Mac) with a few caveats:
  • It comes bundled with 'spcomp' and 'spcomp.exe' which is pretty ugly, but I don't know how to do it otherwise
  • It can't compile files that are not in the same directory as the 'include' folder (eg 'scripting/freaks/default_abilities.sp')
  • You can only tell if it compiled successfully by opening up the dev console (this is only because Atom highly recommends that packages don't use notifications yet as the API for that is still unstable)
Other than that, it works like a charm . I plan to release it as soon as I can fix the above issues. If possible, I'd also like to make it able to lint the file you're currently working on.

It's not published yet because I'd like to get it integrated with the Linter plugin first, but if you'd really like to try it out, just download it here and place it in ~/.atom/packages/sourcepawn-compiler. Run it by going to Packages-->Compile Sourcepawn-->Compile (or you could add a keyboard shortcut for even more convenience). And finally, if you want to enable notifications, go into /lib/sourcepawn-compiler.coffee and uncomment atom.notifications.add.
__________________
~Wliu
Wliu is offline
Bara
AlliedModders Donor
Join Date: Apr 2012
Location: Germany
Old 01-18-2015 , 09:45   Re: [TOOLS] Atom Sourcepawn Syntax Highlighting v0.3.1
Reply With Quote #15

You can try this:
https://atom.io/packages/build
__________________
Discord (Bara#5006) | My Plugins (GitHub)
You like my work? Support is not a crime.
Bara is offline
Wliu
Veteran Member
Join Date: Apr 2013
Old 01-18-2015 , 10:46   Re: [TOOLS] Atom Sourcepawn Syntax Highlighting v0.3.1
Reply With Quote #16

Quote:
Originally Posted by Bara View Post
Ooh, that's nice. Don't know how I missed that in my initial package search.
I might still publish my package then but only as a linter.
__________________
~Wliu
Wliu is offline
Wliu
Veteran Member
Join Date: Apr 2013
Old 01-18-2015 , 15:02   Re: [TOOLS] Atom Sourcepawn Syntax Highlighting v0.4.0
Reply With Quote #17

0.4.0 has been released!
User-created tags now get highlighted correctly (such as cooltag:myVariable).
I also fixed a pretty embarrassing mistake with snippets and settings that caused them to not work in previous versions.

So, now that snippets work, a quick intro to them (in case you have no idea what I'm talking about):
Let's say you want to create a switch-case. Normally you'd have to type everything out, but snippets will autocomplete everything for you when you press tab on a valid prefix. For example, pressing <tab> after typing switch will give you:
Code:
switch(/* expression */) {     case /* value */:     {         /* code */     }     /* Add more cases through the 'case' snippet or the default case through the 'default' snippet */ }
Pressing tab will jump to each comment block allowing you to quickly edit everything.

Supported snippets can be seen through the Alt+Shift+S keybinding (Windows/Linux, not sure about Mac).
__________________
~Wliu

Last edited by Wliu; 01-18-2015 at 15:03.
Wliu is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 01-19-2015 , 03:46   Re: [TOOLS] Atom Sourcepawn Syntax Highlighting v0.3.1
Reply With Quote #18

Quote:
Originally Posted by Wliu View Post
It comes bundled with 'spcomp' and 'spcomp.exe' which is pretty ugly, but I don't know how to do it otherwise
Please make sure you're also shipping the SourceMod license and where to get the source code for the exact version you're distributing.

Quote:
Originally Posted by Wliu View Post
It can't compile files that are not in the same directory as the 'include' folder (eg 'scripting/freaks/default_abilities.sp')
Use the -i param to tell it where the includes are.
__________________

Last edited by asherkin; 01-19-2015 at 03:50.
asherkin is offline
Wliu
Veteran Member
Join Date: Apr 2013
Old 01-19-2015 , 10:22   Re: [TOOLS] Atom Sourcepawn Syntax Highlighting v0.3.1
Reply With Quote #19

Quote:
Originally Posted by asherkin View Post
Please make sure you're also shipping the SourceMod license and where to get the source code for the exact version you're distributing.


Use the -i param to tell it where the includes are.
Yup, I'll make sure to do that if I ever release it.

I have been using -i, but currently what I'm doing is assuming that the include folder is always in the same folder as the currently edited file, which it sometimes isn't.
__________________
~Wliu
Wliu is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 01-19-2015 , 10:49   Re: [TOOLS] Atom Sourcepawn Syntax Highlighting v0.3.1
Reply With Quote #20

Quote:
Originally Posted by Wliu View Post
Yup, I'll make sure to do that if I ever release it.
You have released it, at least enough to bring the license into play.
__________________
asherkin is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:34.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode