all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Gabriele Labita <gabriele.labita@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Semantic mode for c++
Date: Mon, 26 Jun 2017 14:34:31 +0200	[thread overview]
Message-ID: <11d06dbd-0321-ca9a-3967-3dab2cf61b6d@gmail.com> (raw)

Hi,
I'm trying to configure semantic module to have auto completion for c++ 
in emacs.
I put this code on .emacs file:

```
  (add-hook 'c-mode-common-hook
        '(lambda () (load (concat custom-config-path 
"custom-config-c++.el")))
)
  ```

And this is my custom-config-c++.el file:
```
(add-to-list 'semantic-default-submodes 
'global-semantic-idle-scheduler-mode)
(add-to-list 'semantic-default-submodes 
'global-semantic-idle-completions-mode)
(add-to-list 'semantic-default-submodes 'global-semantic-idle-summary-mode)
(add-to-list 'semantic-default-submodes 'global-semanticdb-minor-mode)
(add-to-list 'semantic-default-submodes 
'global-semantic-show-parser-state-mode)
(add-to-list 'semantic-default-submodes 
'global-semantic-show-unmatched-syntax-mode)

(semantic-mode 1)

(require 'semantic/ia)
(require 'semantic/bovine/gcc)

(semanticdb-enable-gnu-global-databases 'c++-mode)

(global-ede-mode t)

(global-flycheck-mode t)
(setq flycheck-gcc-language-standard "c++14")
;; To add library use follow command:
;;   > flycheck-pkg-config

;; 70 Columns RULE
(require 'whitespace)
(setq whitespace-line-column 71)
(setq whitespace-style '(face lines-tail))

(global-whitespace-mode +1)
  ```

It works well but I've a annoying problem: when I use the command: 
'semantic-ia-complete-symbol' on 'std::', the semantic db is created in 
the .emacs.d/semanticdb/ folder. The problem is that the created db 
refers to c++98 instead of c++14. For example: when auto complete smart 
pointers, I find the "auto_ptr" suggestion and not "unique_ptr" or 
"shared_ptr".
How can I generate the right db?

More Infos:
- Debian 9 amd 64
- gcc 6.3.0
- Emacs 24.5.1
- global 6.5.6



             reply	other threads:[~2017-06-26 12:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-26 12:34 Gabriele Labita [this message]
2017-06-26 13:42 ` Semantic mode for c++ Bastian Beischer
2017-06-26 21:32   ` Gabriele Labita

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=11d06dbd-0321-ca9a-3967-3dab2cf61b6d@gmail.com \
    --to=gabriele.labita@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.