2015-12-02 14:23:39 +00:00
|
|
|
#+TITLE: Semantic layer
|
2015-06-10 16:44:30 +00:00
|
|
|
|
2019-05-02 21:49:30 +00:00
|
|
|
#+TAGS: emacs|layer
|
|
|
|
|
2019-05-07 20:05:06 +00:00
|
|
|
* Table of Contents :TOC_5_gh:noexport:
|
2017-05-22 14:16:12 +00:00
|
|
|
- [[#description][Description]]
|
2017-08-06 02:14:10 +00:00
|
|
|
- [[#features][Features:]]
|
2017-05-22 14:16:12 +00:00
|
|
|
- [[#install][Install]]
|
2018-12-05 03:03:03 +00:00
|
|
|
- [[#key-bindings][Key bindings]]
|
2016-04-13 03:31:38 +00:00
|
|
|
|
2015-06-10 16:44:30 +00:00
|
|
|
* Description
|
2015-06-10 21:16:01 +00:00
|
|
|
CEDET is a *C*ollection of *E*macs *D*evelopment *E*nvironment *T*ools written
|
|
|
|
with the end goal of creating an advanced development environment in Emacs.
|
|
|
|
CEDET includes common features such as intelligent completion, source code
|
|
|
|
navigation, project management, code generation with templates. CEDET also
|
2015-06-10 16:44:30 +00:00
|
|
|
provides a framework for working with programming languages; support for new
|
|
|
|
programming languages can be added and use CEDET to provide IDE-like features.
|
|
|
|
This framework is called Semantic.
|
|
|
|
|
|
|
|
Semantic is a package that provides a framework for writing parsers. Parsing is
|
|
|
|
a process of analyzing source code based on programming language syntax. The
|
|
|
|
packages relies on Semantic for analyzing source code and uses its results to
|
|
|
|
perform smart code refactoring that based on code structure of the analyzed
|
|
|
|
language, instead of plain text structure. Semantic is the core of CEDET.
|
|
|
|
|
2017-08-06 02:14:10 +00:00
|
|
|
** Features:
|
2015-06-10 16:44:30 +00:00
|
|
|
- Display function or variable definition at the bottom.
|
|
|
|
- Display current function cursor is in at the top. See
|
|
|
|
[[https://github.com/tuhdo/semantic-stickyfunc-enhance][this page]] for demos in some programming languages.
|
|
|
|
- Support common C/C++ refactoring with [[https://github.com/tuhdo/semantic-refactor][semantic-refactor]]. See
|
|
|
|
[[https://github.com/tuhdo/semantic-refactor/blob/master/srefactor-demos/demos.org][this page]] for demonstration of refactoring features.
|
2018-08-09 20:48:14 +00:00
|
|
|
- Support Lisp source code formatting with [[https://github.com/tuhdo/semantic-refactor][semantic-refactor]]. See
|
|
|
|
[[https://github.com/tuhdo/semantic-refactor/blob/master/srefactor-demos/demos-elisp.org][this page]] for demonstration of Lisp formatting features.
|
2015-06-10 16:44:30 +00:00
|
|
|
|
|
|
|
* Install
|
2016-01-06 05:21:55 +00:00
|
|
|
To use this configuration layer, add it to your =~/.spacemacs=. You will need to
|
|
|
|
add =semantic= to the existing =dotspacemacs-configuration-layers= list in this
|
|
|
|
file.
|
2015-06-10 16:44:30 +00:00
|
|
|
|
2018-12-05 03:03:03 +00:00
|
|
|
* Key bindings
|
2015-06-10 16:44:30 +00:00
|
|
|
|
2019-12-03 15:00:56 +00:00
|
|
|
| Key binding | Description |
|
|
|
|
|-------------+------------------------------------------|
|
|
|
|
| ~SPC m r~ | srefactor: refactor thing at point. |
|
|
|
|
| ~SPC T S~ | toggle =semantic-stickyfunc-mode= |
|
|
|
|
| ~SPC T C-S~ | toggle =global-semantic-stickyfunc-mode= |
|