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

[READY] Implement type/call hierarchy handling #4221

Merged
merged 34 commits into from
Jun 20, 2024

Commits on May 11, 2024

  1. Configuration menu
    Copy the full SHA
    dbcca3d View commit details
    Browse the repository at this point in the history
  2. Clean up API

    bstaletic committed May 11, 2024
    Configuration menu
    Copy the full SHA
    93833dc View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    705803a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    729806c View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    fcf89f0 View commit details
    Browse the repository at this point in the history
  6. flake8

    bstaletic committed May 11, 2024
    Configuration menu
    Copy the full SHA
    65456b2 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    08353bc View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    0ce21e2 View commit details
    Browse the repository at this point in the history

Commits on May 13, 2024

  1. Close the popup when non-handled key pressed

    This makes the popup disappear if you keep typing or enter inser mode or
    move the cursor etc.
    
    I found it jarring that previously it would just move the cursor behind
    the popup and such until you hit escape. Makes the popup more "modal"
    but without actually stopping you from continueing.
    
    Also:
    
    - Use simliar up/down keys as the symbol finder (c-p, c-k, c-n, c-j
      etc.)
    - SetupFoo -> SetUpFoo because the verb is "To set up" (rather than the
      noun "a setup".
    - purge barbaric 80+ character lines
    puremourning authored and bstaletic committed May 13, 2024
    Configuration menu
    Copy the full SHA
    f1937cf View commit details
    Browse the repository at this point in the history
  2. Basic popup aesthetics

    We try to be a bit consistent with the finder poppup, but
    implementation-wise this is simpler. The idea is that there are 3
    columns, each having 1/3 of the popup width. We fix the width of the
    popup (like we do for the finder) and set the tabstop to 1/3 of the
    internal width (core_width).
    
    Then when displaying text, we truncate "columnns" according to that
    tabstop (to avoid mess). To do this, we pass structured data from the
    python layer to vimscript and construct the line text there. This will
    also help later when we add in the syntax highlight (text properties)
    like we have for the finder popup.
    puremourning authored and bstaletic committed May 13, 2024
    Configuration menu
    Copy the full SHA
    c217e66 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    72026b3 View commit details
    Browse the repository at this point in the history

Commits on May 14, 2024

  1. Style the hierarchy popup like the finder popup

    This basically involves moving the properties mapping to its own place,
    and creating text properties to overlap the various parts of the popup
    columns. Style matches, and feels correct.
    
    Fiddly part is that we have to (for some reason) set cursorline every
    time we move the cursor, but ain't nobody gonna be able to explain why,
    and why that only necessary after launching the finder popup window
    once. Some wierd vim bug is my guess.
    puremourning authored and bstaletic committed May 14, 2024
    Configuration menu
    Copy the full SHA
    6ca4659 View commit details
    Browse the repository at this point in the history
  2. Trim leading/trailing whitespace from description

    This makes the columns seem less broken, particularly for leading
    whitespace. This is particularly problematic due to our use of tabstop:
    if the leading whitespace was a tab, it would go nuts.
    
    It would still go nuts for any other literal tab in the description.
    Perhaps we should fix that too.
    puremourning authored and bstaletic committed May 14, 2024
    Configuration menu
    Copy the full SHA
    ea6cb61 View commit details
    Browse the repository at this point in the history
  3. Explain offsets

    puremourning authored and bstaletic committed May 14, 2024
    Configuration menu
    Copy the full SHA
    fa73852 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    3376c05 View commit details
    Browse the repository at this point in the history
  5. Log server exceptoins

    puremourning authored and bstaletic committed May 14, 2024
    Configuration menu
    Copy the full SHA
    2a68752 View commit details
    Browse the repository at this point in the history

Commits on May 17, 2024

  1. flake8

    bstaletic committed May 17, 2024
    Configuration menu
    Copy the full SHA
    9d8d267 View commit details
    Browse the repository at this point in the history

Commits on Jun 9, 2024

  1. Avoid nasty crashes in othervim

    puremourning authored and bstaletic committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    6c3832d View commit details
    Browse the repository at this point in the history

Commits on Jun 10, 2024

  1. Configuration menu
    Copy the full SHA
    3702f46 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    489dcb1 View commit details
    Browse the repository at this point in the history
  3. Fix re-rooting of call/type hierarchies

    Previously, when changing direction of hierarchy and re-rooting the
    hierarchy tree, we would retain the old node as the new root.
    That works most of the time, but fails in the face of multiple
    inheritance and switching to supertypes. In that, problematic, case, the
    resulting hierarchy will be missing some supertypes.
    Worse, if a call hierarchy contains a node with multiple locations,
    re-rooting to that node behaved in a way that defies explanation.
    
    The solution is to throw away everything and start a new hierarchy
    completely every time a user requests re-rooting.
    
    This trades some performance for correctness, but this is not at all
    performance sensitive.
    bstaletic committed Jun 10, 2024
    Configuration menu
    Copy the full SHA
    8888bbe View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    546b050 View commit details
    Browse the repository at this point in the history

Commits on Jun 11, 2024

  1. Configuration menu
    Copy the full SHA
    31f6517 View commit details
    Browse the repository at this point in the history
  2. Fix sending requests for a location in an unloaded buffer

    In order to send a ycmd request for an unloaded buffer one must first...
    load the buffer.
    That is the only way to reliably determine the buffer's filetype.
    However, we do not want to switch to the buffer, so everything needs to
    be done "in the background".
    
    `:badd` adds a buffer as unloaded, if it were not present before.
    `bufload()` loads a buffer that has previously not been loaded.
    bstaletic committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    67c02b8 View commit details
    Browse the repository at this point in the history
  3. Properly calculate selection offset when expanding hierarchy upwards

    Previously all new nodes were counted as 1.
    With call hierarchies, there may be more locations/lines per hierarchy
    node. In that case, the cursorline would be set to the wrong line.
    
    Instead, we need to add up the lengths of all the item locations.
    bstaletic committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    e354a54 View commit details
    Browse the repository at this point in the history
  4. Fix python tests... again

    bstaletic committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    5e03ee0 View commit details
    Browse the repository at this point in the history

Commits on Jun 12, 2024

  1. Configuration menu
    Copy the full SHA
    bbd0f03 View commit details
    Browse the repository at this point in the history
  2. Flake8 fixes

    bstaletic committed Jun 12, 2024
    Configuration menu
    Copy the full SHA
    866128c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    53f4a42 View commit details
    Browse the repository at this point in the history

Commits on Jun 18, 2024

  1. Update ycmd submodule

    Changelog:
    
    1. Upgrade all subservers
    2. Hierarchy support
    bstaletic committed Jun 18, 2024
    Configuration menu
    Copy the full SHA
    f05f89e View commit details
    Browse the repository at this point in the history

Commits on Jun 19, 2024

  1. Fix vim tests for hierarchies

    Previously the tests were using async result checking, but this is
    intended for insert mode only. In fact we were running off the end of
    the test and then the check callbacks were firing.
    
    Simplified by just making it the same but sequential, and replacding
    FeedAndCheck* with direct calls to feedkeys(..., 'xt').
    puremourning authored and bstaletic committed Jun 19, 2024
    Configuration menu
    Copy the full SHA
    87939d6 View commit details
    Browse the repository at this point in the history
  2. Remove use of indexof()

    indexof was added so recently that even vim-helptag-versions website
    doesn't have it. Replace with a loop.
    puremourning authored and bstaletic committed Jun 19, 2024
    Configuration menu
    Copy the full SHA
    2eff94b View commit details
    Browse the repository at this point in the history
  3. Clean up hierarchies.test.vim

    There were some unnecessary `WaitForAssert()` calls and unnecessary
    `silent` commands.
    bstaletic committed Jun 19, 2024
    Configuration menu
    Copy the full SHA
    ac002d5 View commit details
    Browse the repository at this point in the history
  4. Clean up BuildRequestDataForLocation

    - `badd` is unnecessary since we have `GetBufferNumberForFilename()`
    - Instead of passing `location`, we can pass `file`, `line` and `column`
      separately.
    bstaletic committed Jun 19, 2024
    Configuration menu
    Copy the full SHA
    25ec3c9 View commit details
    Browse the repository at this point in the history