-
Notifications
You must be signed in to change notification settings - Fork 113
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
Clarification for company mode completion #326
base: master
Are you sure you want to change the base?
Conversation
New to emacs so not sure if this is was implied or anything. Was using the spacemacs flavour of emacs and wasn't getting any code completion in utop despite seeing it work properly with the merlin-mode. Was able to fix this by adding this to my `~/.emacs` ```elisp` (add-hook 'after-init-hook 'global-company-mode) ``` Figured might as well try posting in-case it helps anyone else in a similar position. But as mentioned for some reason this worked out of the box for merlin mode - my (very much a) guess is due to: ``` (require 'company) ```
adding that a company mode minor mode must be added to the utop major mode
README.md
Outdated
@@ -176,6 +176,12 @@ copy&paste this to your `~/.emacs`: | |||
(autoload 'utop "utop" "Toplevel for OCaml" t) | |||
``` | |||
|
|||
Utop in emacs also supports TAB-completion. If your version of emacs includes `company` completion will appear at the code point. Otherwise completion will appear in a seperate buffer. In the case of `company` a hook **must** be added to enable `company` as a minor mode when running utop in major mode. To enable please add the following to your `~/.emacs`: | |||
|
|||
```elisp` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's an unnecessary backtick after elisp
README.md
Outdated
@@ -176,6 +176,12 @@ copy&paste this to your `~/.emacs`: | |||
(autoload 'utop "utop" "Toplevel for OCaml" t) | |||
``` | |||
|
|||
Utop in emacs also supports TAB-completion. If your version of emacs includes `company` completion will appear at the code point. Otherwise completion will appear in a seperate buffer. In the case of `company` a hook **must** be added to enable `company` as a minor mode when running utop in major mode. To enable please add the following to your `~/.emacs`: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seperate -> separate
Good catch and resolved the spelling mistake/extra backtick! |
|
(Very) New to emacs so not sure if this is was implied or obvious. Was using the Spacemacs flavour of emacs and wasn't getting any code completion in utop despite seeing it work properly with tuareg when ending
*.ml/mli
files. Turns out just needed to enable company as a minor mode when using utop as a major mode~/.emacs
Figured might as well try posting in-case as it took me a couple of hours of elisp debugging to figure this out.
After additional debugging it seems that opam-user-setup actually did a lot of this heavy lifting for tuareg mode