-
Notifications
You must be signed in to change notification settings - Fork 16
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
yasnippet compatible? #29
Comments
UPD: in case of import Foundation
var ⬛ Where ⬛ is point, |
Hmm what's the output of |
|
@Pitometsu try putting |
@nathankot, thank you for explanation, it works now! |
@nathankot one more question here: This solution works with But when I add also You see, where is the problem? If there's even no candidates, My current configuration: (setq company-echo-delay 0)
(setq company-backends
'((company-yasnippet
company-etags
company-keywords
company-capf
company-dabbrev-code
company-files
company-abbrev
company-dabbrev)))
(defun company-sourcekit-init ()
"Enable sourcekit backend for company."
(eval-after-load 'company
'(add-to-list
; vvvvv
; if uncomment, it will not even start
;; (last (make-local-variable 'company-backends))
; now it mute other backends even if have no variants
(make-local-variable 'company-backends)
; ^^^^^
'company-sourcekit t))
(eval-after-load 'company-keywords
'(add-to-list 'company-keywords-alist
'(swift-mode "true" "false" "nil" "available" "column" "elseif" "else" "endif" "file" "function" "if" "line" "selector" "associatedtype" "class" "deinit" "enum" "extension" "fileprivate" "func" "import" "init" "inout" "internal" "let" "open" "operator" "private" "protocol" "public" "static" "struct" "subscript" "typealias" "var" "break" "case" "continue" "default" "defer" "do" "else" "fallthrough" "for" "guard" "if" "in" "repeat" "return" "switch" "where" "while" "as" "catch" "dynamicType" "is" "rethrows" "super" "self" "Self" "throws" "throw" "try" "Protocol" "Type" "and" "assignment" "associativity" "convenience" "didSet" "dynamic" "final" "get" "higherThan" "indirect" "infix" "lazy" "left" "lowerThan" "mutating" "none" "nonmutating" "optional" "override" "postfix" "precedence" "precedencegroup" "prefix" "required" "right" "set" "unowned" "weak" "willSet"))))
(add-hook 'swift-mode-hook 'company-sourcekit-init) |
I have
(setq company-backends '(company-files company-keywords company-capf company-yasnippet company-abbrev company-dabbrev company-dabbrev-code))
and
so,
company-sourcekit
mostly works for now. Butcompany-yasnippet
work only when I manually callM-x company-yasnippet
. Generalcompany-complete
or show sourcekit variants only, or do just nothing at all.The text was updated successfully, but these errors were encountered: