Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,17 @@ Make sure this repository is in your `load-path`, and then:

## Configuration

### Automatically turn on completions

Completions will not be loaded automatically in `Swift` mode. To enable them, add the following to your emacs init file *(use `SPC-f-e-i` to open it in spacemacs)*:
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we change Swift mode to swift-mode? :)
Also not sure if the spacemacs comment is necessary - is it common for a spacemacs user to not know where the init file is?

```elisp
(add-hook 'swift-mode-hook (lambda ()
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm could you remove the preceding whitespace, also personally I use:

(add-to-list 'company-backends 'company-sourcekit)

However that depends on your list of backends all checking the mode and passing through correctly (vs. short-circuiting)

(set (make-local-variable 'company-backends) '(company-sourcekit))
(company-mode)))
```

### Options

* _`company-sourcekit-use-yasnippet`_ - Use yasnippet for completion expansion. By default this is enabled if yasnippet is detected.
* _`company-sourcekit-verbose`_ - Log company-related messages to `*messages*` with verbosity
* _`sourcekit-available-ports`_ - A list of ports that `sourcekittendaemon` is allowed to listen on.
Expand Down