company-mode / company-quickhelp Goto Github PK
View Code? Open in Web Editor NEWDocumentation popup for Company
License: GNU General Public License v3.0
Documentation popup for Company
License: GNU General Public License v3.0
With the delay set to 0.5, emacs became almost unresponsive, I had to hit C-g
a bunch and wait and hope.
This is with emacs 25 (railwaymacs port) on OSX, trying company-quickhelp on an Elixir buffer (using the alchemist package).
Quickhelp works quite well in an elisp buffer.
This issue is known in alchemist: tonini/alchemist.el#210
company-quickhelp overwrite the mark-region
keybinding (M-h
).
Please let this decision to the user configuration.
Regards
This is a really nice feature, thank you!
In emacs-lisp-mode
(I don't know what else you support) I noticed that it only works for items that have been loaded into the REPL. It would be good if it also worked for projects as defined by Cask
definitions, in much the way that flycheck is able to check a project based on the Cask definition.
This package looks cool, so I'd love to have support for it in company-coq
. Unfortunately, it doesn't seem to work out of the box: using M-h
yields:
Error running timer ‘company-quickhelp--show’: (wrong-type-argument stringp (#<buffer *company-coq: documentation*> . 34))
Hovering on candidates just shows the documentation buffer (company-coq displays the window by itself, so that's expected, but no pos-tip window is shown).
I have a few custom keybinds I use for company mode:
(define-key company-active-map (kbd "C-j") 'company-select-next)
(define-key company-active-map (kbd "C-k") 'company-select-previous)
(define-key company-active-map (kbd "C-ü") 'helm-company)
(define-key company-active-map (kbd "<tab>") 'company-complete-common-or-cycle)
If I activate company-quickhelp-mode
the first two keybindings will no longer work and
instead execute their globally bound (evil-mode) actions instead. The latter two keybinds
continue working as inteded. I also tried using C-w
, C-s
and J
, K
as well.
The former was equally broken while the latter was working properly.
This issue only appeas if company-quickhelp-mode
is active and the popup was visible. I'm able to use C-j
and C-k
to cycle though the completion candidates if no popup has yet appeared.
I'm using company version 0.9.0-cvs and the newest company-quickhelp installed from github via el-get.
First, let me say that I'm really glad I stumbled upon this package, because documentation pop-ups were the one thing I missed from auto-complete
!
I've got a suggestion: bind the company-quickhelp-manual-begin
command to company-active-map
instead of company-quickhelp-mode-map
. This way, the binding only applies when we are selecting company
candidates, not all the time.
company-quickhelp make navigation in company popup menu slow. I hope company-quickhelp doc popup can be triggered manually through a function keybinding.
Like this:
(setq company-quickhelp-delay 0.3) ; TODO: set to `nil' to trigger popup doc manually.
(define-key company-active-map (kbd "<f1>") 'company-show-doc-buffer)
(if (functionp 'company-quickhelp--show)
;; (define-key company-active-map (kbd "M-h") 'company-quickhelp--show)
(define-key company-active-map (kbd "M-h") 'company-quickhelp--show)
(define-key company-active-map (kbd "M-h") 'company-show-doc-buffer)
)
Hi, I'm experiencing an issue on OS X, and other members of the /r/emacs subreddit are seeing it too. On the github homepage for company quickhelp it shows this image, in which the documentation panel is basically an extension of the company completion menu. What I get instead (on OS X) is a little more disjointed interface that looks like this. It looks like this might be a bug in pos-tip, company quickhelp, or potentially a setup issue. Are there settings I can change that will allow pos-tip to present documentation in a way that better integrates with the company completion menu? I've already left a note for @pitkali on the pos-tip page.
For reference I'm running Emacs 25.1.50 (9.0) on OS X Yosemite (version 10.10.5).
It works in elisp-mode,but it didn't work in golang.
This is my emacs config:
(use-package company-quickhelp
:ensure t
:config
(company-quickhelp-mode 1)
(setq company-quickhelp-delay 0.2)
)
(provide 'init-company-quickhelp)
Thanks for your help!
I got the problem in elixir-mode.
Example: I type: Map.
then a list candidates but i can't select any of them. This problem is only occurred in elixir mode. I also tried in emacs-lisp-mode then it works fine. Can you help me to fix that?
Any chance to see this replacement ? When using emacs 25, pos-tip is a pain.
Hello. Could it be possible to get a variable to set the max height of the quick help (for example, to 10 lines -- such as the max height of my Company menu)?
Thanks in advance!
I just started using company-quickhelp
and I love it. But I was wondering if it's possible to open it in a new buffer, helm style, instead of using pos-tip
.
Thanks!
When committing using Magit ("c c" from Magit main buffer), an error occurs and then commit message buffer appears. However, when the commit message is submitted ("C-c C-c" from Magit commit message buffer), nothing actually happens.
Here is the error:
*ERROR*: Company: frontend company-quickhelp-frontend error "Symbol's function definition is void: pos-tip-hide" on command hide
If I disable company-quickhelp the error goes away.
I am getting the following error and I do not know how to fix it:
Company: An error occurred in post-command
Company: Front-end company-quickhelp-frontend error "Symbol's function definition is void: pos-tip-hide" on command hide
Error in post-command-hook (company-post-command): (error "Company: Front-end company-quickhelp-frontend error \"Symbol's function definition is void: pos-tip-hide\" on command hide")
hi,
this is my Backtrace when i use quickhelp
Debugger entered--Lisp error: (error "Window system frame should be used")
x-display-pixel-width(#<frame F1 0x102019f00>)
pos-tip-x-display-width(#<frame F1 0x102019f00>)
pos-tip-show("abort() -> does not return!\n\nAbort the interpreter immediately. This 'dumps core' or otherwise fails\nin the hardest way possible on the hosting operating system$
company-quickhelp--show()
apply(company-quickhelp--show nil)
byte-code("r\301^H\302H^H\303H"\210)\301\207" [timer apply 5 6] 4)
timer-event-handler([t 0 0 500000 nil company-quickhelp--show nil idle 0])
I have no idea why
Hello,
I'm getting an
Error running timer `company-quickhelp--show': (wrong-type-argument listp default:inherit)
twice in a row when waiting for a tooltip in company, and sometimes I'm getting an
Error while displaying tooltip: (wrong-type-argument listp default:inherit)
twice in a row in Messages buffer, but can't figure out when. And no tooltips at all.
GNU Emacs 25.0.50.6 (x86_64-unknown-linux-gnu, GTK+ Version 3.14.8), compiled from source.
I believe this was introduced with #57. It's a scope issue with the let block.
Hi, thanks for this package.
the font of the tip shown on my machine is not like other part of emacs (which is manoco). do you know how to change it?
Could probably use focus-out-hook
to hide the popup.
It seems pos-tip only supports GUI system. Do you have any plan to support Non-GUI system, or move it to popup which supports both systems? Thanks!
Auto-complete does this and I am curious if it could ever be possible to support the helpful pop ups on a non-GUI emacs?
Does this work in emacs -nw or the GUI only?
Would it be worth adding a toggle on/off function? I was using the following because the overlay was blocking the dropdown on occasion
(defun company-quickhelp-toggle ()
"Toggle pos-tip on and off."
(interactive)
(or (x-hide-tip)
(company-quickhelp-manual-begin)))
(define-key company-quickhelp-mode-map (kbd "M-h")
#'company-quickhelp-toggle)
Emacs 25.1.1 on redhat 6.6
When I first open the window I get a flicker when the postips show up.
The redraw is not acting correctly.
I can immediately correct this by resizing the frame with my mouse. Then the flicker goes away.
This only happens in daemon mode (when I run 'emacs' I don't see the issue).
Using company-quickhelp with elpy and Emacs 25.0.50, I see this behavior when completing:
RT.
I've tried using M-x customize-group RET company-quickhelp RET
to find out how to customize faces. I've done the same with pos-tip
, and followed this advice. However, I'm still unable to change the faces.
Any hints on what may be happening?
Thanks for this great package!
I cannot get it working.
It displays below error during initialization.
Error in post-command-hook (company-post-command):
(error "Company: Front-end company-quickhelp-frontend error
\"Symbol's function definition is void: pos-tip-hide\" on command hide")
I am not getting any popup documentation using company for completion.
I have this in my init.el:
(global-company-mode)
(company-quickhelp-mode 1)
I have tested with elisp in the scratch buffer and no popup :-(
I am using:
GNU Emacs 24.3.50.1
company 20150220.1432
company-quickhelp 20150215.250
on OSX Yosemite.
I've got the quickhelp popup working fine in the cider-repl buffer. In Clojure buffers, on the other hand, I only get the help popup for 'def', no other text triggers it. I get the company completion popup as expected, for any valid prefixes, but as I move over the candidates, no help is shown - except it is for 'def'.
I'm on Windows 8.1 64 bit, Emacs 24.5.1
I'm running emacs in terminal mode ( -nw
), version 24.5.1
.
I noticed this really cool plugin and wanted to try it out. Unfortunately, when running company-quickhelp-manual-begin
manually, I noticed the error:
Error running timer `company-quickhelp--show':
(user-error "Company-quickhelp doesn't work in the terminal")
Please make this plugin work with emacs terminal mode.
Here is the situation: the popup dialogue of doc info is not besides the candidate list, but appears quite randomly, as shown below. (sometime, quite less frequently, it works well.) The worst case is like the last picture. It is my first time use company-quickhelp
. Any ideas? Many thanks!
Configurations:
(require 'company)
(add-hook 'after-init-hook 'global-company-mode)
(company-quickhelp-mode 1)
Versions:
company-20170112.200
(the stable version on ELPA is the same)company-quickhelp-20170119.2217
emacs-25.1.91.1
pos-tip-20150318.813
On OSX by default, M-h
will hide the current window, so emacs will just "disappear". In addition, if I try ESC h
instead, I just trigger emacs' default M-h behavior
. Maybe suggest C-c h
or something similar?
I have installed company-quickhelp version 20150611.2305
from Melpa with these dependencies:
I started experiencing a weird bug today, the initialization of emacs daemon was freeze exactly on the line (company-quickhelp-mode 1)
in my Emacs configuration. I've been using company-quickhelp for about two weeks or so but this is the first time it presents a critical issue like this one.
Starting a non-daemon session of emacs don't get freeze during initialization.
First of all, thanks for the great plugin!
This screenshot is from emacs-fsharp-mode. It looks as if company-quickhelp doesn't respect line breaks that appear in the output.
I can understand the text wrapping, but I think that line breaks should be respected because it makes the popup quite difficult to read otherwise.
Hello,
I think it would be nice to be able to color certain elements in the text just like syntax highlighting. this would be possible with 'pos-tip-show-no-propertize' instead of 'pos-tip-show'. Let me know what you think.
To reproduce:
"GNU Emacs 24.5.1 (i686-pc-mingw32) of 2015-04-11 on LEG570"
Windows 7
It slows down most company operations. It hangs all the time for a few seconds.
Tested with elpy-mode (a python) mode and emacs-lisp-mode
profiler-report
- timer-event-handler 966 92%
- byte-code 966 92%
- apply 966 92%
- company-quickhelp--show 965 92%
- pos-tip-show 962 91%
- pos-tip-show-no-propertize 962 91%
- x-show-tip 950 90%
- face-set-after-frame-default 629 60%
- byte-code 629 60%
- face-spec-recalc 627 59%
+ face-spec-set-2 309 29%
- make-face-x-resource-internal 302 28%
- set-face-attributes-from-resources 300 28%
- set-face-attribute-from-resource 297 28%
+ face-name 26 2%
+ face-spec-reset-face 12 1%
face-spec-choose 1 0%
- frame-set-background-mode 320 30%
- face-spec-recalc 308 29%
- make-face-x-resource-internal 290 27%
- set-face-attributes-from-resources 287 27%
- set-face-attribute-from-resource 284 27%
- face-name 14 1%
+ check-face 13 1%
+ face-spec-reset-face 16 1%
+ face-spec-set-2 1 0%
face-spec-choose 1 0%
+ face-attr-match-p 12 1%
+ pos-tip-compute-pixel-position 3 0%
+ company-quickhelp--doc 3 0%
+ company-idle-begin 1 0%
+ ... 68 6%
+ command-execute 12 1%
tooltip-hide 2 0%
So as I'm typing something in a Clojure buffer, company's completion box appears. After ~3.5 seconds (delay is consistent, I measure it a few times) a help window shows up. If I then start switching between completion candidates, the delay before help appears is the expected 0.5 seconds. Any ideas where the initial delay comes from?
Env: the very latest CIDER, cider-nrepl, company and company-quickhelp.
When using company quickhelp and Alchemist (Elixir completion server) often Emacs will hang and use 100% CPU. The only solution seems to be to restart Emacs by force-quitting it.
The author of Alchemist seems to think this is caused by an incompatibility between company quickhelp and the asynchronous way Alchemist returns documentation.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.