Skip to content

Conversation

Shuangcheng-Ni
Copy link

@Shuangcheng-Ni Shuangcheng-Ni commented Dec 25, 2022

PR Prelude

Thank you for working on YCM! :)

Please complete these steps and check these boxes (by putting an x inside
the brackets) before filing your PR:

  • I have read and understood YCM's [CONTRIBUTING][cont] document.
  • I have read and understood YCM's [CODE_OF_CONDUCT][code] document.
  • I have included tests for the changes in my PR. If not, I have included a
    rationale for why I haven't.
  • I understand my PR may be closed if it becomes obvious I didn't
    actually perform all of these steps.

Why this change is necessary and useful

This change provides more available arguments for commands like YcmCompleter. The new available arguments --line_num= and --column_num= enables the commands to be executed at any position. Without these two arguments, the commands can only be executed at cursor position.

The result of the command YcmCompleter GetDoc --line_num=6 --column_num=2:
image


This change is Reviewable

This change provides more available arguments for commands like `YcmCompleter`. The new available arguments `--line_num=` and `--column_num=` enables the commands to be executed at any position. Without these two arguments, the commands can only be executed at cursor position.
@puremourning
Copy link
Member

Thanks for making a PR!

Whats the practical use case for this?

can you add tests? And docs?

@codecov
Copy link

codecov bot commented Dec 25, 2022

Codecov Report

Merging #4105 (b11ebef) into master (88efc6f) will decrease coverage by 0.10%.
The diff coverage is 33.33%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4105      +/-   ##
==========================================
- Coverage   86.41%   86.31%   -0.11%     
==========================================
  Files          33       33              
  Lines        4358     4361       +3     
==========================================
- Hits         3766     3764       -2     
- Misses        592      597       +5     

@Shuangcheng-Ni
Copy link
Author

Thanks for making a PR!

Whats the practical use case for this?

can you add tests? And docs?

Thanks for your quick reply! You may take a look at my latest PR. I'm going to use commands like YcmCompleter GetDoc --line_num=v:beval_lnum --column_num=v:beval_col to get the document of the symbols at the mouse pointer.

@Shuangcheng-Ni Shuangcheng-Ni deleted the patch-3 branch March 4, 2023 17:38
@Shuangcheng-Ni Shuangcheng-Ni changed the title More available arguments for commands More available arguments for ycmcompleter-subcommands Mar 4, 2023
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