Skip to content

Add argument parser feature to the LSP. #218

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Apr 14, 2025

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
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