Skip to content

Commit

Permalink
Documentation update, make LICENSE usage consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
kaisalmen committed Mar 18, 2024
1 parent 043371f commit 9d4c543
Show file tree
Hide file tree
Showing 107 changed files with 294 additions and 324 deletions.
203 changes: 63 additions & 140 deletions README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/versions-and-history.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ The following table describes which version of **monaco-languageclient** and **@

### March 2024 (v8.0.0)

`@codingame/monaco-editor-treemended` is replaced by self-standing `@codingame/monaco-vscode-editor-api`. All service and editor related functions have been moved from `monaco-languageclient` to `monaco-editor-wrapper` which has been moved into this repository.
`@codingame/monaco-editor-treemended` is replaced by self-standing `@codingame/monaco-vscode-editor-api`. `monaco-editor-wrapper` and `@typefox/monaco-editor-react` have been moved into this repository.

### October 2023 (v7.0.0)

Expand Down
6 changes: 2 additions & 4 deletions packages/client/License.txt → packages/client/LICENSE
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
Copyright (c) 2018-2024 TypeFox GmbH (http://www.typefox.io)

All rights reserved.

MIT License

Copyright 2018 - present TypeFox GmbH

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
Expand Down
41 changes: 37 additions & 4 deletions packages/client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,45 @@

Module to connect [Monaco editor](https://microsoft.github.io/monaco-editor/) with [language servers](https://microsoft.github.io/language-server-protocol/).

See [here](https://github.com/TypeFox/monaco-languageclient/blob/main/README.md) for a detailed documentation.
## CHANGELOG

All changes are noted in the [CHANGELOG](https://github.com/TypeFox/monaco-languageclient/blob/main/packages/client/CHANGELOG.md).

## Getting Started

This is npm package is part of the <https://github.com/TypeFox/monaco-languageclient> mono repo. Please follow the main repositories [instructions]](<https://github.com/TypeFox/monaco-languageclient#getting-started>) to get started with local development.

## Usage

### NEW with v8: Own monaco-vscode-editor-api package

Since version 2 (see [Important Project Changes](https://github.com/TypeFox/monaco-languageclient/blob/main/docs/versions-and-history.md#important-project-changes)) of this library we rely on [@codingame/monaco-vscode-api](https://github.com/CodinGame/monaco-vscode-api) to supply the vscode API. It evolved substantially since then and thesedays allows to use many vscode only services with `monaco-editor`. With v6 and v7 we "treemend" used a "treemended" version of `monaco-editor` which brought back monaco-editor code that was removed during bundling/threeshaking (*treemending*). This left users with the need to define overrides / resolution which was problematic.
Therefore [monaco-vscode-editor-api](https://www.npmjs.com/package/@codingame/monaco-editor-wrapper) is now used and installed as an alias to `monaco-editor` because it provides the same api as the official monaco-editor.

### Using services and extra packages from @codingame/monaco-vscode-api

## History
The bespoke projects not only supplies the api, but it provides 100+ packages with additional services, default extensions and language packs. By default when initalizing `monaco-languageclient` via the required `initServices` the following services are always loaded:

For the history please see the [README](https://github.com/TypeFox/monaco-languageclient/blob/main/README.md#latest-important-project-changes) and [CHANGELOG](https://github.com/TypeFox/monaco-languageclient/blob/main/packages/client/CHANGELOG.md).
- *languages* and model *services* (always added by `monaco-languagclient`)
- *layout*, *environment*, *extension*, *files* and *quickAccess* (always added by `monaco-vscode-api`)

Please check the [following link](https://github.com/CodinGame/monaco-vscode-api#monaco-standalone-services) for information about all services supplied by [@codingame/monaco-vscode-api](https://github.com/CodinGame/monaco-vscode-api).

Please check our examples [in the examples overview chapter](https://github.com/TypeFox/monaco-languageclient/tree/main?tab=readme-ov-file#examples-overview) as they demonstrate the usage.

#### textmate and monarch

If you use the `textmate` or `theme` services you are able to load textmate based grammars and theme definitions from vscode:

```js
import getThemeServiceOverride from '@codingame/monaco-vscode-theme-service-override';
import getTextmateServiceOverride from '@codingame/monaco-vscode-textmate-service-override';
```

Once you those services you can no longer make use of monarch based grammars and themes.

See [here](https://github.com/TypeFox/monaco-languageclient/blob/main/README.md) for a detailed documentation.

## License

[MIT](https://github.com/TypeFox/monaco-languageclient/blob/main/packages/client/License.txt)
[MIT](https://github.com/TypeFox/monaco-languageclient/blob/main/packages/client/LICENSE)
2 changes: 1 addition & 1 deletion packages/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"src",
"README.md",
"CHANGELOG.md",
"License.txt"
"LICENSE"
],
"dependencies": {
"@codingame/monaco-vscode-languages-service-override": "~3.1.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* --------------------------------------------------------------------------------------------
* Copyright (c) 2024 TypeFox GmbH (http://www.typefox.io). All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Licensed under the MIT License. See LICENSE in the package root for license information.
* ------------------------------------------------------------------------------------------ */

import { BaseLanguageClient, MessageTransports, LanguageClientOptions } from 'vscode-languageclient/lib/common/client.js';
Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/vscode/services.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* --------------------------------------------------------------------------------------------
* Copyright (c) 2024 TypeFox GmbH (http://www.typefox.io). All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Licensed under the MIT License. See LICENSE in the package root for license information.
* ------------------------------------------------------------------------------------------ */

import { editor, Environment } from 'monaco-editor';
Expand Down
6 changes: 2 additions & 4 deletions packages/examples/License.txt → packages/examples/LICENSE
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
Copyright (c) 2018-2024 TypeFox GmbH (http://www.typefox.io)

All rights reserved.

MIT License

Copyright 2023 - present TypeFox GmbH

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
Expand Down
10 changes: 9 additions & 1 deletion packages/examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ This package contains [all examples from the monaco-languageclient repository](h

All changes are noted in the [CHANGELOG](https://github.com/TypeFox/monaco-languageclient/blob/main/packages/examples/CHANGELOG.md).

## Getting Started

This is npm package is part of the <https://github.com/TypeFox/monaco-languageclient> mono repo. Please follow the main repositories [instructions]](<https://github.com/TypeFox/monaco-languageclient#getting-started>) to get started with local development.

## Usage

Needs to be added.

## License

[MIT](https://github.com/TypeFox/monaco-languageclient/blob/main/packages/examples/License.txt)
[MIT](https://github.com/TypeFox/monaco-languageclient/blob/main/packages/examples/LICENSE)
2 changes: 1 addition & 1 deletion packages/examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
"*.ts",
"README.md",
"CHANGELOG.md",
"License.txt"
"LICENSE"
],
"scripts": {
"clean": "shx rm -fr dist *.tsbuildinfo",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/src/browser/main.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* --------------------------------------------------------------------------------------------
* Copyright (c) 2024 TypeFox GmbH (http://www.typefox.io). All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Licensed under the MIT License. See LICENSE in the package root for license information.
* ------------------------------------------------------------------------------------------ */

import * as vscode from 'vscode';
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/src/common/example-apps-common.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* --------------------------------------------------------------------------------------------
* Copyright (c) 2024 TypeFox GmbH (http://www.typefox.io). All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Licensed under the MIT License. See LICENSE in the package root for license information.
* ------------------------------------------------------------------------------------------ */

import { ModelUpdate, MonacoEditorLanguageClientWrapper, UserConfig } from 'monaco-editor-wrapper';
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/src/common/language-server-runner.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* --------------------------------------------------------------------------------------------
* Copyright (c) 2024 TypeFox GmbH (http://www.typefox.io). All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Licensed under the MIT License. See LICENSE in the package root for license information.
* ------------------------------------------------------------------------------------------ */

import { WebSocketServer } from 'ws';
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/src/common/server-commons.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* --------------------------------------------------------------------------------------------
* Copyright (c) 2024 TypeFox GmbH (http://www.typefox.io). All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Licensed under the MIT License. See LICENSE in the package root for license information.
* ------------------------------------------------------------------------------------------ */
import { WebSocketServer, ServerOptions } from 'ws';
import { IncomingMessage, Server } from 'http';
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/src/groovy/client/main.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* --------------------------------------------------------------------------------------------
* Copyright (c) 2024 TypeFox GmbH (http://www.typefox.io). All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Licensed under the MIT License. See LICENSE in the package root for license information.
* ------------------------------------------------------------------------------------------ */

import getKeybindingsServiceOverride from '@codingame/monaco-vscode-keybindings-service-override';
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/src/groovy/config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* --------------------------------------------------------------------------------------------
* Copyright (c) 2024 TypeFox GmbH (http://www.typefox.io). All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Licensed under the MIT License. See LICENSE in the package root for license information.
* ------------------------------------------------------------------------------------------ */
export const groovyConfig = {
port: 30002,
Expand Down
19 changes: 19 additions & 0 deletions packages/examples/src/groovy/server/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Groovy Language Server self-built instructions

## Preperation

In another directory run (Requires Gradle 7 and OpenJDK 17)

```shell
git clone https://github.com/GroovyLanguageServer/groovy-language-server
./gradlew build
```

Afterwards copy the jar file from from `groovy-language-server/build/libs/groovy-language-server-all.jar` to `packages/examples/resources/external/groovy`.

From the root of this repository run:

```shell
# start the express server with the language server running as external Java process.
npm run start:example:server:groovy
```
2 changes: 1 addition & 1 deletion packages/examples/src/groovy/server/direct.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* --------------------------------------------------------------------------------------------
* Copyright (c) 2024 TypeFox GmbH (http://www.typefox.io). All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Licensed under the MIT License. See LICENSE in the package root for license information.
* ------------------------------------------------------------------------------------------ */

import { resolve } from 'path';
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/src/groovy/server/main.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* --------------------------------------------------------------------------------------------
* Copyright (c) 2024 TypeFox GmbH (http://www.typefox.io). All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Licensed under the MIT License. See LICENSE in the package root for license information.
* ------------------------------------------------------------------------------------------ */

import { runLanguageServer } from '../../common/language-server-runner.js';
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* --------------------------------------------------------------------------------------------
* Copyright (c) 2024 TypeFox GmbH (http://www.typefox.io). All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Licensed under the MIT License. See LICENSE in the package root for license information.
* ------------------------------------------------------------------------------------------ */

/* client side export only */
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/src/json/client/wrapperWs.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* --------------------------------------------------------------------------------------------
* Copyright (c) 2024 TypeFox GmbH (http://www.typefox.io). All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Licensed under the MIT License. See LICENSE in the package root for license information.
* ------------------------------------------------------------------------------------------ */

import getKeybindingsServiceOverride from '@codingame/monaco-vscode-keybindings-service-override';
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/src/json/server/direct.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* --------------------------------------------------------------------------------------------
* Copyright (c) 2024 TypeFox GmbH (http://www.typefox.io). All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Licensed under the MIT License. See LICENSE in the package root for license information.
* ------------------------------------------------------------------------------------------ */
import { resolve } from 'path';
import { runJsonServer } from './main.js';
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/src/json/server/json-server.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* --------------------------------------------------------------------------------------------
* Copyright (c) 2024 TypeFox GmbH (http://www.typefox.io). All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Licensed under the MIT License. See LICENSE in the package root for license information.
* ------------------------------------------------------------------------------------------ */
import { readFile } from 'fs';
import requestLight from 'request-light';
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/src/json/server/main.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* --------------------------------------------------------------------------------------------
* Copyright (c) 2024 TypeFox GmbH (http://www.typefox.io). All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Licensed under the MIT License. See LICENSE in the package root for license information.
* ------------------------------------------------------------------------------------------ */
import { runLanguageServer } from '../../common/language-server-runner.js';
import { resolve } from 'path';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* --------------------------------------------------------------------------------------------
* Copyright (c) 2024 TypeFox GmbH (http://www.typefox.io). All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Licensed under the MIT License. See LICENSE in the package root for license information.
* ------------------------------------------------------------------------------------------ */

import { Uri } from 'vscode';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* --------------------------------------------------------------------------------------------
* Copyright (c) 2024 TypeFox GmbH (http://www.typefox.io). All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Licensed under the MIT License. See LICENSE in the package root for license information.
* ------------------------------------------------------------------------------------------ */

import getEditorServiceOverride from '@codingame/monaco-vscode-editor-service-override';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* --------------------------------------------------------------------------------------------
* Copyright (c) 2024 TypeFox GmbH (http://www.typefox.io). All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Licensed under the MIT License. See LICENSE in the package root for license information.
* ------------------------------------------------------------------------------------------ */

export const LangiumMonarchContent = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* --------------------------------------------------------------------------------------------
* Copyright (c) 2018-2022 TypeFox GmbH (http://www.typefox.io). All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Licensed under the MIT License. See LICENSE in the package root for license information.
* ------------------------------------------------------------------------------------------ */

import { EmptyFileSystem } from 'langium';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* --------------------------------------------------------------------------------------------
* Copyright (c) 2024 TypeFox GmbH (http://www.typefox.io). All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Licensed under the MIT License. See LICENSE in the package root for license information.
* ------------------------------------------------------------------------------------------ */

import { MonacoEditorLanguageClientWrapper } from 'monaco-editor-wrapper';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* --------------------------------------------------------------------------------------------
* Copyright (c) 2024 TypeFox GmbH (http://www.typefox.io). All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Licensed under the MIT License. See LICENSE in the package root for license information.
* ------------------------------------------------------------------------------------------ */

import getEditorServiceOverride from '@codingame/monaco-vscode-editor-service-override';
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/src/langium/statemachine/main-react.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* --------------------------------------------------------------------------------------------
* Copyright (c) 2024 TypeFox GmbH (http://www.typefox.io). All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Licensed under the MIT License. See LICENSE in the package root for license information.
* ------------------------------------------------------------------------------------------ */

import React from 'react';
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/src/langium/statemachine/main.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* --------------------------------------------------------------------------------------------
* Copyright (c) 2024 TypeFox GmbH (http://www.typefox.io). All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Licensed under the MIT License. See LICENSE in the package root for license information.
* ------------------------------------------------------------------------------------------ */

import * as vscode from 'vscode';
Expand Down
Loading

0 comments on commit 9d4c543

Please sign in to comment.