nathankot / company-sourcekit

Completion for Swift projects via SourceKit with the help of SourceKitten
207 stars 16 forks source link

company-keywoards #30

Closed Pitometsu closed 6 years ago

Pitometsu commented 7 years ago

We can improve company integration by adding swift keywords:

(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")))

Surely, will be better to get that list from swift-mode, but currently there's no plain list of keywords there.

Please, prompt the right upstream, where it should be added: here, in company-mode or in swift-mode?

jojojames commented 6 years ago

@Pitometsu https://github.com/company-mode/company-mode/commit/10807eb0d7086c6c886bbcc06cbbd8c677c6d107