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

[Editor] AMXXPawn for Visual Studio Code


Post New Thread Reply   
 
Thread Tools Display Modes
wopox3
Junior Member
Join Date: Dec 2013
Location: Russia
Old 08-30-2017 , 13:24   Re: [Editor] AMXXPawn for Visual Studio Code
Reply With Quote #41

So I noticed this.
This code is compiled without problems:
FlDamage ? (Float: flDamage) : 0.0

But, if we remove the brackets, then we get a compilation error.


And, could you remove the output that is highlighted in red on the output? This also hinders.

Last edited by wopox3; 08-30-2017 at 13:25.
wopox3 is offline
Old 08-30-2017, 13:25
wopox3
This message has been deleted by wopox3. Reason: repeat
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 08-30-2017 , 13:37   Re: [Editor] AMXXPawn for Visual Studio Code
Reply With Quote #42

Quote:
Originally Posted by wopox3 View Post
So I noticed this.
This code is compiled without problems:
FlDamage ? (Float: flDamage) : 0.0

But, if we remove the brackets, then we get a compilation error.
...
Just as I thought, parenthesis are required. Maybe I can make a regex that will take that into account, but I'm not sure.

Quote:
Originally Posted by wopox3 View Post
And, could you remove the output that is highlighted in red on the output? This also hinders.
Yes, I agree. This should be a setting though. I think I'll be working more with the compiler output in the next version.
However, should the displayed path be relative to workspace maybe? What if there's no workspace open? I'm looking for a detailed explanation of how it should be displayed.
klippy is offline
wopox3
Junior Member
Join Date: Dec 2013
Location: Russia
Old 08-30-2017 , 13:42   Re: [Editor] AMXXPawn for Visual Studio Code
Reply With Quote #43

If there is a working folder - hide the path.
Otherwise - show the full path. Although ... it does not matter.
Simple setting in the disclosure of this information globally - will be enough for everyone.

Last edited by wopox3; 08-30-2017 at 13:42.
wopox3 is offline
wopox3
Junior Member
Join Date: Dec 2013
Location: Russia
Old 08-30-2017 , 13:45   Re: [Editor] AMXXPawn for Visual Studio Code
Reply With Quote #44

Quote:
The parser still doesn't parse #define statements, but it's on TODO. Didn't plan for that hovering thing, but it seems good as well, will try to do it in the future.
In theory, it should work for: const, #define, enum.
wopox3 is offline
voed
Junior Member
Join Date: Aug 2017
Location: Ukraine
Old 08-30-2017 , 16:32   Re: [Editor] AMXXPawn for Visual Studio Code
Reply With Quote #45

Quote:
Originally Posted by KliPPy View Post
Just as I thought, parenthesis are required. Maybe I can make a regex that
However, should the displayed path be relative to workspace maybe? What if there's no workspace open? I'm looking for a detailed explanation of how it should be displayed.
Maybe just like this:
Code:
Compiling C:/path/to/sma/filename.sma
AMX Mod X Compiler 1.8.3-dev+5074
Copyright (c) 1997-2006 ITB CompuPhase // maybe we can remove copyrights?
Copyright (c) 2004-2013 AMX Mod X Team
Line 17 : warning 224: indeterminate array size in "sizeof" expression (symbol "")
...
File name to head of output, and in body just print line name and warning
voed is offline
kristi
Senior Member
Join Date: Nov 2016
Old 08-30-2017 , 21:15   Re: [Editor] AMXXPawn for Visual Studio Code
Reply With Quote #46



How to make this match exact words? For example, it would only show up if there was a variable named 'else_whatever'.
kristi is offline
Send a message via Skype™ to kristi
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 08-31-2017 , 05:42   Re: [Editor] AMXXPawn for Visual Studio Code
Reply With Quote #47

Quote:
Originally Posted by kristi View Post


How to make this match exact words? For example, it would only show up if there was a variable named 'else_whatever'.
That's VSCode's fuzzy search that picks up almost every word in the file, it's not something my extension is outputting.
There is a setting 'editor.wordBasedSuggestions' which controls that, take a look at the Settings pane.
klippy is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 08-31-2017 , 12:07   Re: [Editor] AMXXPawn for Visual Studio Code
Reply With Quote #48

0.5.0 has been published.

Code:
## [Version 0.5.0] - 2017-08-31
### Added
- Syntax highlight for "native" keyword
- Append `'('` (or `'()'` if function has no arguments) on function autocompletion
- Hover information when hovering over functions, variables and constants
- `amxxpawn.compiler.reformatOutput` - reformats compiler output to clear unimportant information and remove clutter
- Compiler warnings and errors get turned into diagnostics

### Changed
- Syntax highlight now highlights only known tags from AMXX
- Completion search is now case-insensitive (e.g: typing `null` now mathces `NULL_VECTOR`)
- `amxxpawn.language.webApiLinks` and `amxxpawn.compiler.showInfoMessages` settings are now false by default
New compiler output (if turned on through settings):


Errors turning into diagnostics:


Hover information:

Last edited by klippy; 08-31-2017 at 12:09.
klippy is offline
voed
Junior Member
Join Date: Aug 2017
Location: Ukraine
Old 08-31-2017 , 12:55   Re: [Editor] AMXXPawn for Visual Studio Code
Reply With Quote #49

Quote:
Originally Posted by KliPPy View Post
0.5.0 has been published.
Hover information:
Can you show this popup permanently on click? Or even better, show it while editing function arguments, like with autocomplete


UPD: also, compiler warnings now showing only with `showInfoMessages: true`, looks like bug

Last edited by voed; 08-31-2017 at 13:02.
voed is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 08-31-2017 , 13:38   Re: [Editor] AMXXPawn for Visual Studio Code
Reply With Quote #50

Quote:
Originally Posted by voed View Post
Can you show this popup permanently on click? Or even better, show it while editing function arguments, like with autocomplete
No, but you can delete the ',' and type it in again and signature help will show up. The signature help triggers on '(' and ',' characters. There's really nothing more I can do and that's how other languages in VSCode (or actually most editors) work.

Quote:
Originally Posted by voed View Post
UPD: also, compiler warnings now showing only with `showInfoMessages: true`, looks like bug
I'll take a look at that. By "compiler warnings", do you mean messages in the output window or diagnostics?

Last edited by klippy; 08-31-2017 at 13:38.
klippy is offline
Reply



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 18:05.


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