A PowerBuilder Language Server with support for some basic features:
- Parsing most parts of PowerScript
- Linting Statements and complaining about type Errors
- LSP Features:
- Go to definition
- Go to type definition
- Basic Completion
- Hover
VSCode is the only editor supported by this project, but since this uses the LSP standard you should be able to install it on any editor that supports adding Custom Language Servers.
Get a .vsix file from the Releases and install it using code --install-extension powerbuilder-*.vsix or using > Extensions: Install from VSIX....
Preferably open a workspace with a .pbsln at the root of the project, the Server will detect the file and load the default project.
If you open a PowerBuilder file outside of a Solution, the Server will only use files that have been opened.
Take a look at ARCHITECTURE.md to get a base idea of the project.
Here are PowerBuilder features that are not supported yet or other general improvements that need work on, most of them have TODO(*topic*) comments inside the code that you can search for
- diagnostic: Improve the diagnostic messages shown to the user (linting)
- completion: Improve speed and accuraccy of completion
- proj: Things related to loading files and PowerBuilder Solutions (.pbsln and .pbproj xml)
- globals: Correctly handle global variables/functions
- forward: Correctly handle definitions inside forward blocks
- events: Event parameters need to be handled in a weird way
- errors: Show errors to user
Less Important TODOs (rare syntax features):
- arrays: Handle multi dimensional arrays, support
li_arr[] = { 1, 2, 3 } - ifs: Single line if with an else
if A then X elseif B then Y else Z - call: Add support for the
call f_func()syntax - groups: Add support for declarations using
group`class, correctly handle how variables access instance variables/functions of their parents
Not Important TODOs:
- sql: Validate SQL statements against a database
- perf: Possible performance improvements
- cleanup: Possible things we can remove, including handling warnings generated by rustc
- oleobject: add special case for __get_attribute etc. (take a look at the oleobject class in builtins/classes.pb)