This commit is contained in:
nub31
2025-10-23 10:23:52 +02:00
parent 6fed902025
commit 60dadfd505
7 changed files with 9 additions and 3476 deletions

View File

@@ -10,7 +10,7 @@ internal class HoverHandler : HoverHandlerBase
{
return new HoverRegistrationOptions
{
DocumentSelector = TextDocumentSelector.ForLanguage("nub-lang")
DocumentSelector = TextDocumentSelector.ForLanguage("nublang")
};
}

View File

@@ -10,7 +10,7 @@ internal class TextDocumentSyncHandler(WorkspaceManager workspaceManager) : Text
{
public override TextDocumentAttributes GetTextDocumentAttributes(DocumentUri uri)
{
return new TextDocumentAttributes(uri, "nub-lang");
return new TextDocumentAttributes(uri, "nublang");
}
public override Task<Unit> Handle(DidOpenTextDocumentParams request, CancellationToken cancellationToken)

View File

@@ -1,28 +0,0 @@
import typescriptEslint from "@typescript-eslint/eslint-plugin";
import tsParser from "@typescript-eslint/parser";
export default [{
files: ["**/*.ts"],
}, {
plugins: {
"@typescript-eslint": typescriptEslint,
},
languageOptions: {
parser: tsParser,
ecmaVersion: 2022,
sourceType: "module",
},
rules: {
"@typescript-eslint/naming-convention": ["warn", {
selector: "import",
format: ["camelCase", "PascalCase"],
}],
curly: "warn",
eqeqeq: "warn",
"no-throw-literal": "warn",
semi: "warn",
},
}];

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,7 @@
{
"name": "nub-lang",
"name": "nublang",
"displayName": "Nub Language Support",
"description": "Language server client for nub-lang",
"description": "Language server client for nublang",
"version": "0.0.0",
"publisher": "nub31",
"repository": {
@@ -18,7 +18,7 @@
"contributes": {
"languages": [
{
"id": "nub-lang",
"id": "nublang",
"extensions": [
".nub"
],
@@ -27,7 +27,7 @@
],
"grammars": [
{
"language": "nub-lang",
"language": "nublang",
"scopeName": "source.nub",
"path": "./syntaxes/nub.tmLanguage.json"
}

View File

@@ -4,16 +4,11 @@ import { LanguageClient, TransportKind } from 'vscode-languageclient/node';
let client: LanguageClient;
export function activate(context: ExtensionContext) {
const outputChannel = window.createOutputChannel('My Language Server');
outputChannel.appendLine('Extension activating...');
const serverExecutable = '/home/oliste/repos/nub-lang/compiler/NubLang.LSP/bin/Debug/net9.0/NubLang.LSP';
outputChannel.appendLine(`Server path: ${serverExecutable}`);
client = new LanguageClient(
'nub-lang',
'nub lang',
'nublang',
'nublang client',
{
run: {
command: serverExecutable,

View File

@@ -1,6 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
"name": "nub-lang",
"name": "nublang",
"scopeName": "source.nub",
"patterns": [
{