You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In short this happens because company-mode can't filter out the default tags-completion-at-point-function from completion-at-point-functions list because it is made a local variable in cider-mode(and cider-repl too) here https://github.com/clojure-emacs/cider/blob/master/cider-mode.el#L1011
When I do describe-variable completion-at-point-functions inside clojure buffer I see the following:
completion-at-point-functions is a variable defined in ‘minibuffer.el’.
Its value is
(cider-complete-at-point tags-completion-at-point-function ggtags-completion-at-point)
Local in buffer distribution_templates.clj; global value is
(tags-completion-at-point-function)
This variable may be risky if used as a file-local variable.
Which means that when cider repl is not connected - tags-completion-at-point-function is used for completion instead of expected ggtags-completion-at-point
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution and understanding!
Can you create a patch for this yourself? Seems the solution is clear:
Apparently, somehow you have tags-completion-at-point-function in the local value of completion-at-point-functions, which should never happen, as long as the latter variable's value is only changed using the hook functions (such as add-hook). When it's only in the global value, we filter it out in company--capf-data-real.
I wasn't aware we were supposed to modify it via a hook, but that's a simple fix.
Expected behavior
ggtags jumps to definition correctly when cider repl is not connected
Actual behavior
Visit tags table (default TAGS): ...
helm buffer pops up.Steps to reproduce the problem
I can only provide reproduction steps on Spacemacs.
SPC m g c
SPC m g g
orspacemacs/jump-to-definition
This behavior is described here: company-mode/company-mode#333 (comment)
In short this happens because
company-mode
can't filter out the defaulttags-completion-at-point-function
fromcompletion-at-point-functions
list because it is made a local variable in cider-mode(and cider-repl too) here https://github.com/clojure-emacs/cider/blob/master/cider-mode.el#L1011When I do
describe-variable completion-at-point-functions
inside clojure buffer I see the following:Which means that when cider repl is not connected -
tags-completion-at-point-function
is used for completion instead of expectedggtags-completion-at-point
Environment & Version information
CIDER version information
;; CIDER 0.18.0 (Saigon), nREPL 0.2.13
;; Clojure 1.9.0, Java 1.8.0_20
Lein/Boot version
Not relevant
Emacs version
GNU Emacs 26.1
Operating system
macOS 10.14.1
The text was updated successfully, but these errors were encountered: