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

add support for company-mode jump to location in robe-complete-at-point #62

Closed
stardiviner opened this issue Sep 1, 2015 · 3 comments
Closed

Comments

@stardiviner
Copy link

company-mode has a keybinding to jump to candidate location, and company-mode use company-capf for completion-at-point-functions and robe-complete-at-point.
robe-complete-at-point has annotation support already. I hope robe can add robe-jump to in completion function as support.

Thanks in advance.

@dgutov
Copy link
Owner

dgutov commented Sep 1, 2015

I will. You can use company-robe in the meantime.

@stardiviner
Copy link
Author

I try to add by myself.

(defun robe-complete-at-point ()
  (when robe-running
    (let ((bounds (bounds-of-thing-at-point 'symbol))
          (fn (if (fboundp 'completion-table-with-cache)
                  (completion-table-with-cache #'robe-complete-thing)
                (completion-table-dynamic #'robe-complete-thing))))
      (when (robe-complete-symbol-p (or (car bounds) (point)))
        (if bounds
            (list (car bounds) (cdr bounds) fn
                  :annotation-function #'robe-complete-annotation
                  :company-location #'robe-jump
                  :exit-function #'robe-complete-exit)
          (list (point) (point) fn
                :annotation-function #'robe-complete-annotation
                :company-location #'robe-jump
                :exit-function #'robe-complete-exit))))))

But it does not work, can't jump directly. Maybe need to exit company popup menu at first?

@dgutov
Copy link
Owner

dgutov commented Sep 2, 2015

robe-jump does not return the right value for :company-location.

@dgutov dgutov closed this as completed in 8707607 Mar 18, 2024
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

No branches or pull requests

2 participants