Skip to content

Latest commit

 

History

History
82 lines (60 loc) · 3.19 KB

README.md

File metadata and controls

82 lines (60 loc) · 3.19 KB

Modelica Language Server

Build

A very early version of a Modelica Language Server based on OpenModelica/tree-sitter-modelica.

For syntax highlighting install enxtension AnHeuermann.metamodelica in addition.

Functionality

This Language Server works for Modelica files. It has the following language features:

  • Provide Outline of Modelica files.

Installation

Check the Marketplace for OpenModelica.modelica-language-server.

Structure

.
├── client // Language Client
│   ├── src
│   │   ├── test // End to End tests for Language Client / Server
│   │   └── extension.ts // Language Client entry point
├── package.json // The extension manifest.
└── server // Modelica Language Server
    └── src
        └── server.ts // Language Server entry point

Building the Language Server

  • Run npm install and npm run postinstall in this folder.This installs all necessary npm modules in both the client and server folder
  • Open VS Code on this folder.
  • Press Ctrl+Shift+B to start compiling the client and server in watch mode.
  • Switch to the Run and Debug View in the Sidebar (Ctrl+Shift+D).
  • Select Launch Client from the drop down (if it is not already).
  • Press ▷ to run the launch config (F5).
  • In the Extension Development Host instance of VSCode, open a document in 'modelica' language mode.
    • Check the console output of Language Server Modelica to see the parsed tree of the opened file.

Build and Install Extension

npx vsce package

License

modelica-language-server is licensed under the OSMC Public License, see OSMC-License.txt.

3rd Party Licenses

This extension is based on https://github.com/microsoft/vscode-extension-samples/tree/main/lsp-sample, licensed under MIT license.

Some parts of the source code are taken from bash-lsp/bash-language-server, licensed under the MIT license and adapted to the Modelica language server.

OpenModelica/tree-sitter-modelica v0.2.0 is included in this extension and is licensed under the OSMC-PL v1.8.

Acknowledgments

This package was initially developed by Hochschule Bielefeld - University of Applied Sciences and Arts.