Skip to content

Commit

Permalink
Update README and package names
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoroth committed Oct 2, 2023
1 parent 6ecb54d commit b13b5fd
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 22 deletions.
40 changes: 27 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,47 @@
# Stimulus Intellisense
# Stimulus LSP

Intelligent Stimulus JS tooling for Visual Studio Code

Heavily documented sample code for https://code.visualstudio.com/api/language-extensions/language-server-extension-guide
Intelligent Stimulus tooling for Visual Studio Code

## Functionality

This Language Server works for plain text file. It has the following language features:
- Completions
- Diagnostics regenerated on each file change or configuration change
This Language Server works for HTML and ERB files. It has the following language features:

### Completions

* Data Attributes
* Completions for controller identifiers
* Completions for controller actions
* Completions for controller targets
* Completions for controller values
* Completions for controller classes

### Diagnostics

* Missing controllers (`stimulus.controller.invalid`)
* Missing controller actions (`stimulus.action.invalid`)
* Missing controller targets (`stimulus.controller.target.missing`)
* Missing controller values (`stimulus.controller.value.missing`)
* Invalid action descriptions (`stimulus.action.invalid`)
* Controller values type mismatches (`stimulus.controller.value.type_mismatch`)

### Quick-Fixes

It also includes an End-to-End test.
* Create unknown controllers (`stimulus.controller.create`)

## 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 // Language Server
└── src
└── server.ts // Language Server entry point
```

## Running the Sample
## Running the extension locally

- Run `yarn install` in this folder. This installs all necessary npm modules in both the client and server folder
- Open VS Code on this folder.
Expand All @@ -35,6 +50,5 @@ It also includes an End-to-End test.
- Select `Launch Client` from the drop down.
- Run the launch config.
- If you want to debug the server as well use the launch configuration `Attach to Server`
- In the [Extension Development Host] instance of VSCode, open a document in 'plain text' language mode.
- Type `j` or `t` to see `Javascript` and `TypeScript` completion.
- Enter text content such as `AAA aaa BBB`. The extension will emit diagnostics for all words in all-uppercase.
- In the [Extension Development Host] instance of VSCode, open a HTML file.
- Type `<div data-controller="|">`, place your cursor where the `|` is, hit Ctrl+Space and you should see completions.
6 changes: 3 additions & 3 deletions client/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "stimulus-intellisense-client",
"description": "Intelligent Stimulus JS tooling for Visual Studio Code",
"name": "vscode-stimulus",
"description": "Intelligent Stimulus tooling for Visual Studio Code",
"author": "Marco Roth",
"license": "MIT",
"version": "0.1.0",
"publisher": "Marco Roth",
"repository": {
"type": "git",
"url": "https://github.com/marcoroth/stimulus-intellisense"
"url": "https://github.com/marcoroth/stimulus-lsp"
},
"engines": {
"vscode": "^1.52.0"
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "stimulus-intellisense",
"name": "stimulus-lsp",
"displayName": "Stimulus LSP",
"description": "Intelligent Stimulus JS tooling for Visual Studio Code",
"description": "Intelligent Stimulus tooling",
"license": "MIT",
"pricing": "Free",
"version": "0.1.0",
Expand All @@ -23,7 +23,7 @@
"sponsor": {
"url": "http://github.com/sponsors/marcoroth"
},
"repository": "https://github.com/marcoroth/stimulus-intellisense",
"repository": "https://github.com/marcoroth/stimulus-lsp",
"engines": {
"vscode": "^1.43.0"
},
Expand Down
6 changes: 3 additions & 3 deletions server/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "stimulus-intellisense-server",
"description": "Intelligent Stimulus JS tooling for Visual Studio Code",
"name": "stimulus-language-server",
"description": "Intelligent Stimulus tooling",
"version": "0.1.0",
"author": "Marco Roth",
"license": "MIT",
"engines": {
"node": "*"
},
"repository": "https://github.com/marcoroth/stimulus-intellisense",
"repository": "https://github.com/marcoroth/stimulus-lsp",
"scripts": {},
"dependencies": {
"@hotwired/stimulus": "https://github.com/hotwired/dev-builds/archive/refs/tags/@hotwired/stimulus/8cbca6d.tar.gz",
Expand Down

0 comments on commit b13b5fd

Please sign in to comment.