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

Feature: inline completions #4623

Open
wants to merge 46 commits into
base: master
Choose a base branch
from

Commits on Nov 19, 2024

  1. fix: avoid calling line-number-at-pos with a value past the end of th…

    …e buffer
    
    When a overlay is displayed at the end of the buffer, (window-end) may return
    a value that is past the end of the buffer. Calling line-number-at-pos with a
    value outside of the buffer bounds raises an error.
    kassick committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    361255a View commit details
    Browse the repository at this point in the history
  2. feat: Inline Completion support

    Only the parser
    kassick committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    5caf44c View commit details
    Browse the repository at this point in the history

Commits on Nov 25, 2024

  1. Configuration menu
    Copy the full SHA
    7227d67 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    33025a0 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9c5fc21 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    2b9d47d View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    5ee78c1 View commit details
    Browse the repository at this point in the history
  6. chore: avoid linter errors

    kassick committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    b4f0c7c View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    f5b572b View commit details
    Browse the repository at this point in the history
  8. fix: forward prefix arg

    kassick committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    f9783fd View commit details
    Browse the repository at this point in the history
  9. fix: wrong function name

    kassick committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    828875b View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    d3ff223 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    8f13826 View commit details
    Browse the repository at this point in the history

Commits on Nov 26, 2024

  1. fix: avoid weird interactions with company-mode

    Check if company is active before displaying the overlay -- hide it if so
    kassick committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    1d4b7c8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    063fd89 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5f67185 View commit details
    Browse the repository at this point in the history
  4. fix: add external references

    kassick committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    3bab211 View commit details
    Browse the repository at this point in the history
  5. feat: provide a method to inhibit inline completion mode

    Add a list of predicates that can inhibit triggering inline completions --
    e.g.:
    
        ```elisp
        (defun lsp-inline-completion-inhibit-if-company-active ()
            (and (bound-and-true-p company-mode) (company--active-p)))
    
          (push 'lsp-inline-completion-inhibit-if-company-active lsp-inline-completion-inhibit-predicates)
        ```
    kassick committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    da2d8c2 View commit details
    Browse the repository at this point in the history
  6. chore: remove debug

    kassick committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    64e6a77 View commit details
    Browse the repository at this point in the history

Commits on Nov 27, 2024

  1. Configuration menu
    Copy the full SHA
    a1e7d7d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    92281ed View commit details
    Browse the repository at this point in the history
  3. fix: do not assume that the server response is a hash table

    Also, refactor how we parse the response, using pcase for a more explicit approach
    kassick committed Nov 27, 2024
    Configuration menu
    Copy the full SHA
    55d086a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0e81d72 View commit details
    Browse the repository at this point in the history
  5. refactor: extract company integration to a minor mode

    Users can enable the lsp-inline-completion-company-integration-mode if they
    see fit.
    
    Other completion frontends may be customized via hooks, just as this minor
    mode does
    kassick committed Nov 27, 2024
    Configuration menu
    Copy the full SHA
    a74edd4 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    80e210a View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    3c43167 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    612e90e View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    b19a8f1 View commit details
    Browse the repository at this point in the history
  10. fix: variable name

    kassick committed Nov 27, 2024
    Configuration menu
    Copy the full SHA
    231b867 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    49895b7 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    312626e View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    79dd07c View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    e20df27 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    f2b38e0 View commit details
    Browse the repository at this point in the history

Commits on Nov 28, 2024

  1. fix: ensure no state changes before triggering inline completion

    lsp-inline-completion--after-change, added to lsp on-change hooks, is
    triggered on a timer by `lsp--after-change`. The inline completion
    maybe-display function is also triggered on a timer and it must check if the
    position and current buffer did not change since the change as actually
    occurred.
    
    We can not store this state in lsp-inline-completion--after-change because the
    user may have clicked somewhere before the timer activated it.
    
    This commit introduces a `lsp--after-change-vals` plist to store the context
    before the timers have been started.
    
    lsp-inline-completion--after-change then fetches these values and forward as
    arguments to the timer invocation of maybe-display, which then ensures that
    the state has not changed.
    kassick committed Nov 28, 2024
    Configuration menu
    Copy the full SHA
    08c4c8d View commit details
    Browse the repository at this point in the history
  2. chore: no spinner on implicit inline completions

    It is a distraction.
    kassick committed Nov 28, 2024
    Configuration menu
    Copy the full SHA
    c560275 View commit details
    Browse the repository at this point in the history
  3. chore: always cancel timer

    kassick committed Nov 28, 2024
    Configuration menu
    Copy the full SHA
    3eeb087 View commit details
    Browse the repository at this point in the history
  4. chore: autoload keymap

    kassick committed Nov 28, 2024
    Configuration menu
    Copy the full SHA
    509f8ee View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    69e2fa3 View commit details
    Browse the repository at this point in the history
  6. fix: autoload minor modes

    kassick committed Nov 28, 2024
    Configuration menu
    Copy the full SHA
    8a5dc5c View commit details
    Browse the repository at this point in the history
  7. chore: fix indentation

    Auto-substitution of tabs to space did not use the correct number of spaces
    kassick committed Nov 28, 2024
    Configuration menu
    Copy the full SHA
    86abb87 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    a4243c2 View commit details
    Browse the repository at this point in the history
  9. chore: make show-keys private

    kassick committed Nov 28, 2024
    Configuration menu
    Copy the full SHA
    2b582bd View commit details
    Browse the repository at this point in the history
  10. chore: update default keymap

    kassick committed Nov 28, 2024
    Configuration menu
    Copy the full SHA
    13f340c View commit details
    Browse the repository at this point in the history

Commits on Nov 29, 2024

  1. Configuration menu
    Copy the full SHA
    b4cff81 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a109f34 View commit details
    Browse the repository at this point in the history