summaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorRavi R Kiran <aine.marina@gmail.com>2018-05-23 02:30:08 (GMT)
committerRavi R Kiran <aine.marina@gmail.com>2018-05-23 02:30:08 (GMT)
commitc7d7271e3f01eb7c7095ff81addd47796ac9d849 (patch)
tree85c151c10dd17cc987dc91192db5bd8bf41e6946 /lisp
parent2a3af48bf2adc11cab12f0d42f5e5a0a49d976ae (diff)
downloaddotemacs-c7d7271e3f01eb7c7095ff81addd47796ac9d849.zip
dotemacs-c7d7271e3f01eb7c7095ff81addd47796ac9d849.tar.gz
dotemacs-c7d7271e3f01eb7c7095ff81addd47796ac9d849.tar.bz2
More cquery optimizations
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ravi-init-cpp.el8
-rw-r--r--lisp/ravi-init-files.el1
2 files changed, 7 insertions, 2 deletions
diff --git a/lisp/ravi-init-cpp.el b/lisp/ravi-init-cpp.el
index eaabe28..653cd5e 100644
--- a/lisp/ravi-init-cpp.el
+++ b/lisp/ravi-init-cpp.el
@@ -275,6 +275,8 @@ _i_: hide ifdef _C-i_: show _b_: hide/show _o_: other file
(add-to-list 'c-cleanup-list 'scope-operator)
;; one-liner-defun and comment-close-slash found to be annoying
+ (when (bound-and-true-p ravi/use-cquery-mode)
+ (setq-local company-transformers nil))
(font-lock-add-keywords 'c++-mode '(("\\<\\(assert\\|DEBUG\\)("
1 font-lock-warning-face t))))
@@ -475,6 +477,7 @@ this to 3 makes header-protection define KIG_MISC_NEWTYPE_H for a file named
(bind-key "]" 'ravi/insert-closing-delimiter c-mode-base-map)
+ (setq ravi/use-cquery-mode t)
(use-package rtags
:load-path (lambda () (ravi/emacs-file "site-lisp/rtags/src"))
:config
@@ -529,13 +532,14 @@ this to 3 makes header-protection define KIG_MISC_NEWTYPE_H for a file named
(bind-key "C-<tab>" 'company-rtags c-mode-base-map)
(add-to-list 'company-backends 'company-rtags)))))
- (setq ravi/use-cquery-mode t)
(when (bound-and-true-p ravi/use-cquery-mode)
(use-package cquery
:commands lsp-cquery-enable
:init
(progn
(defun ravi/cquery-enable ()
+ (setq lsp-enable-completion-at-point nil)
+ (setq lsp-enable-indentation nil) ; conflicts with other indentation commands
(condition-case nil
(lsp-cquery-enable)
(user-error nil)))
@@ -551,7 +555,7 @@ this to 3 makes header-protection define KIG_MISC_NEWTYPE_H for a file named
(use-package company-lsp
:config
(progn
- ;; (setq company-transformers nil) ; to do: only for C++-mode with cquery
+ (bind-key "H-<tab>" 'company-rtags c-mode-base-map)
(setq company-lsp-async t)
(setq company-lsp-cache-candidates nil))
:ensure t)
diff --git a/lisp/ravi-init-files.el b/lisp/ravi-init-files.el
index e3800e2..db54707 100644
--- a/lisp/ravi-init-files.el
+++ b/lisp/ravi-init-files.el
@@ -143,6 +143,7 @@ not exist, it is not added to the filecache."
:config
(progn
(projectile-global-mode)
+ (add-to-list 'projectile-globally-ignored-directories ".cquery_cached_index")
(bind-key "C-<f2>" 'projectile-find-file-dwim)
(if (and (boundp 'ravi/use-helm-instead-of-ido) ravi/use-helm-instead-of-ido)