AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   General (https://forums.alliedmods.net/forumdisplay.php?f=7)
-   -   [Editor] AMXXPawn for Visual Studio Code (https://forums.alliedmods.net/showthread.php?t=300661)

AnimalMonster 05-15-2023 21:55

Re: [Editor] AMXXPawn for Visual Studio Code
 
Quote:

Originally Posted by klippy (Post 2544203)
AMXXPawn Language Service for VSCode


An extension for Visual Studio Code that adds support for the AMXXPawn language.


Features

Right now this is pretty much an early preview/beta version with features lacking, and some features even not working properly. Even though it's unfinished, I've posted this solely to get feedback. I encourage you to post in this topic and help me improve this extension.

However, here is a basic preview of currently implemented features:

Visual Studio Code

In case you haven't heart of Visual Studio Code (VSCode) yet - it's an open-source multiplatform text/code editor developed and maintained by Microsoft. It's entirely written in TypeScript using Electron framework. It has many great built-in features like Git integration and Debugging support, but also has support for extensions (just like this one), of which there are many.
VSCode has been my go-to editor for many other languages (especially for Node.js development) for a while now, but it never had proper Pawn support. This extension aims at improving Pawn language support in VSCode.

Official site & Downloads


Installation Instructions

Installation is pretty straightforward, thanks to VSCode's great support for extensions.
All you have to do is to open the Extensions View (by using the bar on the left hand side or pressing Ctrl+Shift+X), search for "amxxpawn" and click the "Install" button, then reload VSCode.
Make sure to install the one with my name as there are two registered amxxpawn extensions.
https://image.prntscr.com/image/unHa...8QmNbx3oCA.png



Source Code
Change Log

Contributions are welcome.
Also, if you have any ideas/suggestions/critiques, please post in this topic.

TODO:
Code:

- Properly parse and resolve #include directives.
    - Right now only #include <filename> format is supported
    - #include "filename" and #include filename should look in the current directory and the list of include directories.
    - #include <filename> should only look in the list of include directories.


- Handle #tryinclude

- Properly handle block comments and scopes (brackets) when parsing files, some edge cases may break the parser

- In addition to functions, parse:
    - Global variables/constants (not completely done)
    - Enumerations
    - #define directives

- Add Go to Definition/Peek Definition for symbols

- Parse doc-comments and display them together with completions and signature help

- Handle dependency timestamps - if a dependency has changed, reparse it

- (maybe) Add basic IntelliSense implementation (requires a new parser):
    - Detect tag mismatches
    - Detect unreachable code
    - Wrong syntax

- (maybe) Make function parameters tag-aware and suggest only (or prioritize) symbols that have the same tag
- (maybe) Make array element access enum-aware and sugest only (or prioritize) members of the same enum

- (maybe) Make the parser scope aware and parse symbols in scopes too so completions can suggest local variables and parameters


Will you make an update soon?

fysiks 05-15-2023 23:55

Re: [Editor] AMXXPawn for Visual Studio Code
 
Quote:

Originally Posted by AnimalMonster (Post 2804416)
Will you make an update soon?

Is there something specific you're asking for or having trouble with? I use this for all my work these days and it works quite well overall.


All times are GMT -4. The time now is 07:33.

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