Skip to content
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

refactor: improve get_clients_from_cmd_args #2943

Merged
merged 1 commit into from
Jan 31, 2024

Conversation

sys9kdr
Copy link
Contributor

@sys9kdr sys9kdr commented Dec 20, 2023

improve the get_clients_from_cmd_args for better readability and consistency.

  • Replaced dictionary-based storage with a table for clients in the get_clients_from_cmd_args function.
  • Utilized the '#' operator to accurately count clients and enhance code readability.
  • Updated the condition for checking if the result table is empty using the '#' operator.

@sys9kdr sys9kdr requested a review from glepnir as a code owner December 20, 2023 16:51
@sys9kdr
Copy link
Contributor Author

sys9kdr commented Dec 20, 2023

Probably works, but not thoroughly tested yet

improve the get_clients_from_cmd_args for better readability and consistency.

- replace unnecessary dictionary-based approaches with array-based ones.
- use the '#' to improve code readability.
- use the '#' for an empty check.
@sys9kdr sys9kdr force-pushed the refactor/get_clients_from_cmd_args branch from 0ce86ef to 8d6048d Compare December 20, 2023 23:16
@sys9kdr
Copy link
Contributor Author

sys9kdr commented Dec 20, 2023

Manually, I confirmed that LspRestart and LspStop work.

Copy link
Member

@justinmk justinmk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems ok I guess. @glepnir ?

@glepnir glepnir merged commit e3c3ab7 into neovim:master Jan 31, 2024
9 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.

3 participants