Skip to content

Commit

Permalink
Add clang support, misc
Browse files Browse the repository at this point in the history
Clang support, new Xdefaults
  • Loading branch information
afeinberg committed May 30, 2014
1 parent d07a192 commit 1c41fad
Show file tree
Hide file tree
Showing 5 changed files with 105 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Expand Up @@ -46,3 +46,6 @@
[submodule "elisp/fsharpbinding"]
path = elisp/fsharpbinding
url = https://github.com/fsharp/fsharpbinding.git
[submodule "elisp/auto-complete-clang"]
path = elisp/auto-complete-clang
url = https://github.com/brianjcj/auto-complete-clang
77 changes: 72 additions & 5 deletions dot.Xdefaults
@@ -1,11 +1,78 @@
Emacs.verticalScrollBars: off
URxvt*foreground: #b2b2b2
URxvt*background: black
URxvt*scrollBar: false
URxvt*saveLines: 1000

Emacs.FontBackend: xft
Emacs*font: Inconsolata-11
Emacs*foreground: #b2b2b2
Emacs*background: black
Emacs*cursorColor: #b2b2b2

URxvt.saveLines: 65535
URxvt.utmpInhibit: True
URxvt.visualBell: True
URxvt.scrollBar: True
URxvt.scrollTtyKeypress: True
URxvt.scrollBar_floating: True
URxvt.scrollBar_right: True
URxvt.scrollColor: #888888
URxvt.scrollstyle: plain
URxvt.geometry: 90x60
URxvt.jumpScroll: false
URxvt.font: xft:Inconsolata:pixelsize=14:antialias=true
URxvt.internalBorder: 0
URxvt.externalBorder: 0
URxvt.borderColor: #444444
URxvt.meta8: False
!URxvt.background: #000000
!URxvt.foreground: #eeeeee
URxvt.loginShell: true
URxvt.cursorBlink: true
URxvt.inheritPixmap: true
URxvt.tintColor: white
URxvt.shading: 15
!URxvt.fading: 40
URxvt.cursorColor: [70]#ff6600
URxvt.skipBuiltinGlyphs: true
URxvt.urlLauncher: xdg-open
URxvt.perl-ext-common: default,matcher,selection
URxvt.matcher.button: 3
URxvt.matcher.pattern.1: \\b(mailto|http|https|ftp|file):[/]*[\\w-]\\.[\\w./?&@#-]*[\\w/-]
URxvt.matcher.rend.0: Uline Bold fg8 bg1
URxvt.urgentOnBell: true
URxvt.mapAlert: true
! Blue
URxvt*color4: #00a7ff
URxvt*color12: #3988ff

URxvt.background: #121212
!black
URxvt.color0: #353535
URxvt.color8: #666666
!red
URxvt.color1: #AE4747
URxvt.color9: #EE6363
!green
URxvt.color2: #556B2F
URxvt.color10: #9ACD32
!brown/yellow
URxvt.color3: #DAA520
URxvt.color11: #FFC125
!blue
URxvt.color4: #6F99B4
URxvt.color12: #7C96B0
!magenta
URxvt.color5: #8B7B8B
URxvt.color13: #D8BFD8
!cyan
URxvt.color6: #A7A15E
URxvt.color14: #F0E68C
!white
URxvt.color7: #DDDDDD
URxvt.color15: #FFFFFF
URxvt.foreground: #DDDDDD

URxvt*keysym.M-C-1: command:\033]710;xft:Inconsolata:pixelsize=9:antialias=true\007
URxvt*keysym.M-C-2: command:\033]710;xft:Inconsolata:pixelsize=10:antialias=true\007
URxvt*keysym.M-C-3: command:\033]710;xft:Inconsolata:pixelsize=11:antialias=true\007
URxvt*keysym.M-C-4: command:\033]710;xft:Inconsolata:pixelsize=12:antialias=true\007
URxvt*keysym.M-C-5: command:\033]710;xft:Inconsolata:pixelsize=14:antialias=true\007
URxvt*keysym.M-C-6: command:\033]710;xft:Inconsolata:pixelsize=16:antialias=true\007
URxvt*keysym.M-C-7: command:\033]710;xft:Inconsolata:pixelsize=20:antialias=true\007
28 changes: 28 additions & 0 deletions dot.emacs
Expand Up @@ -74,6 +74,12 @@ Suitable for inclusion in `c-offsets-alist'."
(interactive)
(c-add-style "AF" af-c-style t))

(defconst af-protobuf-style
'((c-basic-offset . 2)
(indent-tabs-mode . nil)))
(add-hook 'protobuf-mode-hook
(lambda () (c-add-style "af-protobuf-style" af-protobuf-style t)))

(show-paren-mode t)

(when (fboundp 'global-font-lock-mode)
Expand Down Expand Up @@ -331,6 +337,28 @@ Suitable for inclusion in `c-offsets-alist'."
(setq inferior-fsharp-program "fsharpi --readline-")
(setq fsharp-compiler "fsharpc")

(add-to-list 'load-path "~/elisp/auto-complete-clang")
(require 'auto-complete-config)
(add-to-list 'ac-dictionary-directories "~/elisp/auto-complete-clang/ac-dict")

(require 'auto-complete-clang)
(define-key ac-mode-map [(control tab)] 'auto-complete)

(setq ac-auto-start nil)
(setq ac-quick-help-delay 0.5)

(defun my-ac-config ()
(setq-default ac-sources '(ac-source-abbrev ac-source-dictionary ac-source-words-in-same-mode-buffers))
(add-hook 'auto-complete-mode-hook 'ac-common-setup)
(global-auto-complete-mode t))

(defun my-ac-cc-mode-setup ()
(setq ac-sources (append '(ac-source-clang ac-source-yasnippet) ac-sources)))
(add-hook 'c-mode-common-hook 'my-ac-cc-mode-setup)
;; ac-source-gtags
(my-ac-config)


(let ((local-init-file "~/.emacs.local"))
(when (file-readable-p local-init-file)
(load-file local-init-file)))
Expand Down
1 change: 1 addition & 0 deletions elisp/auto-complete-clang
Submodule auto-complete-clang added at a195db
2 changes: 1 addition & 1 deletion elisp/nxhtml/etc/schema/xhtml-loader.rnc
@@ -1 +1 @@
include "../../../../../../usr/local/Cellar/emacs/24.3/share/emacs/24.3/etc/schema/xhtml.rnc"
include "../../../../../../usr/share/emacs/24.3/etc/schema/xhtml.rnc"

0 comments on commit 1c41fad

Please sign in to comment.