Skip to content

Commit

Permalink
fix irony and cmake and others
Browse files Browse the repository at this point in the history
  • Loading branch information
swarnendubiswas committed Jan 10, 2017
1 parent e6e4fb1 commit 1572dbf
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 23 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ irony
tramp
ac-html-csswatcher
eshell
semanticdb

*.elc
.session
Expand Down
29 changes: 13 additions & 16 deletions modules/cc-init.el
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@

(defvar dotemacs-completion-in-buffer)

(setq c-default-style '((java-mode . "java")
(c++-mode . "stroustrup")
(other . "gnu/linux")
(c-mode . "k&r")
(awk-mode . "awk")))
(setq-default c-default-style '((java-mode . "java")
(c++-mode . "stroustrup")
(other . "gnu/linux")
(c-mode . "k&r")
(awk-mode . "awk")))

(use-package cc-mode
:mode ("\\.h\\'" . c++-mode)
Expand Down Expand Up @@ -90,21 +90,21 @@

;; http://tuhdo.github.io/c-ide.html
(with-eval-after-load "company"
(setq company-backends (delete 'company-semantic company-backends)))
(setq company-backends (delete 'company-semantic company-backends))
(add-to-list 'company-clang-arguments "-I/home/sbiswas/intel-pintool/source/include/pin")
(add-to-list 'company-clang-arguments "-I/home/sbiswas/intel-pintool/lib/boost_1_58_0/boost"))

(use-package company-c-headers
:ensure t
:if (eq dotemacs-completion-in-buffer 'company)
:config
(add-to-list 'company-backends #'company-c-headers)
(add-to-list 'company-clang-arguments "-I/home/sbiswas/intel-pintool/source/include/pin")
(add-to-list 'company-clang-arguments "-I/home/sbiswas/intel-pintool/lib/boost_1_58_0/boost")
(add-to-list 'company-backends 'company-c-headers)
(add-to-list 'company-c-headers-path-system "/usr/include/")

(cond ((string-equal (system-name) "consensus.ices.utexas.edu")
(add-to-list 'company-c-headers-path-system "/usr/include/c++/4.8.5/")
(add-to-list 'company-c-headers-path-system "/home/sbiswas/intel-pintool/lib/boost_1_58_0/boost")
(add-to-list 'company-c-headers-path-system "/home/sbiswas/intel-pintool/source/include/pin"))
(add-to-list 'company-c-headers-path-system "/h2/sbiswas/intel-pintool/lib/boost_1_58_0/boost")
(add-to-list 'company-c-headers-path-system "/h2/sbiswas/intel-pintool/source/include/pin"))

((string-equal (system-name) "sbiswas-Dell-System-XPS-L502X")
(add-to-list 'company-c-headers-path-system "/usr/include/c++/6/"))))
Expand Down Expand Up @@ -134,8 +134,7 @@
(add-hook 'c-mode-common-hook #'google-set-c-style)
(add-hook 'c-mode-common-hook #'google-make-newline-indent))

;; Google C++ Style checker for Flycheck, also need to setup cpplint.py.
(use-package flycheck-google-cpplint
(use-package flycheck-google-cpplint ; Google C++ Style checker for Flycheck, also need to setup cpplint.
:ensure t
:after flycheck
:if (eq system-type 'gnu/linux)
Expand Down Expand Up @@ -176,19 +175,17 @@
(use-package company-irony
:ensure t
:if (eq dotemacs-completion-in-buffer 'company)
:commands company-irony-setup-begin-commands
:init
(use-package company-irony-c-headers
:ensure t)
(add-hook 'irony-mode-hook 'company-irony-setup-begin-commands)
:config
(add-to-list 'company-backends '(company-irony-c-headers
company-irony)))

(use-package irony-eldoc
:ensure t
:commands irony-eldoc
:config (add-hook 'irony-mode-hook #'irony-eldoc)))
:init (add-hook 'irony-mode-hook #'irony-eldoc)))

(provide 'cc-init)

Expand Down
4 changes: 3 additions & 1 deletion modules/defaults-init.el
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@
bidi-display-reordering nil)

(when (>= emacs-major-version 24)
(setq inhibit-message t))
;; This is effective to turn off "Writing .." messages, but then it would disable other useful information from eldoc
;; and Flycheck.
(setq inhibit-message nil))

(unless (bound-and-true-p dotemacs-use-ignoramus-p)
;; Avoid completing temporary files - http://endlessparentheses.com/improving-emacs-file-name-completion.html
Expand Down
1 change: 1 addition & 0 deletions modules/kill-ring-init.el
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
:if (or (eq dotemacs-selection 'none) (eq dotemacs-selection 'ido))
:commands browse-kill-ring
:config
(require 'popwin-browse-kill-ring)
(setq browse-kill-ring-highlight-current-entry t
browse-kill-ring-highlight-inserted-item t
browse-kill-ring-show-preview t
Expand Down
9 changes: 5 additions & 4 deletions modules/misc-init.el
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,14 @@
(push '("*Help*" :noselect t) popwin:special-display-config)
(push '("*Paradox Report*" :regexp t :noselect t) popwin:special-display-config)
(push '("*undo-tree*" :width 0.3 :position right) popwin:special-display-config)
(push '("*Kill Ring*") popwin:special-display-config)
(push '("*Kill Ring*" :noselect nil) popwin:special-display-config)
(push '("*Selection Ring:") popwin:special-display-config)
(push '("*ag search*") popwin:special-display-config)
(push '("*ggtags-global*" :stick t :noselect t :height 30) popwin:special-display-config)
(push '("*ag search*" :noselect nil) popwin:special-display-config)
(push '("*ggtags-global*" :stick t :noselect nil :height 30) popwin:special-display-config)
(push '("*Flycheck errors*" :noselect nil) popwin:special-display-config)

(add-to-list 'popwin:special-display-config '("*Completions*" :stick t :noselect t))
(add-to-list 'popwin:special-display-config '("*Occur*" :noselect t))
(add-to-list 'popwin:special-display-config '("*Occur*" :noselect nil))
(add-to-list 'popwin:special-display-config '("*Backtrace*"))
(add-to-list 'popwin:special-display-config '("*Apropos*"))
(add-to-list 'popwin:special-display-config '("*Warnings*")))
Expand Down
15 changes: 14 additions & 1 deletion modules/prog-init.el
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,19 @@
(use-package ess-smart-underscore
:ensure t))

(provide 'prog-init)
(use-package cmake-mode
:ensure t
:config
(use-package cmake-font-lock
:ensure t)
(use-package cpputils-cmake
:ensure t
:config
(add-hook 'c-mode-common-hook
(lambda ()
(if (derived-mode-p 'c-mode 'c++-mode)
(cppcm-reload-all))))))

(provide 'prog-init)

;;; prog-init.el ends here
2 changes: 1 addition & 1 deletion modules/python-init.el
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
;;; Code:

;; Install the following packages
;; sudo -H pip3 install --upgrade pip numpy scipy psutil django setuptools jedi paramiko cffi rope importmagic yapf pyflakes flake8 importmagic autopep8 pep8 pylint overrides ggplot matplotlib ordered_set
;; sudo -H pip3 install --upgrade pip numpy scipy psutil django setuptools jedi paramiko cffi rope importmagic yapf pyflakes flake8 importmagic autopep8 pep8 pylint overrides ggplot matplotlib ordered_set cpplint

(setenv "PYTHONPATH" "python3")

Expand Down
15 changes: 15 additions & 0 deletions shortcuts.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,21 @@ See the requirements: [https://github.com/leoliu/ggtags][]
* `C-c C-o` - Overview of the definitions in the current file.
* `M-.` - Jump to the definition of a function or class (`elpy-goto-definition`).

### Flycheck

Within the error list the following key bindings are available:

* `RET` - Go to the current error in the source buffer (``).
* `n` - Jump to the next error (``).
* `p` - Jump to the previous error (``).
* `e` - Explain the error (``).
* `f` - Filter the error list by level (``).
* `F` - Remove the filter (``).
* `S` - Sort the error list by the column at point (``).
* `g` - Check the source buffer and update the error list (``).
* `q` - Quit the error list and hide its window (``).


## Use Cases

### [Find and replace text in several files in a directory](http://stackoverflow.com/questions/270930/using-emacs-to-recursively-find-and-replace-in-text-files-not-already-open)
Expand Down

0 comments on commit 1572dbf

Please sign in to comment.