Compare commits
3 Commits
8d0e3d03d5
...
16082752e2
Author | SHA1 | Date | |
---|---|---|---|
16082752e2 | |||
8a71ce3629 | |||
81d418c6d8 |
4
Cargo.lock
generated
4
Cargo.lock
generated
@ -654,7 +654,7 @@ checksum = "53a49587ad06b26609c52e423de037e7f57f20d53535d66e08c695f347df952a"
|
||||
|
||||
[[package]]
|
||||
name = "reid"
|
||||
version = "1.0.0-beta.2"
|
||||
version = "1.0.0-beta.3"
|
||||
dependencies = [
|
||||
"colored",
|
||||
"reid-lib",
|
||||
@ -663,7 +663,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "reid-lib"
|
||||
version = "1.0.0-beta.2"
|
||||
version = "1.0.0-beta.3"
|
||||
dependencies = [
|
||||
"llvm-sys",
|
||||
"thiserror",
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "reid-lib"
|
||||
version = "1.0.0-beta.2"
|
||||
version = "1.0.0-beta.3"
|
||||
edition = "2024"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
1
reid-lsp/.gitignore
vendored
1
reid-lsp/.gitignore
vendored
@ -4,3 +4,4 @@ dist
|
||||
package-lock.json
|
||||
pnpm-lock.yaml
|
||||
tsconfig.tsbuildinfo
|
||||
*.vsix
|
@ -7,5 +7,5 @@ edition = "2024"
|
||||
socket = "0.0.7"
|
||||
tokio = { version = "1.47.0", features = ["full"] }
|
||||
tower-lsp = "0.20.0"
|
||||
reid = { path = "../reid", version = "1.0.0-beta.2", registry="gitea-teascade", features=[] }
|
||||
reid = { path = "../reid", version = "1.0.0-beta.3", registry="gitea-teascade", features=[] }
|
||||
dashmap = "6.1.0"
|
||||
|
@ -1,71 +1 @@
|
||||
# reid-lsp README
|
||||
|
||||
This is the README for your extension "reid-lsp". After writing up a brief description, we recommend including the following sections.
|
||||
|
||||
## Features
|
||||
|
||||
Describe specific features of your extension including screenshots of your extension in action. Image paths are relative to this README file.
|
||||
|
||||
For example if there is an image subfolder under your extension project workspace:
|
||||
|
||||
\!\[feature X\]\(images/feature-x.png\)
|
||||
|
||||
> Tip: Many popular extensions utilize animations. This is an excellent way to show off your extension! We recommend short, focused animations that are easy to follow.
|
||||
|
||||
## Requirements
|
||||
|
||||
If you have any requirements or dependencies, add a section describing those and how to install and configure them.
|
||||
|
||||
## Extension Settings
|
||||
|
||||
Include if your extension adds any VS Code settings through the `contributes.configuration` extension point.
|
||||
|
||||
For example:
|
||||
|
||||
This extension contributes the following settings:
|
||||
|
||||
* `myExtension.enable`: Enable/disable this extension.
|
||||
* `myExtension.thing`: Set to `blah` to do something.
|
||||
|
||||
## Known Issues
|
||||
|
||||
Calling out known issues can help limit users opening duplicate issues against your extension.
|
||||
|
||||
## Release Notes
|
||||
|
||||
Users appreciate release notes as you update your extension.
|
||||
|
||||
### 1.0.0
|
||||
|
||||
Initial release of ...
|
||||
|
||||
### 1.0.1
|
||||
|
||||
Fixed issue #.
|
||||
|
||||
### 1.1.0
|
||||
|
||||
Added features X, Y, and Z.
|
||||
|
||||
---
|
||||
|
||||
## Following extension guidelines
|
||||
|
||||
Ensure that you've read through the extensions guidelines and follow the best practices for creating your extension.
|
||||
|
||||
* [Extension Guidelines](https://code.visualstudio.com/api/references/extension-guidelines)
|
||||
|
||||
## Working with Markdown
|
||||
|
||||
You can author your README using Visual Studio Code. Here are some useful editor keyboard shortcuts:
|
||||
|
||||
* Split the editor (`Cmd+\` on macOS or `Ctrl+\` on Windows and Linux).
|
||||
* Toggle preview (`Shift+Cmd+V` on macOS or `Shift+Ctrl+V` on Windows and Linux).
|
||||
* Press `Ctrl+Space` (Windows, Linux, macOS) to see a list of Markdown snippets.
|
||||
|
||||
## For more information
|
||||
|
||||
* [Visual Studio Code's Markdown Support](http://code.visualstudio.com/docs/languages/markdown)
|
||||
* [Markdown Syntax Reference](https://help.github.com/articles/markdown-basics/)
|
||||
|
||||
**Enjoy!**
|
||||
# Reid Language Server
|
@ -18,12 +18,20 @@ import {
|
||||
let client: LanguageClient;
|
||||
|
||||
export function activate(context: ExtensionContext) {
|
||||
const traceOutputChannel = window.createOutputChannel("Reid Language Server trace");
|
||||
const command = process.env.SERVER_PATH || "reid-language-server";
|
||||
|
||||
const configuration = workspace.getConfiguration('reid-language-server');
|
||||
let server_path: string = process.env.SERVER_PATH ?? configuration.get("language-server-path") ?? 'reid-language-server';
|
||||
const regex = /\$(\w+)/;
|
||||
while (regex.test(server_path)) {
|
||||
let envVar = regex.exec(server_path)?.[1];
|
||||
const envVal = envVar ? process.env[envVar] : undefined;
|
||||
if (envVar === undefined || envVal === undefined) {
|
||||
console.error(`No such environment variables as ${envVar}`);
|
||||
}
|
||||
server_path = server_path.replaceAll(`$${envVar}`, envVal ?? '');
|
||||
}
|
||||
|
||||
const run: Executable = {
|
||||
command,
|
||||
command: server_path,
|
||||
options: {
|
||||
env: {
|
||||
...process.env,
|
||||
@ -49,13 +57,15 @@ export function activate(context: ExtensionContext) {
|
||||
|
||||
// Create the language client and start the client.
|
||||
client = new LanguageClient(
|
||||
'reid-lsp',
|
||||
'reid-language-server',
|
||||
'Reid Language Server',
|
||||
serverOptions,
|
||||
clientOptions
|
||||
);
|
||||
client.info(JSON.stringify(server_path));
|
||||
|
||||
client.info(`Loaded Reid Language Server from ${server_path}`);
|
||||
|
||||
client.info("hello");
|
||||
|
||||
workspace.onDidOpenTextDocument((e) => {
|
||||
});
|
||||
|
@ -1,8 +1,11 @@
|
||||
{
|
||||
"name": "reid-lsp",
|
||||
"name": "reid-language-server",
|
||||
"displayName": "Reid Language Server",
|
||||
"description": "Language Server Extension for Reid",
|
||||
"version": "0.0.1",
|
||||
"version": "0.1.0",
|
||||
"repository": {
|
||||
"url": "https://git.teascade.net/teascade"
|
||||
},
|
||||
"engines": {
|
||||
"vscode": "^1.102.0"
|
||||
},
|
||||
@ -19,6 +22,9 @@
|
||||
"id": "reid",
|
||||
"extensions": [
|
||||
".reid"
|
||||
],
|
||||
"aliases": [
|
||||
"Reid"
|
||||
]
|
||||
}
|
||||
],
|
||||
@ -26,21 +32,11 @@
|
||||
"type": "object",
|
||||
"title": "reid-language-server",
|
||||
"properties": {
|
||||
"nrs-language-server.trace.server": {
|
||||
"reid-language-server.language-server-path": {
|
||||
"type": "string",
|
||||
"scope": "window",
|
||||
"enum": [
|
||||
"off",
|
||||
"messages",
|
||||
"verbose"
|
||||
],
|
||||
"enumDescriptions": [
|
||||
"No traces",
|
||||
"Error only",
|
||||
"Full log"
|
||||
],
|
||||
"default": "off",
|
||||
"description": "Traces the communication between VS Code and the language server."
|
||||
"default": "$HOME/.cargo/bin/reid-lsp",
|
||||
"description": "Path to the Reid Language Server executable"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "reid"
|
||||
version = "1.0.0-beta.2"
|
||||
version = "1.0.0-beta.3"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
@ -16,6 +16,6 @@ context_debug = []
|
||||
[dependencies]
|
||||
## Make it easier to generate errors
|
||||
thiserror = "1.0.44"
|
||||
reid-lib = { path = "../reid-llvm-lib", version = "1.0.0-beta.1", registry="gitea-teascade" }
|
||||
reid-lib = { path = "../reid-llvm-lib", version = "1.0.0-beta.3", registry="gitea-teascade" }
|
||||
|
||||
colored = {version = "3.0.0", optional = true}
|
Loading…
Reference in New Issue
Block a user