Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve README and Other Markdown Files #58

Merged
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing to Slice Extension for Visual Studio Code

Thank you for your interest in contributing to Slice Extension for Visual Studio Code!
Thank you for your interest in contributing to the Slice Extension for Visual Studio Code!

## How to Contribute

Expand All @@ -22,7 +22,7 @@ To contribute code or documentation to this project, please follow these steps:

5. Submit a pull request.

We review carefully any contribution that we accept, and these reviews may take
We carefully review all contributions that are proposed, and these reviews may take
some time. Please keep in mind there is no guarantee your contribution will be
accepted: we may reject a pull request for any reason, or no reason.

Expand Down
4 changes: 2 additions & 2 deletions INSTALLATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ext install "Slice"
To build and package the extension, you must have [`vsce`](https://code.visualstudio.com/api/working-with-extensions/publishing-extension#vsce) installed:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why don't we just make @vscode/vsce a dev dependency? Do we need it for the build or just for the packaging?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's purely for packaging; after everything has been built, it just zips the files together into a .vsix package. That's all.


The language server is built to be general purpose.
So, in the future we might support other editors, which would have their own packaging tools.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case it doesn't need this install step. You can just run with npx

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh! I didn't know that cool.
Fixed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're going to remove it?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops, I forgot to push my changes ._.


```shell
npm install -g @vscode/vsce
npm install @vscode/vsce
```

Additionally, you need to install the extension's dependencies:
Expand All @@ -30,7 +30,7 @@ npm install
To build and package the extension, run:

```shell
vsce package
npx @vscode/vsce package
```

This generates a `.vsix` package file in the root directory of the project.
Expand Down
60 changes: 43 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,64 @@
# Slice for Visual Studio Code

This language extension adds support for highlighting Slice files within Visual Studio Code.
It supports highlighting the following file types:
This extension provides support for the Slice Interface Definition Language.
InsertCreativityHere marked this conversation as resolved.
Show resolved Hide resolved

## Features

- Syntax highlighting
- Syntax validation
- Error detection & reporting
- 'Go to Definition' jumping
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These two are .slice only however.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mention that in their sub-section later on:
... and is only available for '.slice' files.

If you prefer it, I can find a way to add it to the main list, but I wanted to keep the bullet points short.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's fine.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would just write:

- Go to Definition

No jumping, no quotes.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be clearer to explain in this top section that most features only apply to .slice files.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you push?


### Syntax Highlighting and Validation

This extension supports syntax highlighting and validation for the following Slice file types:

- `.ice` files, which use the [original Slice](https://doc.zeroc.com/ice/latest/the-slice-language) syntax
- `.slice` files, which use the [latest Slice](https://docs.icerpc.dev/slice2) syntax

Additionally, this extension provides a Slice Language Server, for `.slice` files only.
### Error Detection and Reporting

Error checking is triggered every time a Slice file is saved or opened,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this line so short?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know, but I put it all on one line.

and is only available for `.slice` files.

## Configuration

The Slice Language Server can be configured using the following settings:
The Slice language server that ships with this extension can be configured with the following settings:

- `slice.languageServer.enabled`: A boolean indicating whether the server should be enabled. Defaults to `true`.

- `slice.configurations`: An array of configuration sets (independent groups of Slice files). This allows multiple Slice projects to exist within a single repository. Each configuration set supports the following settings:

- `slice.languageServer.enabled`: A boolean indicating whether the Slice Language Server should be enabled. Defaults
to `true`.
- `slice.configurations`: An array of configuration sets. Configuration sets are independently compiled, allowing each
to define its own files and options for compilation.
- **Each configuration set is an object with the following properties:**
- `paths`: An array containing the paths to the target Slice reference files. Also supports directory paths.
- `addWellKnownTypes`: A boolean indicating whether to include the
[IceRpc well-known Slice files](https://github.com/icerpc/icerpc-slice/tree/main/WellKnownTypes) during compilation.
- `paths`: An array of paths to specify which Slice files should be included in this set.
This field is required.

- `addWellKnownTypes`: A boolean indicating whether to include the Slice definitions contained in the [IceRPC Slice](https://github.com/icerpc/icerpc-slice) repository.
These types are commonly used in applications utilizing Slice.
Defaults to `true`.

If you do not specify any configuration sets, the extension will default to using the project's root directory for `paths`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would use the present everywhere. No 'will'.

The extension defaults to ...
The language server only works with .slice files and ignores any ...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fixed the 2nd sentence, but left the 1st sentence as is.

In it, the will feels necessary, because the sentence is talking about a condition being met in the future:
If you do not specify any configuration sets, the extension will default to ...

For example:
If you write bad code, the compiler will give an error vs
If you write bad code, the compiler gives an error.
The 2nd one sounds wrong to me, especially compared to the 1st one.


**Note:** the language server only works with `.slice` files, and will ignore any `.ice` files in your project. The above settings are only meaningful for projects using `.slice` files.

### Example

Below is an example `settings.json` file which configures 2 separate Slice projects:

```json
{
"slice.languageServer.enabled": true,
"slice.configurations": [
{
"paths": [
"path/to/slice/directory",
"path/to/other/slice/file.slice",
"/absolute/path/to/directory"
],
"addWellKnownTypes": true
"path/to/slice/directory"
]
},
{
"addWellKnownTypes": false,
"paths": [
"path/to/specific/file.slice",
"/absolute/path/to/other/slice/files",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer directory over files for a sample directory name.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

]
}
]
}
Expand Down