Giter Club home page Giter Club logo

company-box's Introduction

company-box

MELPA

A company front-end with icons.

company-box

Differences with the built-in front-end:

  • Differents colors for differents backends.
  • Icons associated to functions/variables/.. and their backends
  • Display candidate's documentation (support quickhelp-string)
  • Not limited by the current window size, buffer's text properties, .. (it's better than you might think)

This package requires emacs 26.
Also, not compatible with emacs in a tty.

Installation

;; With use-package:
(use-package company-box
  :hook (company-mode . company-box-mode))

;; Or:
(require 'company-box)
(add-hook 'company-mode-hook 'company-box-mode)

To customize:
M-x customize-group [RET] company-box [RET]

Backends colors

See the docstring of the variable company-box-backends-colors:
C-h v company-box-backends-colors

Themes

You can select different themes with company-box-icons-alist

Icons

See the variable company-box-icons-functions

For now, there are customs icons for 4 backends only: company-lsp, company-elisp, company-yasnippet and company-php.
You can customize their icons with the variables:
company-box-icons-lsp, company-box-icons-elisp, company-box-icons-yasnippet and company-box-icons-acphp.

Notes:
By default, images are used to display icons.
You can also use font icons
With images, you can't change icons colors

Top margin

You can position the frame downwards by setting the variable company-box-frame-top-margin to a positive number. This is useful if your base code/text has an enlarged line height, and company box is intruding into the line above. It's also useful, if you're using copilot and want to see a few lines of suggested code unobscured by the company box. See PR #205 for details.

You can set the top margin mode-dependent via mode hooks, if you want. E.g. in Doom Emacs:

(use-package! company-box
  :defer t
  :config
  (setq-hook! 'prog-mode-hook
    company-box-frame-top-margin 20)
  (setq-hook! 'text-mode-hook
    company-box-frame-top-margin 75)
)

company-box's People

Contributors

a13 avatar alexander-miller avatar andersjohansson avatar basil-conto avatar blindingdark avatar csbigdatahub avatar gyst avatar hawkinst avatar hi-angel avatar jcs090218 avatar jguenther avatar joostkremers avatar karatasfurkan avatar kiennq avatar larebsyed avatar leodag avatar nasyxx avatar nbfalcon avatar noctuid avatar ppwwyyxx avatar real-or-random avatar renatofdds avatar sebastiencs avatar stardiviner avatar tomterl avatar valdaer avatar yqrashawn avatar yyoncho avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

company-box's Issues

Failed to complete with perspective mode

Hi,

I am using perspective with company-box.

The company-box not fully cooperate with perspective now. If both packages is configured the completion failed with error:

Company: An error occurred in auto-begin
Company: frontend company-box-frontend error "Wrong type argument: perspective, nil" on command update

I have found a workaround. I need to disable persp-mode, use a company-complete at least one and restore persp-mode to be enabled.

I have no any other clue what can be wrong :(

images folder through melpa missing

When I installed company-box through melpa I got errors that images were missing. Turned out the whole images folder was not in the package folder. After copying it manually from github everything works fine. I don't know much about melpa. I just know some packages seem to come with "extra" content and some download it via curl or something on first run. You might look into the issue I assume it's easy to fix.

`company-box` (+`icons-in-terminal`) slows down Emacs in `*ielm*` buffer.

(Note: I posted a first version of this report accidentally, probably triggered some Github keyboard shortcut...)

I installed company-box the other day and decided to try out icons-in-terminal as well, and they look great and generally work well.

I ran into one weird problem, though. I was doing some stuff in an *ielm* buffer when I typed (funcall some-var) at the *ielm* prompt. This was silly, because some-var didn't have a function value, so I just got an Invalid function error. The error, however, printed the value of the variable as well.

The point is that this variable contains a fair bit of data. It is a list of three instances of a particular struct, with one of the struct's members being a hash table. The hash tables in these three instances together contain some 1200 items, each an alist of string-string pairs. All of this was dumped to the *ielm* buffer.

From this point onward, company-box sent Emacs into high CPU use (top reporting up to and over 100% CPU use). Even a simple M-x taking seconds to execute. This only happens in the *ielm* buffer, though, and only as long as this variable's value is in the buffer. As soon as I switch to another buffer, even if that's some Elisp file, the slowness disappears. The slowness also disappears if I delete the variable's value from the buffer.

What's also weird is that if I type some-var at the *ielm* prompt, the entire value is printed as well, but there is no slowness after that. Emacs works fine. It's only when the value is printed as part of the error.

Below is a report from the cpu profiler during the slowness, and the memory profiler after that. Note that I wasn't actually doing anything during the time this profile was gathered. I just did M-x profiler-start and then sat staring at the screen for a minute or so.

I know this is a rather weird report, with very untypical circumstances, and you probably can't reproduce it. (Can I serialize a defstruct somehow? Then I could get the data to you.) But perhaps the profiler report gives you an idea why Emacs might be slowing down in exactly these circumstances...

- company-post-command                                          20968  57%
 - company--perform                                             20968  57%
  - company-call-frontends                                      20484  56%
   - company-box-frontend                                       20484  56%
    - company-box-show                                          20484  56%
     - company-box--with-icons-p                                20338  56%
      + posn-at-point                                               8   0%
     + company-box--display                                       130   0%
     + mapcar                                                      16   0%
  + company--continue                                             484   1%
- timer-event-handler                                           12463  34%
 - apply                                                        12463  34%
  - company-idle-begin                                          10207  28%
   - company-auto-begin                                         10207  28%
    - company--perform                                          10207  28%
     - company-call-frontends                                   10176  28%
      - company-box-frontend                                    10176  28%
       - company-box-show                                       10176  28%
        - company-box--display                                   7917  21%
         - company-box--set-frame-position                       7917  21%
          - company-box--point-bottom                            5657  15%
           + redisplay                                           3397   9%
             window-in-direction                                 2260   6%
            company-box--prefix-pos                              2247   6%
          + select-frame                                           13   0%
          company-box--with-icons-p                              2259   6%
     + company--begin-new                                          31   0%
  + #<compiled 0x3ced35>                                         2223   6%
  + #<compiled 0x27f107>                                           33   0%
+ command-execute                                                2770   7%
+ ...                                                              36   0%
+ redisplay_internal (C function)                                   4   0%

And the memory profiler:

- company-post-command                                 12,839,883,014  59%
 - company--perform                                    12,839,881,958  59%
  - company-call-frontends                             12,839,587,702  59%
   - company-box-frontend                              12,839,587,702  59%
    - company-box-show                                 12,839,587,702  59%
     - company-box--with-icons-p                       12,828,090,696  59%
      + posn-at-point                                         100,584   0%
        window-edges                                            1,056   0%
     + company-box--display                                 9,058,088   0%
     + mapcar                                               1,747,966   0%
  + company--continue                                         294,256   0%
 + company-call-frontends                                       1,056   0%
- timer-event-handler                                   7,488,681,739  34%
 - apply                                                7,488,681,739  34%
  - company-idle-begin                                  6,418,500,524  29%
   - company-auto-begin                                 6,418,500,524  29%
    - company--perform                                  6,418,500,524  29%
     - company-call-frontends                           6,418,405,496  29%
      - company-box-frontend                            6,418,405,496  29%
       - company-box-show                               6,418,405,496  29%
        - company-box--display                          4,992,914,008  23%
         - company-box--set-frame-position              4,992,863,857  23%
          - company-box--point-bottom                   3,566,599,468  16%
           + redisplay                                  2,140,327,032  10%
           + window-in-direction                        1,426,272,436   6%
          + company-box--prefix-pos                     1,425,333,048   6%
          + select-frame                                      931,200   0%
         + company-box--render-buffer                           1,690   0%
        + company-box--with-icons-p                     1,425,338,200   6%
        + mapcar                                              105,784   0%
     + company--begin-new                                      95,028   0%
  + #<compiled 0x3ced35>                                1,070,174,544   5%
  + save-some-buffers                                           6,671   0%
+ command-execute                                       1,074,682,198   5%
+ ...                                                           8,188   0%
+ redisplay_internal (C function)                               6,272   0%

Completion box shrinks when scrolling through completions

I'm using emacs and when I use arrow keys or any other keys to cycle through the completions, the box containing the completions and documentation shrinks.

Before scrolling:
image

After scrolling a few times:
image

I tried with no configuration for company box also (the screenshot has configuration) and still the same.

Sharing between environments: path for icons hardwired in .elc

Hi,

I share my .emacs.d and elpa between emacs W64 (Windows) and emacs WSL (Ubuntu).
The variable company-box-icons-dir is compiled in the .elc file so that is a problem
because when I change environments, I need to recompile the package.
Also, given that it is assumed that the directory exists, no checking is done, but
the display is weird when the icons are not found.

Apart from this small problem, nice extension to company-mode.

Regards,

Company box throws error on resize which leaves completion popup stuck

This happens when the list shrinks from a long list with scroll to a small one without scroll.

Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
  company-box--set-frame-position(nil)
  company-box--on-start-change()
  company-box--post-command()
  company-box-frontend(post-command)
  company-call-frontends(post-command)
  company-post-command()

Screencast:
company-box-bug

Colorscheme

Not an issue, just wanna know if you could tell me the colorscheme used in the screenshot from the README. Looks pretty neat.

Thanks!

Icons are very large

screenshot from 2018-06-07 11-31-33

My I don't think my configuration is anything special. I do use variable width text for almost all faces though (which is one reason I'm very interested in company-box

You need an evil-company-box-state

Same reason I need my own treemacs-evil. Setting a cursor-type won't do since evil is managing your cursor. You need to define a proper evil state and activate it in the company-box buffer.

I can make the necessary changes, just let me know if you want this to be part of the main package (so as to avoid the awkward not-really dependency on evil) or if it should go into its own file and package.

Replicate Company-Tng Behaviour

Company-box does not cooperate with other company frontends. While trying to find a solution to the problem asked here I noticed that company-box does not allow company-tng to work. It would be nice to have the behaviour described in that thread implemented within company-box.

Icons should all be the same size

Otherwise there's ugly misalignment: https://imgur.com/a/QdshJe3

When this is assured I also have plans for PRs to

  1. ensure that line height in company-box will take the height of icons into account (also visible in the picture, only half of the last line is visible).
  2. add an option to resize icons interactively

Company candidate number disappear

Hi.

It's working fine (setq company-show-numbers t) without company-box. Can I get company candidate number back while using company-box ?

Thank you for company-box.

desktop-save-mode integration: it should ignore company-box buffers/windows

Hi, and thanks for this package!

I'm using desktop-save-mode which is meant to save parts of emacs (e.g. buffers, windows, variables) on emacs start. It incorrectly restores company-box windows. Here's a screenshot of a fresh emacs that has company-box windows/buffers revived from the previous session:

screen shot 2018-07-18 at 07 28 58

The fix should be a simple one - desktop-save-mode has to be configured to ignore company-box windows/buffers. I'll post here if I find a fix.

mac os x - company box incompatible with full screen

Upon the opening of the box itself. A box appears in the center of the screen, then it snaps into place. However the title bar is no longer accesible, moving the mouse up to the top shifts you over to left, to a new, all-black, screen.

ezgif-1-e7e929faf476

This gif doesn't capture it super well (the app crashes I think because on top of that I had video capture running) usually it doesnt crash, I just end up with an black screen, and I cant access the top bar by bringing my mouse near the top.

Company-box-doc does not fit inside the screen

Similar to how you can flip the position of the company-box, would it be possible to horizontally position the company-box-doc relative to its frame position? For example, in the image below it would be better if the doc was displayed on the left.
screenshot-2018-05-11_08-22-23

Candidates sometimes disappear when company-box-enable-icon is t

Candidates sometimes disappear when company-box-enable-icon is t

setq company-box-enable-icon t:

peek 2018-07-16 12-00

setq company-box-enable-icon nil:

peek 2018-07-16 13-42

Config:

(use-package company
  :defer 1
  :config
  (setq company-tooltip-align-annotations t)
  (company-tng-configure-default)
  (global-company-mode))

(use-package company-box
  :hook (company-mode . company-box-mode))

display company-box child-frame height based on font size

image
You can see the third candidate is not fully displayed.
Don't know whether company-box child-frame can display based on company-box child-frame font size.

Here is my config changed company-box frame font:

(add-to-list 'company-box-frame-parameters
               '(font . "-SRC-Hack-normal-normal-normal-*-12-*-*-*-m-0-iso10646-1"))
  (add-to-list 'company-box-frame-parameters
               '(font-parameter . "-SRC-Hack-normal-normal-normal-*-12-*-*-*-m-0-iso10646-1"))

Additionally remove company-pseudo-tooltip-frontend from company-frontends

company-tng, for example, adds company-pseudo-tooltip-frontend to company-frontends. Right now, company-box only deletes company-pseudo-tooltip-unless-just-one-frontend which causes issues since company-pseudo-tooltip-frontend is still in companyf-frontends. It may not be ideal, but company-childframe actually advises company-call-frontends to remove both company-pseudo-tooltip-frontend and company-pusedo-tooltip-unless-just-one-front-end. For now, I'm just additionally deleting company-pseudo-tooltip-frontend from company-frontends in my config after loading company-tng.

Scrollbar issue

Hi, huge fan of company-box and definitely wanna try sidebar.el.

However, I can't get icons-in-terminal working on High Sierra (maybe my fault, I hacked the CoreText stuff to get all-the-icons working).

Anyway, using:

(when (display-graphic-p)
  (def-package! company-box
    :hook (company-mode . company-box-mode)
    :init
    (setq company-box-icons-elisp
          (list
           (concat (all-the-icons-material "functions") " ")
           (concat (all-the-icons-material "check_circle") " ")
           (concat (all-the-icons-material "stars") " ")
           (concat (all-the-icons-material "format_paint") " ")))
    (setq company-box-icons-unknown (concat (all-the-icons-material "find_in_page") " "))
    (setq company-box-backends-colors nil)))

I've got a scroller issue, that is, all candidates cannot be visited.

Also, whenever the scrollbar is displayed, left hand side icons are cropped.

screen shot 2018-04-11 at 23 27 53

Company-box and evil-collection

Hi,
Every time I load evil-collection company-box won't let me select a candidate instead it inserts or . I am rather new when it comes to emacs and have not really a good idea where to start troubleshooting this problem.

Replace Redundant 'Company-Box' Prefixes

At the moment, using company-box alongside company requires two seperate variables for certain faces/variables/keybindings. I don't think this is necessary, as company-box is only a frontend for company-box and is mutually exclusive to the other tooltip frontends. As such, it would be more convienient to remove the company-box variables that simply inherit their values from tooltip and just use the original tooltip variables. This offers a better integration platform for company and would make your job as maintainer much simpler since you don't have to reimplement everything.

I think renaming the variables could improve coherency if company-box also included a general backend but as it isn't trying to replace company itself, this feature might only add complexity.

For example, why does company-box-align-annotations exist? Does it need to be a seperate variable or can we just use company-tooltip-align-annotations?

Try to change company-box child-frame background color when circadian switch theme

I use package circadian to auto
switch theme. I want company-box child-frame background color can be changed in
circadian switch hook too.
Here is my try:

(setq-default company-box-frame-parameters company-box-frame-parameters) ; used  by (default-value 'company-box-frame-parameters).

(defun my:company-box-faces-setup (theme)
    "Reload company-box faces on `circadian' `THEME' toggling."
    (set-face-attribute 'company-box-candidate nil
                        :inherit nil
                        :family (face-attribute 'default :family)
                        :foreground (face-foreground 'default))
    (set-face-attribute 'company-box-selection nil
                        :inherit 'company-tooltip-selection)
    (set-face-attribute 'company-box-background nil
                        :background (cl-case (alist-get 'background-mode (frame-parameters))
                                      ('light "#EAF9FF")
                                      ('dark "#454545")))
    (setq company-box-frame-parameters (default-value 'company-box-frame-parameters))
    (add-to-list 'company-box-frame-parameters
                 `(background-color . ,(cl-case (alist-get 'background-mode (frame-parameters))
                                         ('light "#EAF9FF")
                                         ('dark "#454545"))) t)
    ;; (add-to-list 'company-box-frame-parameters
    ;;              `(foreground-color . ,(face-foreground 'default)) t)
    )
  (add-hook 'circadian-after-load-theme-hook #'my:company-box-faces-setup)

But this does not work.
When I run (circadian-setup) it is white background on 'light theme, or black
background color on 'dark theme.

Maybe my set background color way (use add-to-list) is wrong?

Let me know when this is on Melpa!

I'm making some changes to tonini/alchemist.el to use lsp-mode and I could use some pretty output.. :) But I also need the packages to be available on Melpa or I can't distribute this easily to everyone.

improve performance which company-box-doc is slow

I think might need to improve the performance of company-box-doc. And company-box is little kind of flicking comparing with company-mode default tooltip. Guess maybe related to Emacs make child-frame. Maybe I'm wrong.

Maybe also add an option like defcustom company-box-doc-auto-show t to disable auto display doc. Use can bind with (define-key company-box-mode-map (kbd "M-h") 'company-box-doc). I did this on company-box for company-quickhelp.

I use Emacs built-in profiler get following result:

CPU Report

- timer-event-handler                                            3582  59%
 - apply                                                         3582  59%
  - #<compiled 0xeef0c5d>                                        3155  52%
   - company-box-doc--show                                       3155  52%
    - company-box-doc--fetch-doc-buffer                          3138  52%
     - company-call-backend                                      3138  52%
      - company--force-sync                                      3138  52%
       - apply                                                   3138  52%
        - company-call-backend-raw                               3138  52%
         - apply                                                 3138  52%
          - company--multi-backend-adapter                       3138  52%
           - apply                                               3138  52%
            - company-elisp                                      3138  52%
             - describe-function                                 3138  52%
              - describe-function-1                              2774  45%
               - help-fns-function-description-header               2760  45%
                - help-fns-short-filename                        2278  37%
                 - file-relative-name                            2212  36%
                    file-remote-p                                 245   4%
                    string-prefix-p                                14   0%
                - help-fns--autoloaded-p                          354   5%
                 - file-name-sans-extension                       323   5%
                    file-name-sans-versions                        66   1%
                 - file-truename                                    6   0%
                  - file-truename                                   6   0%
                   - file-truename                                  3   0%
                    - file-truename                                 3   0%
                       file-truename                                3   0%
                - find-lisp-object-file-name                      125   2%
                   locate-file                                     58   0%
                   symbol-file                                     18   0%
               - help-fns--signature                               11   0%
                + help-highlight-arguments                         11   0%
                 fill-region-as-paragraph                           3   0%
              - temp-buffer-window-show                           276   4%
               - display-buffer                                   276   4%
                - display-buffer-below-selected                   276   4%
                 - window-in-direction                            264   4%
                  - posn-at-point                                  10   0%
                   - eval                                          10   0%
                    - let*                                         10   0%
                     - list                                         7   0%
                      - *flycheck                                   4   0%
                       - if                                         4   0%
                          and                                       4   0%
                      + *emms                                       3   0%
                     + propertize                                   3   0%
                 - window--try-to-split-window                      9   0%
                  - split-window-sensibly                           9   0%
                   - split-window-below                             9   0%
                    - split-window                                  9   0%
                       split-window-internal                        3   0%
                 - window--display-buffer                           3   0%
                    set-window-buffer                               3   0%
              - help-window-setup                                  69   1%
               - help-window-display-message                       69   1%
                - pos-visible-in-window-p                          20   0%
                 - eval                                            20   0%
                  - let*                                           20   0%
                   - list                                          17   0%
                    + *projectile                                  13   0%
                    + *eyebrowse                                    4   0%
                   + concat                                         3   0%
              + temp-buffer-window-setup                            8   0%
    - company-box-doc--set-frame-position                          17   0%
       company-box--get-frame                                       3   0%
  - company-idle-begin                                            255   4%
   - company-auto-begin                                           255   4%
    - company--perform                                            255   4%
     - company-call-frontends                                     197   3%
      - company-box-frontend                                      197   3%
       - cond                                                     197   3%
        - company-box-show                                        197   3%
         - let                                                    154   2%
          - let                                                   154   2%
           - let                                                  154   2%
            - company-box--display                                154   2%
             - company-box--set-frame-position                    151   2%
              - let*                                              151   2%
               - company-box--point-bottom                        101   1%
                - or                                              101   1%
                 - setq                                           101   1%
                  - let*                                          101   1%
                   - +                                             58   0%
                    - or                                           58   0%
                     - nth                                         58   0%
                      - or                                         58   0%
                       - and                                       58   0%
                        - redisplay                                58   0%
                         - timer-event-handler                      9   0%
                          - apply                                   9   0%
                           - #<compiled 0x2808d1>                   9   0%
                            - eldoc-print-current-symbol-info                  9   0%
                             - eldoc-message                        9   0%
                              - eldoc-minibuffer-message                  9   0%
                                 apply                              9   0%
                   + let                                           43   0%
               - company-box--prefix-pos                           50   0%
                - or                                               50   0%
                 - setq                                            50   0%
                    nth                                            50   0%
             - company-box--render-buffer                           3   0%
              - let                                                 3   0%
               - save-current-buffer                                3   0%
                  company-box--update-line                          3   0%
         - setq                                                    43   0%
          - company-box--with-icons-p                              43   0%
           - let                                                   43   0%
            - +                                                    43   0%
             - /                                                   43   0%
              - or                                                 43   0%
               - car                                               43   0%
                  nth                                              43   0%
     - company--begin-new                                          58   0%
      - company-calculate-candidates                               58   0%
       - company--fetch-candidates                                 55   0%
        - company-call-backend-raw                                 55   0%
         - apply                                                   55   0%
          - company--multi-backend-adapter                         55   0%
           - company--multi-backend-adapter-candidates                 55   0%
            + company-elisp                                        55   0%
       + company--preprocess-candidates                             3   0%
  + company-echo-show                                              83   1%
  + #<compiled 0x2808d1>                                           24   0%
  + aggressive-indent--indent-if-changed                           10   0%
  + beacon--dec                                                     7   0%
  + symbol-overlay-maybe-put-temp                                   4   0%
- command-execute                                                1794  29%
 - call-interactively                                            1794  29%
  - byte-code                                                    1030  17%
   - read-extended-command                                       1030  17%
    - completing-read                                            1030  17%
     + ivy-completing-read                                       1030  17%
  - funcall-interactively                                         764  12%
   - execute-extended-command                                     387   6%
    + execute-extended-command--shorter                           316   5%
    + sit-for                                                      48   0%
    + command-execute                                              19   0%
   + company-box--next-line                                       257   4%
   + company-box--prev-line                                        54   0%
   + save-buffer                                                   40   0%
   + self-insert-command                                           14   0%
     move-beginning-of-line                                         4   0%
   + paredit-open-round                                             3   0%
   + paredit-kill                                                   3   0%
   + company-complete-selection                                     2   0%
- ...                                                             321   5%
   Automatic GC                                                   321   5%
- company-post-command                                            227   3%
 - company--perform                                               227   3%
  - company--continue                                             124   2%
   - company-calculate-candidates                                 124   2%
    - company--fetch-candidates                                   124   2%
     - company-call-backend-raw                                   124   2%
      - apply                                                     124   2%
       - company--multi-backend-adapter                           124   2%
        - company--multi-backend-adapter-candidates                124   2%
         - company-elisp                                          124   2%
          - company-elisp-candidates                              121   2%
             company-elisp--globals                               108   1%
           - company-elisp--candidates-predicate                    7   0%
              up-list                                               7   0%
           - company-elisp--locals                                  6   0%
              up-list                                               3   0%
  + company-call-frontends                                        103   1%
+ redisplay_internal (C function)                                  67   1%
+ hl-sexp-highlight                                                12   0%
+ eldoc-pre-command-refresh-echo-area                              10   0%
+ symbol-overlay-post-command                                       9   0%
+ global-undo-tree-mode-check-buffers                               8   0%
  global-font-lock-mode-check-buffers                               4   0%

Memory Report

- timer-event-handler                                      32,680,045  64%
 - apply                                                   32,680,045  64%
  - #<compiled 0xeef0c5d>                                  32,230,413  63%
   - company-box-doc--show                                 32,230,413  63%
    - company-box-doc--fetch-doc-buffer                    30,275,999  59%
     - company-call-backend                                30,275,999  59%
      - company--force-sync                                30,275,999  59%
       - apply                                             30,275,999  59%
        - company-call-backend-raw                         30,275,999  59%
         - apply                                           30,275,999  59%
          - company--multi-backend-adapter                 30,275,999  59%
           - apply                                         30,275,999  59%
            - company-elisp                                30,275,999  59%
             - describe-function                           30,250,873  59%
              - temp-buffer-window-show                    18,586,492  36%
               - display-buffer                            18,529,990  36%
                - display-buffer-below-selected            18,099,710  35%
                 - window--try-to-split-window             17,117,870  33%
                  - split-window-sensibly                  17,117,870  33%
                   - split-window-below                    17,117,870  33%
                    - split-window                         17,117,870  33%
                     - window--check                            4,136   0%
                      - window--sides-check                     4,136   0%
                         window-with-parameter                  4,136   0%
                       window--sanitize-window-sizes            4,136   0%
                     - run-window-configuration-change-hook         3,112   0%
                      + aw-update                               2,064   0%
                      + which-key--hide-popup-on-frame-size-change         1,048   0%
                 + window-in-direction                        973,258   1%
                 + window--display-buffer                       8,582   0%
                  display-buffer-assq-regexp                  430,280   0%
               + run-hooks                                     56,502   0%
              - describe-function-1                         9,983,065  19%
               - help-fns-function-description-header       9,763,302  19%
                - help-fns-short-filename                   6,767,724  13%
                 - file-relative-name                       4,214,808   8%
                    string-prefix-p                             2,032   0%
                   abbreviate-file-name                         6,488   0%
                + help-fns--autoloaded-p                    2,862,452   5%
                + find-lisp-object-file-name                   99,880   0%
               + help-fns--signature                          153,385   0%
               + fill-region-as-paragraph                      42,814   0%
              + help-window-setup                           1,651,272   3%
              + temp-buffer-window-setup                       10,900   0%
             + #<compiled 0xf1804a5>                           16,854   0%
      company-box-doc--set-frame-position                   1,904,414   3%
    + company-box-doc--make-buffer                             43,904   0%
  + company-idle-begin                                        311,992   0%
  + aggressive-indent--indent-if-changed                       60,280   0%
  + beacon--dec                                                23,264   0%
  + symbol-overlay-maybe-put-temp                              19,568   0%
  + #<compiled 0x2808d1>                                       14,452   0%
  + #<lambda 0xebd541ae8e0>                                     9,236   0%
  + company-echo-show                                           6,704   0%
  + blink-cursor-start                                          4,136   0%
- command-execute                                          16,205,551  31%
 - call-interactively                                      16,205,551  31%
  - funcall-interactively                                  11,044,037  21%
   + execute-extended-command                               9,735,681  19%
   + company-box--next-line                                   793,603   1%
   + save-buffer                                              204,001   0%
   + company-box--prev-line                                   154,639   0%
   + self-insert-command                                      123,760   0%
   + company-complete-selection                                28,074   0%
   + paredit-kill                                               2,751   0%
   + paredit-open-round                                         1,276   0%
   + file-notify-handle-event                                     252   0%
  - byte-code                                               5,161,514  10%
   - read-extended-command                                  5,161,514  10%
    - completing-read                                       5,161,514  10%
     - ivy-completing-read                                  5,161,514  10%
      - ivy-read                                            5,160,490  10%
       - read-from-minibuffer                               5,020,064   9%
        - command-execute                                   2,706,583   5%
         - call-interactively                               2,706,583   5%
          - funcall-interactively                           2,706,327   5%
           - self-insert-command                            2,706,327   5%
              #<compiled 0x24db8f>                             10,160   0%
              sp--post-self-insert-hook-handler                 1,956   0%
        + ivy--queue-exhibit                                  204,986   0%
        + redisplay_internal (C function)                     138,814   0%
        + #<compiled 0xf2a0bed>                                 9,249   0%
        + winner-save-unconditionally                           4,136   0%
          minibuf-eldef-setup-minibuffer                        3,072   0%
        + sclang-document-post-command-hook-function            1,024   0%
       + ivy--reset-state                                     137,216   0%
        replace-regexp-in-string                                1,024   0%
- redisplay_internal (C function)                           1,093,584   2%
 - jit-lock-function                                          868,118   1%
  + jit-lock-fontify-now                                      868,118   1%
 + eval                                                       221,330   0%
   window--sanitize-window-sizes                                4,136   0%
+ company-post-command                                        829,633   1%
+ symbol-overlay-post-command                                  26,652   0%
+ winner-save-old-configurations                               12,408   0%
+ yas--post-command-handler                                    11,336   0%
+ xselect-convert-to-string                                     3,232   0%
+ sclang-document-post-command-hook-function                    1,120   0%
+ global-project-shells-mode-check-buffers                      1,048   0%
  ...                                                               0   0%

Lowering Emacs requirement to 26.0.91

The latest official emacs beta built on windows is GNU Emacs 26.0.91 (build 1, x86_64-w64-mingw32) of 2018-01-22. Please lower your requirements to that if possible.

all-the-icons integration?

There's an all the icons library which provides a more or less standard (It is used by at least 4 packages on MELPA) way to show icons in emacs. It also has an installable (right from Emacs) collection of icon fonts. I think it would be great to reuse its possibilities in company-box too.

Thank you.

Old child frame doesn't go away

For example, when exiting org src mode with an active popup, it doesn't go away. The same thing happens if I kill the buffer with an active popup or switch to another window. It sticks around until the next completion popup.

Company-tng doesn't work with company-box

I can't use company-tng with company-box because the candidate isn't displayed in the buffer so I can't select it.
image

This is my config:

(use-package company
  :defer 1
  :config
  (company-tng-configure-default)
  (global-company-mode))

(use-package company-box
  :hook (company-mode . company-box-mode))

This is the value of company-frontends:
(company-tng-frontend company-pseudo-tooltip-frontend company-echo-metadata-frontend)

Got error when I enabled desktop-save-mode and restart Emacs from crash

Company: frontend company-box-frontend error "Wrong type argument: frame-live-p, "Unprintable entity"" on command hide
Error running timer ‘company-idle-begin’: (error "Company: frontend company-box-frontend error \"Wrong type argument: frame-live-p, \"Unprintable entity\"\" on command hide")

I found (default-minibuffer-frame . "Unprintable entity") and (company-box-buffer . "Unprintable entity") in desktop-save file (setq desktop-saved-frameset ...).

[Feature Request] Company-Box frontend with a timer delay

Company has a frontend called company-pseudo-tooltip-unless-just-one-frontend-with-delay that uses company-tooltip-idle-delay to display the tooltip with a delay. This is very helpful when using company-preview-frontend. Would it be possible for company-box to implement a similar feature?

annotation improvement idea

To follow up on the comment here:

Great work anyway, I do think the annotation could use some work, but that's just a matter of taste.

Thanks. What kind of work ? Any ideas for improvement is more than welcome :)
-- company-mode/company-mode#756 (comment)

Right now, from the README screenshot we see the following candidates:

[f] SUB_CHAR_TABLE_P            bool SUB_CHAR_TABLE_P(Lisp_Object a)
[v] Qchar_or_string_p           const Lisp_Object Qchar_or_string_p

Removing the unnecessary repetition of the identifier, we can have:

[f] SUB_CHAR_TABLE_P(Lisp_Object a) -> bool
[v] Qchar_or_string_p : const Lisp_Object

And if a field, is a member of a class (in C++),
the right column could hold the "parent context":

[f] append(const char *str) -> std::string              std::string
[f] empty() const -> bool                               std::string

[feature request] Add support for "common-face"

In company you can set different faces for "common" part of the candidates as your input:

screen shot 2018-07-05 at 12 51 48 pm

Notice the purple and blue faces.

The faces are company-tooltip-common and company-tooltip-common-selection.

It would be cool if company-box can support these too.

How can I resize the icon image?

2018-05-23 23 54 41

Hi, I'm so thank you for the nice company-box package.

I'm using spacemacs, but I don't know why my company-box icon is displayed same size with the file size.
I configured the company-box's faces with :height 1 but nothing was changed.
Is there any variable or something to configure the icon image size?

Flash issue in fullscreen

When using Emacs in fullscreen mode on macOS Mojave, flash issue happens. Disable company-box-mode, it works again.

  • Emacs 26.1
  • macOS Mojave
  • company-box-20180607.1545

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.