Itamae is a Visual Studio Code Plugin to edit HL7® FHIR® Shorthand. Currently, it supports the STU1 version of Shorthand. It's core features are:
- Codestyling
- Autocomplete
- Syntax Checking
The project is not yet published as extension to VS Code, so you have to install it manually. Feature requests and suggestions are welcome, as are your contributions ;)
Type in command prompt: code --install-extension fsh-editor-0.0.4.vsix
To load an extension, you need to copy the files to your VS Code extensions folder .vscode/extensions.
Depending on your platform, it is located in the following folders:
- Windows %USERPROFILE%.vscode\extensions
- macOS ~/.vscode/extensions
- Linux ~/.vscode/extensions
The editor will start automatically, if the language fsh is identified
Different coloring for declaration keywords, additional keyword, comments, and todos.
These bugs will be fixed in the future:
- there has to be two lines between entities for the coloring to work properly, if the previous one has a line comment at the end
- coloring/scope isn't right for usage & severity (all instances with CODE), only if a correct syntax is typed the coloring is correct, but the lines underneath are not colored correct
- Todos must have a space or text after the keyword, otherwise the next line is also marked as a todo
Right now there is only a dark colortheme available. Maybe expand in the future.
Structure of the language server is based on vsCode LSP sample
Completion provider is based on vsCode extension samples
Snippets were used for the autocompletion of the entities (CodeSystem, Extension, Instance, Invariant, Mapping, Profile, RuleSet, ValueSet). The autocompletion of the additional keywords and other smaller words for defining rules are handled by the completion provider.
- Each fsh file has to be clicked once to connected them to the workspace, then the profiles,extensions and other structures will be suggested if you need to reference one
These bugs will be fixed in the future:
A lexer created by the lexer generator moo splits the whole text in different tokens. A parser created by nearley parses the text and recognizes the grammar. The syntax checking is divided into two parts: 1. Metatdata of the entities 2. Rules of the entities. Right now only the first parser is working and checking for the correct grammar.
These bugs will be fixed in the future:
- only marking the first error they found
- An entities at the end will only be recognize if there is an empty line at the end of the file
- no support for multiline comments
- no support for multiline strings
- after a reference "Reference(actualReference)" there are no other characters allowed
- no support for multiline comments
- no support for multiline strings
If you have any questions, please checkout our FAQ section.
First make sure to read our general contribution guidelines.
Copyright (c) 2020 the original author or authors. DO NOT ALTER OR REMOVE COPYRIGHT NOTICES.
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.
If you are going to use this project as part of a research paper, we would ask you to reference this project by citing it. TODO zenodo doi