Raised This Month: $32 Target: $400
 8% 

[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-29-2017 , 12:40   Re: [Editor] AMXXPawn for Visual Studio Code
Reply With Quote #31

Quote:
Originally Posted by voed View Post
Can we disable this messages? Its using so much space. Thank you.
I support. On a small screen, lines take up a lot of space. Please add an option to disable superfluous compiler output text.
wopox3 is offline
kristi
Senior Member
Join Date: Nov 2016
Old 08-29-2017 , 14:35   Re: [Editor] AMXXPawn for Visual Studio Code
Reply With Quote #32

Quote:
Originally Posted by KliPPy View Post
  • Checks if included files are valid, provides links to the AMXX Web API reference:
Can you make it so it only opens the include file in a new tab?

And maybe Ctrl + Click Ctrl + Left Click
kristi is offline
Send a message via Skype™ to kristi
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 08-29-2017 , 14:57   Re: [Editor] AMXXPawn for Visual Studio Code
Reply With Quote #33

Quote:
Originally Posted by kristi View Post
Can you make it so it only opens the include file in a new tab?
You can press F12 or Right Click the link then select Go to Definition, but in the new update there will also be an option to disable links to the web API reference.

Quote:
Originally Posted by kristi View Post
And maybe Ctrl + Click Ctrl + Left Click
There's no way to change that and it's not my doing, it's a part of VSCode's UI. You may go to VSCode GitHub and propose the change.

Last edited by klippy; 08-29-2017 at 15:35.
klippy is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 08-29-2017 , 15:40   Re: [Editor] AMXXPawn for Visual Studio Code
Reply With Quote #34

An update has been published.

Code:
## [Version 0.4.0] - 2017-08-29
### Added
- Suggestions/completions for variables and constants
- Some diagnostics for variable/constant definitions
- `amxxpawn.compiler.showInfoMessages` setting - whether compile process shows additional information (arguments, exit code...)

### Fixed
- `[]` and `()` pairs now highlighted too (only `{}` pairs were before)
- CWD is now set to amxxpc's directory when running it


klippy is offline
wopox3
Junior Member
Join Date: Dec 2013
Location: Russia
Old 08-30-2017 , 12:31   Re: [Editor] AMXXPawn for Visual Studio Code
Reply With Quote #35


With the syntax highlighting on STATUSICON_HIDE something is not right
wopox3 is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 08-30-2017 , 12:41   Re: [Editor] AMXXPawn for Visual Studio Code
Reply With Quote #36

STATUSICON_HIDE is fine, STATUSICON_SHOW isn't. It's because highlight is picking up "STATUSICON_SHOW :" as a tag. There's really no reliable way to match Pawn tags with regex only, and language server protocol doesn't allow me to dynamically add decorations to code.
As far as I've seen no other editor provided highlight for tags and I see why - the syntax is so stupid it's not possible (at least not reliably). Do I leave it as it is or just remove highlight for tags completely?

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

I have some suggestions, if its possible, of course:
1. For functions that have arguments, show hint with arguments by clicking on function name:
  • click here:
  • show this:
2. Add open parenthesis automatically when autocompleting function name; if function has no arguments, add closing parenthesis too:
  • type "read_fl", click enter, have "read_flags("
  • type "client_put", click enter, have "client_putinserver()"
3. Show define value when hover on its name

4. May be pointless as hard to implement, but anyway. Show lang file string value on hover by lang key:
voed is offline
voed
Junior Member
Join Date: Aug 2017
Location: Ukraine
Old 08-30-2017 , 12:59   Re: [Editor] AMXXPawn for Visual Studio Code
Reply With Quote #38

Quote:
Originally Posted by KliPPy View Post
Do I leave it as it is or just remove highlight for tags completely?
Maybe just keep highlighting for already existing tags : Float:, bool:, Array:, any:, etc
voed is offline
wopox3
Junior Member
Join Date: Dec 2013
Location: Russia
Old 08-30-2017 , 13:18   Re: [Editor] AMXXPawn for Visual Studio Code
Reply With Quote #39

So in Ternary Boolean you need to remove the syntax highlighting.
Or find a competent way to determine the ternary operation and the declared type inside it.
wopox3 is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 08-30-2017 , 13:24   Re: [Editor] AMXXPawn for Visual Studio Code
Reply With Quote #40

Quote:
Originally Posted by voed View Post
I have some suggestions, if its possible, of course:
1. For functions that have arguments, show hint with arguments by clicking on function name:
  • click here:
  • show this:

That's planned. Will probably do it in near future.

Quote:
Originally Posted by voed View Post
2. Add open parenthesis automatically when autocompleting function name; if function has no arguments, add closing parenthesis too:
  • type "read_fl", click enter, have "read_flags("
  • type "client_put", click enter, have "client_putinserver()"
That seems good to me, will do it.

Quote:
Originally Posted by voed View Post
3. Show define value when hover on its name
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.

Quote:
Originally Posted by voed View Post
4. May be pointless as hard to implement, but anyway. Show lang file string value on hover by lang key:
I'm not sure, may be pointless. If I ever get to implementing that it will be far down the line, seems kind of irrelevant compared to other features that should get implemented first.

Quote:
Originally Posted by voed View Post
Maybe just keep highlighting for already existing tags : Float:, bool:, Array:, any:, etc
Yeah I thought about that too. That would probably be the best thing to do.


Thanks for your input. Have some

Quote:
Originally Posted by wopox3 View Post
So in Ternary Boolean you need to remove the syntax highlighting.
Or find a competent way to determine the ternary operation and the declared type inside it.
I honestly don't think Regex can do that reliably, as I've said. Maybe though. I'll take a look at amxxpc code and try to figure out how it determines which ':' is for tags and which for ternary operator, may help me.

Last edited by klippy; 08-30-2017 at 13:26.
klippy 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 18:23.


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