Guest User

Untitled

a guest
Nov 20th, 2017
164
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (use-package company-c-headers
  2.   :config
  3.   (add-hook 'c-mode-common-hook (lambda () (add-local-company-backend 'company-c-headers)))
  4.   (add-to-list 'company-c-headers-path-system "/usr/include/c++/7/"))
  5.  
  6. (use-package rtags
  7.   :config
  8.   (use-package company-rtags)
  9.   (use-package flycheck-rtags)
  10.   (when (featurep 'helm)
  11.     (use-package helm-rtags)
  12.     (setq rtags-display-result-backend 'helm))
  13.   (setq
  14.    rtags-autostart-diagnostics t
  15.    rtags-completions-enabled t
  16.    rtags-imenu-syntax-highlighting t
  17.    rtags-jump-to-first-match nil
  18.    rtags-rdm-process-use-pipe t
  19.    rtags-timeout 1200
  20.    )
  21.   (rtags-diagnostics)
  22.   (add-hook 'c-mode-hook   (lambda () (add-local-company-backend 'company-rtags)))
  23.   (add-hook 'c++-mode-hook (lambda () (add-local-company-backend 'company-rtags)))
  24.   (rtags-enable-standard-keybindings)
  25.   (add-hook 'c-mode-hook   #'rtags-start-process-unless-running)
  26.   (add-hook 'c++-mode-hook #'rtags-start-process-unless-running)
  27.   (rtags-set-periodic-reparse-timeout 8)
  28.   (bind-keys :map c-mode-base-map
  29.              ("M-." . rtags-find-symbol-at-point)
  30.              ("M-," . rtags-find-references-at-point))
  31.   (defadvice save-buffers-kill-terminal
  32.       (before save-buffers-kill-terminal-before activate)
  33.     "Hack to make Emacs stop asking to kill rdm when closing."
  34.     (rtags-quit-rdm)
  35.     (sit-for 0.1)))
  36.  
  37. (use-package cmake-ide
  38.   :bind ("<f5>" . cmake-ide-compile)
  39.   :config
  40.   (require 'rtags)
  41.   (cmake-ide-setup)
  42.   (add-hook 'c-mode-hook   #'cmake-ide-load-db)
  43.   (add-hook 'c++-mode-hook #'cmake-ide-load-db)
  44.   (setq cmake-ide-src-extensions '(".c" ".cpp" ".C" ".cxx" ".cc" ".c++")))
RAW Paste Data