This repository contains a language server implementation for the Natural language created by Software AG.
The latest release and changelog can be found at GitHub Releases.
The language server supports, but isn't limited to:
- Reporting syntax and linter diagnostics as you type
- Code completion
- Hover documentation of variables and modules
- Workspace symbols
- File structure
- Quickfixes and refactorings
- Outline
- Code Snippets
- Signature Help for modules
- and many more
The language server can be used for driving daily development in Natural, but it does have some limitations:
The parser is still incomplete and has some rough edges where the Natural language is context sensitive.
It also currently uses some hard coded assumptions about the language settings that should be configurable by the .natural file (like thousands seperators), which means that e.g. regional settings aren't considered.
Reporting Mode hasn't been considered yet, so currently only the structured mode syntax of statements is parsed correctly.
Some analyzers assume a coding style that might not fit your needs. Some of these are configurable. If you're missing some options, feel free to open an issue.
Contributions in the form of code, issues and feature requests are always welcome. Check out the contribution guide to find out more.
You can write your own analyzers, quickfixes and refactorings. There is some guidance to follow along in the form of documentation:
This repository contains the following projects:
natparse: Parser for the Natural language and project formatnatlint: Static code analysisnatls: Language Server implementation usingnatparseandnatlintnatqube: Plugin for SonarQube which usesnatlintto aggregate diagnostics and measuresnatdoc(planned): Javadoc-like documentation format to generate a static documentation site
All projects are written in Java and require the latest JDK to build and run. The only exception is natqube which requires Java 11 as SonarQube only supports running on Java 11 on the server side at the moment.
All projects are aggregated as Gradle modules into a single Gradle project.
To build the project and run tests use ./gradlew build.
To create standalone jar files (fat jars that include all dependencies) run ./gradlew fatJar.
The language server is tested primarily with two clients:
- vscode-natural
- neovim via
nvim-lspconfig
The logo was created by Duffed
The language server uses an unmodified version of lsp4j.
