               c-default-style "linux"
               c-tab-always-indent nil)
 
+;; Setting proper includes on OSX
+(when is-mac
+  (setq my/clang-includes
+        '("/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1"
+          "/usr/local/include"
+          "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/6.0/include"
+          "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include"
+          "/usr/include"
+          "/System/Library/Frameworks"
+          "/Library/Frameworks"))
+
+  (after flycheck (setq flycheck-clang-include-path my/clang-includes))
+  (after auto-complete
+         (setq ac-clang-flags (mapcar (lambda (item)(concat "-I" item)) my/clang-includes)))
+  )
+
 (add-to-list 'auto-mode-alist '("\\.h\\'" . c++-mode))
 (add-hook! 'c-mode-common-hook
            (use-package auto-complete-clang)
            (use-package auto-complete-c-headers)
+           (setq ac-sources
+                 '(ac-source-clang
+                   ac-source-c-headers
+                   ac-source-yasnippet
+                   ac-source-words-in-same-mode-buffers))
 
            (c-toggle-electric-state -1)
            (c-toggle-auto-newline -1)
 
+           ;; DEL mapping interferes with smartparens and my.deflate-maybe
            (defmap c-mode-map (kbd "DEL") nil)
 
            (c-set-offset 'substatement-open '0) ; brackets should be at same indentation level as the statements they open

         'font-lock-doc-face)
(--copy-face 'font-lock-doc-string-face ; comment markups
         'font-lock-comment-face)

(global-font-lock-mode t)
(setq font-lock-maximum-decoration t)


           (c-set-offset 'brace-list-open '+)   ; all "opens" should be indented by the c-indent-level
           (c-set-offset 'case-label '+)        ; indent case labels by c-indent-level, too

           ;; C++11 support on mac
           (when (and is-mac (eq major-mode 'c++-mode))
             (setq flycheck-clang-language-standard "c++11"
                   flycheck-clang-standard-library "libc++"
                   flycheck-c/c++-clang-executable "clang++")))

;; C++11 syntax support (until cc-mode is updated)
(require 'font-lock)
(defun --copy-face (new-face face)
  "Define NEW-FACE from existing FACE."
