From 1e44aaedf3b8848c50943340b508b1ef5e1b205d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Thu, 14 May 2020 17:09:15 +0200 Subject: [PATCH] [ivette] minor emacs fix --- ivette/README.md | 25 ++++++++++++++++++++----- ivette/jsdoc.json | 21 --------------------- ivette/share/typescript-config.el | 1 + 3 files changed, 21 insertions(+), 26 deletions(-) delete mode 100644 ivette/jsdoc.json diff --git a/ivette/README.md b/ivette/README.md index ca9c70e9659..575f15b84b5 100644 --- a/ivette/README.md +++ b/ivette/README.md @@ -18,16 +18,31 @@ From the `./ivette` sub-directory of Frama-C main directory: $ make app ``` -## Typescript Editors +## Typescript with Emacs -Emacs mode configuration can be setup with Typescript, Web-mode and Tide packages -which are all available with MELPA. For configuring your `.emacs` accordingly, +Emacs mode configuration can be setup with Typescript, Web-mode and Tide packages. +You can install them with `M-x package-install`: + +``` +M-x package-refresh-contents ;; updates your index +M-x package-install web-mode +M-x package-install typescript-mode +M-x package-install tidse +``` + +For configuring your `.emacs` accordingly, please look at the `share/typescript-config.el` file. -This setup the Tide package to work with +It setup the Tide package to work with `typescript-mode` for `*.ts` files (see also `tsfmt.json` config file) and `web-mode` for `*.tsx` files. -VS-Code is also known to work out of the box. +Usefull commands: +``` +M-. goto definition +M-, back to previous point +M-x tide-documentation-at-point +M-x tide-error-at-point +``` ## Coding Guidelines diff --git a/ivette/jsdoc.json b/ivette/jsdoc.json deleted file mode 100644 index 3737d8aa520..00000000000 --- a/ivette/jsdoc.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "source": { - "include": [ - "src/dome/doc/README.md", - "build" - ] - }, - "opts": { - "recurse": true, - "tutorials": "src/dome/doc/tutorials", - "template": "src/dome/doc/template" - }, - "plugins": [ "plugins/markdown" ], - "templates": { - "default": { - "useLongnameInNav": true, - "outputSourceFiles": false, - "includeDate": false - } - } -} diff --git a/ivette/share/typescript-config.el b/ivette/share/typescript-config.el index bac505c7d20..2a524efd079 100644 --- a/ivette/share/typescript-config.el +++ b/ivette/share/typescript-config.el @@ -19,6 +19,7 @@ (defun setup-txs-mode () (interactive) (when (string-equal "tsx" (file-name-extension buffer-file-name)) + (setq web-mode-enable-auto-quoting nil) (setup-tide-mode))) ;; aligns annotation to the right hand side -- GitLab