Clarification for company mode completion#326
Open
rottened23 wants to merge 3 commits intoocaml-community:masterfrom
Open
Clarification for company mode completion#326rottened23 wants to merge 3 commits intoocaml-community:masterfrom
rottened23 wants to merge 3 commits intoocaml-community:masterfrom
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
rgrinberg
reviewed
Apr 4, 2021
README.md
Outdated
|
|
||
| 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` |
Collaborator
There was a problem hiding this comment.
There's an unnecessary backtick after elisp
bbatsov
reviewed
Jun 22, 2022
README.md
Outdated
| (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`: |
Author
|
Good catch and resolved the spelling mistake/extra backtick! |
Contributor
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
(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/mlifiles. Turns out just needed to enable company as a minor mode when using utop as a major mode~/.emacsFigured 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