...
This commit is contained in:
@@ -10,7 +10,7 @@ internal class HoverHandler : HoverHandlerBase
|
||||
{
|
||||
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)
|
||||
{
|
||||
return new TextDocumentAttributes(uri, "nub-lang");
|
||||
return new TextDocumentAttributes(uri, "nublang");
|
||||
}
|
||||
|
||||
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",
|
||||
"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"
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
|
||||
"name": "nub-lang",
|
||||
"name": "nublang",
|
||||
"scopeName": "source.nub",
|
||||
"patterns": [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user