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

[Editor] AMXXPawn for Visual Studio Code


Post New Thread Reply   
 
Thread Tools Display Modes
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 03-03-2018 , 11:32   Re: [Editor] AMXXPawn for Visual Studio Code
Reply With Quote #101

This looks cool, I've been a die-hard AMXX Studio user forever my only complaint with it is the white UI and lack of custom 'new plugin' layout. I just installed this but I have yet to figure out how to get a plugin to compile. I tried selecting View->Debug and then the play button, but then it asks me to select an environment which I do not see AMXX as an option. A short tutorial from download, configuration to actual usage would be helpful. Even setting the directories in User Settings took some trial and error.
__________________

Last edited by Bugsy; 03-03-2018 at 11:46.
Bugsy is online now
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 03-03-2018 , 12:02   Re: [Editor] AMXXPawn for Visual Studio Code
Reply With Quote #102

Quote:
Originally Posted by KliPPy View Post
Done, just update. Would've done it last night but Windows update goofed on me hard. Duplicated start menu shortcuts, and even worse, changed some paths in the %PATH% environment variable. Micro$oft please fix.
Thanks. I feel your pain, the latest windows update messed up my colors to the point I could not see anything, I had to go back to the older version.

One more thing, can you also add an option for amxx file name? Right now it's the same as the file name, but I would like to be able to set a predefined name.

Quote:
Originally Posted by Bugsy View Post
This looks cool, I've been a die-hard AMXX Studio user forever my only complaint with it is the white UI and lack of custom 'new plugin' layout. I just installed this but I have yet to figure out how to get a plugin to compile. I tried selecting View->Debug and then the play button, but then it asks me to select an environment which I do not see AMXX as an option. A short tutorial from download, configuration to actual usage would be helpful. Even setting the directories in User Settings took some trial and error.
Press CTRL+SHIFT+P and select AMXXPawn: CompilePlugin. You can create a key binding by going to File->Preferences->Keyboard Shortcuts. I have mine on CTRL+F5.
__________________

Last edited by HamletEagle; 03-03-2018 at 12:05.
HamletEagle is online now
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 03-03-2018 , 12:06   Re: [Editor] AMXXPawn for Visual Studio Code
Reply With Quote #103

Quote:
Originally Posted by Bugsy View Post
This looks cool, I've been a die-hard AMXX Studio user forever my only complaint with it is the white UI and lack of custom 'new plugin' layout. I just installed this but I have yet to figure out how to get a plugin to compile. I tried selecting View->Debug and then the play button, but then it asks me to select an environment which I do not see AMXX as an option. A short tutorial from download, configuration to actual usage would be helpful. Even setting the directories in User Settings took some trial and error.
Yeah I can create a full tutorial.


I don't like the compiling process either. However it looks like I can use tasks now to do it, there's been some progress with them and it looks like my extension can provide a task template now. I need some feedback though, especially from people that use VSCode and tasks regularly:
  • Should I treat this as primarily a development tool? That means that I can require users to do something more than just put a path to the compiler because developers are capable of doing more than that. If I want to cater to a general public (server operators, admins) then I have to keep it simple, and it already isn't simple enough for some that are used to more GUI it looks like. Plugin consumers are used to hitting one button and compiling a plugin, while they can get stuck on anything a bit more advanced.
  • With tasks you won't be able to just open a file and hit a button or a shortcut to compile that plugin. Tasks are meant to be used for multi-file projects, and Pawn plugins are usually consisting of a single file. I don't know how I feel about this.
  • On the other side, other development environments use tasks because they are one unified way to compile stuff. I think "Run Build Task" is bound to Ctrl + Shift + B by default, so by using tasks you use "the one true way" of compiling things in VSCode.
  • amxxpc isn't in most people's %PATH%/$PATH, which would make everything much easier. Most other development tools are added to PATH during installation, amxxpc isn't one of them. I feel like I can't require plugin consumers to change their environment variables.


Quote:
Originally Posted by HamletEagle View Post
One more thing, can you also add an option for amxx file name? Right now it's the same as the file name, but I would like to be able to set a predefined name.
You can use tasks if you need more customization, because your desire to have a specific filename seems to be project-specific, which tasks are great at. I don't feel like just setting the file name in settings is a good idea.
__________________

Last edited by klippy; 03-03-2018 at 12:13.
klippy is offline
voed
Junior Member
Join Date: Aug 2017
Location: Ukraine
Old 03-12-2018 , 15:51   Re: [Editor] AMXXPawn for Visual Studio Code
Reply With Quote #104


Are there any way to add operators to autocomplete? :/

Quote:
Originally Posted by KliPPy View Post
Should I treat this as primarily a development tool?
Well, i dont think server admins needs IDE, they have compile.exe/sh, so yes
voed is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 03-19-2018 , 13:33   Re: [Editor] AMXXPawn for Visual Studio Code
Reply With Quote #105

Quote:
Originally Posted by voed View Post

Are there any way to add operators to autocomplete? :/
What do you mean by "operators"? Control flow keywords like if, else, for etc? If so, I'm not quite sure, I don't think other language services add it at all. Why would you even need that? Just writing "else" is much faster then finding it in the completions list.

Quote:
Originally Posted by voed View Post
Well, i dont think server admins needs IDE, they have compile.exe/sh, so yes
Thank you. I need more feedback though.
__________________
klippy is offline
voed
Junior Member
Join Date: Aug 2017
Location: Ukraine
Old 03-21-2018 , 15:24   Re: [Editor] AMXXPawn for Visual Studio Code
Reply With Quote #106

Quote:
Originally Posted by KliPPy View Post
Why would you even need that? Just writing "else" is much faster then finding it in the completions list.
Yeah, i typed 'else' and its suggesting me autocomplete for 'elog_message', so i need to cancel autocomplete and then hit enter, thats why i asked
voed is offline
wopox3
Junior Member
Join Date: Dec 2013
Location: Russia
Old 04-25-2018 , 12:33   Re: [Editor] AMXXPawn for Visual Studio Code
Reply With Quote #107

In support of the author. I would like to share some settings for Visual Studio Code. I use VSCode for development using Github & BitBucket repository systems. It's comfortable.

I will make some clarifications for the relative paths and work with the project.
Compile plugins by default build system.


Need create task with the following contents in tasks.json:
PHP Code:
{
    
"version""2.0.0",
    
"tasks": [
        {
            
"taskName""Compile AMXX Plugin",
            
"type""process",
            
"command""${workspaceRoot}\\scripting\\amxxpc.exe",
            
"args": [
                
"${file}",
                
"-i${workspaceRoot}\\scripting\\include",
                
"-o${workspaceRoot}\\..\\plugins\\${fileBasenameNoExtension}.amxx"
            
],
            
"group": {
                
"kind""build",
                
"isDefault"true
            
}
        }
    ]

A specific task supports the relative paths of the project. When you press 'CTRL_SHIFT+B' your task will works (If you have not changed the default settings of VSCode).
The compiler will start and the destination file will go to: ${workspaceRoot}\\..\\plugins \ \ ${fileBasenameNoExtension}.amxx
NOTE: You need to create the ${workspaceRoot}/plugins/ folder in advance for the amxx compiler to successfully place the output file.

If you want to configure VSCode to collect information from include by relative path (relative path to compiler and libraries), you may configure VSCode by this way:
in settings.json
PHP Code:
{
    
"amxxpawn.compiler.includePaths": [
        
"${workspaceRoot}/scripting/include/"
    
],
    
"amxxpawn.compiler.executablePath""${workspaceRoot}/scripting/amxxpc.exe",
    
"amxxpawn.compiler.outputType""path",
    
"amxxpawn.compiler.outputPath""${workspaceRoot}/plugins/"

IMPORTANTLY! You can set specific parameters for the workspace and this should not be ignored for your convenience.


When working, keep in mind that you need to open the project folder in VSCode, not the plugin file.

like this

Last edited by wopox3; 04-25-2018 at 12:41.
wopox3 is offline
Recra
New Member
Join Date: May 2015
Old 04-26-2018 , 09:05   Re: [Editor] AMXXPawn for Visual Studio Code
Reply With Quote #108

There is a bug in parsing some lines that includes "^
Attached Thumbnails
Click image for larger version

Name:	Capture.PNG
Views:	217
Size:	85.6 KB
ID:	169491  

Last edited by Recra; 04-26-2018 at 09:10.
Recra is offline
Zer0_CooL
Junior Member
Join Date: Jul 2012
Old 05-11-2018 , 15:35   Re: [Editor] AMXXPawn for Visual Studio Code
Reply With Quote #109

When i setting up includePaths like this:
Code:
    "amxxpawn.compiler.includePaths":
    [
        "C:\\AMXX\\Compiler\\1.8.3\\include",
        "${fileDirname}\\include"
    ],
and put my include files in the "${fileDirname}\\include" directory
VSCode says: "Couldn't resolve include path 'my_include'. Check compiler include paths."
but compiles without errors.

KliPPy, can you fix it please?
Anyway this extension is amazing. Thank you!
Zer0_CooL is offline
ish12321
Veteran Member
Join Date: May 2016
Old 06-10-2018 , 12:16   Re: [Editor] AMXXPawn for Visual Studio Code
Reply With Quote #110

I installed x64 build of VS Code. I installed AMXXPawn and set it. The enums and constants from the includes are not coming in auto complete, neither are any defines. Only functions are coming from include files. Please check. @KliPPy
__________________
['O|s|G'] | Death Wins a.k.a Ish Chhabra was here

Last edited by ish12321; 06-10-2018 at 12:18.
ish12321 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 07:35.


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