Giter Site home page Giter Site logo

yasuyk / helm-company Goto Github PK

View Code? Open in Web Editor NEW
26.0 26.0 15.0 30 KB

DO NOT FORK! This repository is outdated. Create a clean clone from https://github.com/manuel-uberti/helm-company which is the maintained fork.

License: GNU General Public License v3.0

Emacs Lisp 96.88% Makefile 3.12%

helm-company's People

Contributors

kungi avatar s-kostyaev avatar xuchunyang avatar yasuyk 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

Watchers

 avatar  avatar  avatar  avatar  avatar

helm-company's Issues

Replace company with helm-company

Apparently, auto-complete is buggy and it affects ac-helm. Luckily, you also make this package. So is it possible to do the same for helm-company, also to make this package more feature-complete? I intend to replace auto-complete with company.

Compiler warnings while installing

It seems that helm-company uses an obsolete variable. I get the following warnings when installing from MELPA:

In helm-company-run-show-doc-buffer:
helm-company.el:125:4:Warning: `display-buffer-function' is an obsolete
    variable (as of 24.3); use `display-buffer-alist' instead.

In helm-company-run-show-location:
helm-company.el:131:4:Warning: `display-buffer-function' is an obsolete
    variable (as of 24.3); use `display-buffer-alist' instead.

helm-company does not respet upper/lowercase while completing

When completing with helm-company, candidates i choose for completion are always completed lowercase. That might be right most of the time in English, but is not in other languages.

So if I want to complete a chosen candidate, that beginn with an uppercase, I would like helm-company to complete this with the Casing that has been chosen during typing.

E.G. I write Com..... and want it to be completed to Company. Helm-company just gives me company.

Incorrect match replacements

Given this scenario (Python, but I get similar results given similar candidate contexts in other languages):

foo_bar_baz = "ok"
foo_spam_eggs = "ok"

foo^

My cursor is at ^. When I invoke company-complete, I'm presented with the short list of two candidates as expected, and when I select one, the resulting completion is also foo_bar_baz. However, when I invoke helm-company and choose one of the candidates, I get ffoo_bar_baz, where the first character is duplicated.

My related configuration is:

(use-package helm-company :ensure t)
(use-package company
  :ensure t
  :diminish company-mode
  :init (global-company-mode 1)
  :config
  (progn
    (dolist (package '(company-go
                       company-inf-ruby
                       company-tern
                       company-math
                       company-restclient))
      (use-package package
        :ensure t
        :demand t
        :init (add-to-list 'company-backends package)))

    ;; Use Helm to complete suggestions
    (bind-keys :map company-active-map
               ("\C-d" . company-show-doc-buffer)
               ("C-:" . helm-company))
    (bind-keys :map company-mode-map
               ("C-:" . helm-company))
    (setq company-echo-delay 0
          company-tooltip-minimum-width 30
          company-idle-delay nil)))

(Complete configs in:
https://github.com/whilp/dotfiles/blob/master/.emacs.d/lisp/init-dev.el
https://github.com/whilp/dotfiles/blob/master/.emacs.d/lisp/init-helm.el)

It seems as if helm-company-action-insert is failing to calculate the correct length to replace. I haven't found any other cases of this online, and I'm only making slow progress debugging it myself. Any ideas?

Reserve company features in helm-company

When in company-mode, pressing C-w opens the source file for symbol at point, pressing <f1> to display documentation.

helm-company should add similar features, by adding actions to helm (i.e. first action to go source, second action show doc).

<tab> still does not cancel show-doc or show-location

In ac-helm, if you move up/down, the doc buffer will be cancel and go back to the current buffer. In normal Helm, pressing while the doc buffer is opened would cancel it. This still doesn't happen helm-company.

helm-company insert wrong completion

When I type "cus" and press M-: (helm-company) and select "custom-set-variables" the result is "cuscustom-set-variables". Current version from MELPA.

helm-match-plugin has been renamed

Upgraded to helm-20150824.449 and helm-company stopped loading. I don't see anything offhand in helm-company using anything defined in the helm-match-plugin but the file was renamed and the corresponding functions got renamed s/-mp-/-mm-/.

Still poking but just the following diff got things loading.

diff --git a/helm-company.el b/helm-company.el
index 580391d..9de7714 100644
--- a/helm-company.el
+++ b/helm-company.el
@@ -33,7 +33,7 @@
 ;;; Code:

 (require 'helm)
-(require 'helm-match-plugin)
+(require 'helm-multi-match)
 (require 'helm-files)
 (require 'helm-elisp) ;; For with-helm-show-completion
 (require 'company)

helm-company-run-show-location is bound to helm-execute-persistent-action

Because of this, when pressing <tab> on a candidate, the helm completion buffer changes to the source buffer of that candidate; there's no way to go back other than abort current helm-company with C-g.

The correct behaviour should be the same as helm-M-x: when helm-execute-persistent-action is executed on a candidate, it shows the doc, executed again, it cancels the doc buffer. I bind helm-execute-persistent-action to <tab> (the default is C-z), so when I press <tab>, the doc buffer shows up, press <tab> again, it disappears.

Same thing should be applied for helm-company-run-show-location. These two functions should be put in helm action menu: when helm-select-action is executed (which is bound to <tab> in default Helm), a list of available action should be listed. User can quicky select first, second and third action with <return>, C-e and C-j respectively. Using this feature from Helm, user won't have to bind any key for these new features.

Missing tag 0.1.1

Current version seems to be 0.1.1, but there is no corresponding tag.

Use helm-company instead of company-mode completion popup

This is more of a question than an issue related to helm-company(which is working great, thanks for this package).

Whenever I am typing, company-mode starts completing showing the completion popup. Of course I can press the keybinding I set for helm-company, but is it possible to hide the completion popup entirely and just complete through helm-company?

Unclosing parenthesis

This function has unbalanced parenthesis in the latest commit:

(defun helm-company-action-insert (candidate)
"Insert CANDIDATE."
(delete-char (- (length (helm-attr 'company-prefix))))
(insert candidate)
;; for GC
(helm-attrset 'company-candidatecompany--auto-completion

complete with junk

using emacs -Q, I seem to detect a bug of helm-company.

(defun helm-company ()
  "Select `company-complete' candidates by `helm'.
It is useful to narrow candidates."
  (interactive)
  (unless company-candidates
    (company-complete))
  (when company-point
    (let ((begin (- company-point (length company-prefix))))
      (with-helm-show-completion begin company--point-max
        (helm :sources 'helm-source-company
              :buffer  "*helm company*"
              :candidate-number-limit helm-company-candidate-number-limit)))))

suppose you use C-: to complete "(poi" and (company-complete) is called. After (company-complete) the buffer will become "(point" because it is the sole prefix. Finally if "point-max" is chosen, the buffer becomes "(popoint-max". It seems that however many company-complete completes, the same amount of junk will leave ahead.

Temporarily I managed to fix this by replacing the unless with

(unless company-candidates
  (company--begin-new)
  (setq company-point (point)
        company--point-max (point-max)))

Can you reproduce this problem or figure out why that happens?

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.