Skip to content
Snippets Groups Projects
Commit 2f83bf7d authored by Loïc Correnson's avatar Loïc Correnson Committed by Michele Alberti
Browse files

[emacs] setup configuration

parent d8354963
No related branches found
No related tags found
No related merge requests found
;;; -------------------------------------------------------------------------
;;; Typescript Emacs Configuration
;;;
;;; (suggestions for populating your own .emacs file)
;;; -------------------------------------------------------------------------
(defun setup-tide-mode ()
(interactive)
(tide-setup)
(flycheck-mode +1)
(setq flycheck-check-syntax-automatically '(save mode-enabled))
(eldoc-mode +1)
(tide-hl-identifier-mode +1)
;; company is an optional dependency. You have to
;; install it separately via package-install
;; `M-x package-install [ret] company`
(company-mode +1))
(defun setup-txs-mode ()
(interactive)
(when (string-equal "tsx"
(file-name-extension buffer-file-name))
(setup-tide-mode)))
;; aligns annotation to the right hand side
(setq company-tooltip-align-annotations t)
;; formats the buffer before saving
(add-hook 'before-save-hook 'tide-format-before-save)
;; Setup Tide for typescript
(add-hook 'typescript-mode-hook #'setup-tide-mode)
;; Setup Tide for typescript with JSX syntax
(require 'web-mode)
(add-hook 'web-mode-hook #'setup-txs-mode)
;; Setup Typescript Indentation
(setq-default typescript-indent-level 2)
(setq-default web-mode-markup-indent-offset 2)
(setq-default web-mode-css-indent-offset 2)
(setq-default web-mode-code-indent-offset 2)
;; Auto-mode Loading
(add-to-list 'auto-mode-alist '("\\.ts$" . typescript-mode))
(add-to-list 'auto-mode-alist '("\\.tsx$" . web-mode))
;;; -------------------------------------------------------------------------
......@@ -6,20 +6,16 @@ From the `./gui` sub-directory of Frama-C main directory:
$ make app
```
## Mirroring to Dome/Electron
The content of ./src/dome is git-subtree to be kept in sync
with Dome/Electron. The related commands must be issued from
the Frama-C root directory:
## Typescript & Emacs
1. Importing a branch from dome/electron:
```
$ git subtree pull -P gui/src/dome git@git.frama-c.com:dome/electron.git <branch>
```
Emacs mode configuration can be setup with Typescript, Web-mode and Tide packages
which are all available with MELPA. For configuring your `.emacs` accordingly,
please look at the [EMACS](./EMACS.el) file.
2. Exporting to a branch into dome/electron:
## Mirroring to Dome/Electron
```
$ git subtree push -P gui/src/dome git@git.frama-c.com:dome/electron.git <branch>
```
The content of ./src/dome shall be kept in sync with
the public repository for Dome. An experimental support
for automated synchronisation is available with:
- `make dome-pull` for pulling Dome updates into Ivette
- `make dome-push` for pushing local updates into Dome
{
"indentSize": 2,
"tabSize": 2,
"convertTabsToSpaces": true,
"indentStyle": "Smart"
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment