AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   General (https://forums.alliedmods.net/forumdisplay.php?f=7)
-   -   amxx support in vscode? (https://forums.alliedmods.net/showthread.php?t=339410)

loki_himself 09-07-2022 11:08

amxx support in vscode?
 
...

fysiks 09-07-2022 20:45

Re: amxx support in vscode?
 
I use "AMXXPawn Language" by Klippy. I just tested and auto-completion for functions defined in the same plugin works just fine. The "Go to Definition" does not work.

loki_himself 09-08-2022 05:56

Re: amxx support in vscode?
 
...

kww 09-10-2022 13:22

Re: amxx support in vscode?
 
Do you script new game mode (like zp)? :bacon:

fysiks 09-10-2022 17:14

Re: amxx support in vscode?
 
Quote:

Originally Posted by loki_himself (Post 2788352)
yeah thats what i mean, does not work. i got used to quick searching "c myfunc" but man i do miss those convenient things

So, I was looking into this today and the "Go to Definition" and "Peek Definition" functions do work for most functions. The only functions it doesn't seem to work for are local functions (functions without a "public " or "stock " in front of it). Ironically, it will also work for a function defined with "asdf ":

Code:

asdf myFunction(arg1, arg2)
{
    // Do stuff
}

I wonder if I only tested it on a local function when I said it didn't work.

EDIT: I think I found the fix for this issue. The regex pattern used to detect the function names had a minor mistake in it. You can test the fix by installing a version that I created to fix the issue. You'll need to install the VSIX file that I've published here.

loki_himself 09-11-2022 07:00

Re: amxx support in vscode?
 
...

fysiks 09-11-2022 15:50

Re: amxx support in vscode?
 
For me, it works if it's defined above or below the function call.Maybe send me the plugin that you're editing where this issue occurs so I can test to see if there is some other bug related to your specific code.

deprale 09-12-2022 06:24

Re: amxx support in vscode?
 
Quote:

Originally Posted by fysiks (Post 2788585)
For me, it works if it's defined above or below the function call.Maybe send me the plugin that you're editing where this issue occurs so I can test to see if there is some other bug related to your specific code.

It also works for me, but there's another weird issue with the syntax highlighting with this extension.

https://i.imgur.com/2LRbzw2.png

->>

https://i.imgur.com/ts5xLuz.png

a semicolon fixes that but still... I hate using them.

I tried to manually edit the amxxpawn.tmLanguage file but to be honest I'm no regex expert or enjoyer so I failed miserably.

loki_himself 09-12-2022 13:35

Re: amxx support in vscode?
 
...

LiZou Mapper 09-12-2022 15:32

Re: amxx support in vscode?
 
Quote:

Originally Posted by loki_himself (Post 2788663)
yes there are some problems with the highlighting, seems with ^" and so. i am going back to c#

Try AMXX on Sublime Text 3.2.2 Build 3211


All times are GMT -4. The time now is 13:45.

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