Skip to content

Conversation

@joewyz
Copy link
Contributor

@joewyz joewyz commented Apr 9, 2025

Description of changes:
Add the argument parser feature to the LSP and modified the Main class.

The argument parser will be able to parse the help and port-number arguments for now. For port-number argument, both flag argument and positional argument are supported.

Help print example:


Usage: java -jar smithy-lsp.jar [--help | -h] 
                                [--port-number | -p PORT_NUMBER] 
                                [<port_number>] 

Options for the Smithy Language Server:

    --help, -h
        Print this help output.
    --port-number, -p PORT_NUMBER
        The port number to be used by the Smithy Language Server. Default port 
        number is 0 if not specified.
    <port_number>
        Positional port-number.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@joewyz joewyz requested a review from milesziemer April 9, 2025 18:18
@joewyz joewyz requested a review from a team as a code owner April 9, 2025 18:18
@milesziemer milesziemer merged commit 5511ee5 into smithy-lang:main Apr 14, 2025
3 checks passed
@joewyz joewyz deleted the joewyz/argument-parser branch April 28, 2025 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants