...
This commit is contained in:
@@ -10,7 +10,7 @@ internal class HoverHandler : HoverHandlerBase
|
|||||||
{
|
{
|
||||||
return new HoverRegistrationOptions
|
return new HoverRegistrationOptions
|
||||||
{
|
{
|
||||||
DocumentSelector = TextDocumentSelector.ForLanguage("nub-lang")
|
DocumentSelector = TextDocumentSelector.ForLanguage("nublang")
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ internal class TextDocumentSyncHandler(WorkspaceManager workspaceManager) : Text
|
|||||||
{
|
{
|
||||||
public override TextDocumentAttributes GetTextDocumentAttributes(DocumentUri uri)
|
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)
|
public override Task<Unit> Handle(DidOpenTextDocumentParams request, CancellationToken cancellationToken)
|
||||||
|
|||||||
@@ -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",
|
|
||||||
},
|
|
||||||
}];
|
|
||||||
3434
vscode-lsp/package-lock.json
generated
3434
vscode-lsp/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "nub-lang",
|
"name": "nublang",
|
||||||
"displayName": "Nub Language Support",
|
"displayName": "Nub Language Support",
|
||||||
"description": "Language server client for nub-lang",
|
"description": "Language server client for nublang",
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"publisher": "nub31",
|
"publisher": "nub31",
|
||||||
"repository": {
|
"repository": {
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
"contributes": {
|
"contributes": {
|
||||||
"languages": [
|
"languages": [
|
||||||
{
|
{
|
||||||
"id": "nub-lang",
|
"id": "nublang",
|
||||||
"extensions": [
|
"extensions": [
|
||||||
".nub"
|
".nub"
|
||||||
],
|
],
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
],
|
],
|
||||||
"grammars": [
|
"grammars": [
|
||||||
{
|
{
|
||||||
"language": "nub-lang",
|
"language": "nublang",
|
||||||
"scopeName": "source.nub",
|
"scopeName": "source.nub",
|
||||||
"path": "./syntaxes/nub.tmLanguage.json"
|
"path": "./syntaxes/nub.tmLanguage.json"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,16 +4,11 @@ import { LanguageClient, TransportKind } from 'vscode-languageclient/node';
|
|||||||
let client: LanguageClient;
|
let client: LanguageClient;
|
||||||
|
|
||||||
export function activate(context: ExtensionContext) {
|
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';
|
const serverExecutable = '/home/oliste/repos/nub-lang/compiler/NubLang.LSP/bin/Debug/net9.0/NubLang.LSP';
|
||||||
|
|
||||||
outputChannel.appendLine(`Server path: ${serverExecutable}`);
|
|
||||||
|
|
||||||
client = new LanguageClient(
|
client = new LanguageClient(
|
||||||
'nub-lang',
|
'nublang',
|
||||||
'nub lang',
|
'nublang client',
|
||||||
{
|
{
|
||||||
run: {
|
run: {
|
||||||
command: serverExecutable,
|
command: serverExecutable,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
|
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
|
||||||
"name": "nub-lang",
|
"name": "nublang",
|
||||||
"scopeName": "source.nub",
|
"scopeName": "source.nub",
|
||||||
"patterns": [
|
"patterns": [
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user