Skip to content

Commit 0aa852d

Browse files
committed
bug fixes
1 parent 2ccab08 commit 0aa852d

23 files changed

+710
-573
lines changed

.vscode/extensions.json

-7
This file was deleted.

.vscodeignore

+2-7
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
1-
.vscode/**
1+
.vscode/**/*
22
**/*.ts
33
**/*.map
44
.gitignore
55
**/tsconfig.json
66
**/tsconfig.base.json
77
contributing.md
88
.travis.yml
9-
client/node_modules/**
10-
!client/node_modules/vscode-jsonrpc/**
11-
!client/node_modules/vscode-languageclient/**
12-
!client/node_modules/vscode-languageserver-protocol/**
13-
!client/node_modules/vscode-languageserver-types/**
14-
!client/node_modules/semver/**
9+

LICENSE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) Microsoft
3+
Copyright (c) Simon Wälti
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,11 @@ Fanuc Macro Executor syntax highlighting and project building
77
## Features
88

99
* Compiling and linking of fanuc macro executor projects.
10-
* Syntax highlighting
1110
* Problem matcher
11+
* Syntax highlighting
12+
* Syntax validation
13+
* Symbol provider
14+
1215

1316

1417
### Compile

client/package-lock.json

+13
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
"vscode": "^1.43.0"
1414
},
1515
"dependencies": {
16-
"vscode-languageclient": "^6.1.3"
16+
"vscode-languageclient": "^6.1.3",
17+
"rxjs": "^6.5.2"
1718
},
1819
"devDependencies": {
1920
"@types/vscode": "1.43.0",

client/src/extension.ts

+2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ let client: LanguageClient;
2020

2121
export function activate(context: ExtensionContext) {
2222

23+
console.log('adsgsdg');
24+
2325
// The server is implemented in node
2426
let serverModule = context.asAbsolutePath(
2527
path.join('server', 'out', 'server.js')

package-lock.json

+5-17
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+9-24
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "macro-executor",
33
"displayName": "Macro Executor Language",
44
"description": "Fanuc Macro-Executor Programming Language",
5-
"version": "0.0.5",
5+
"version": "0.1.0",
66
"author": "iSorp",
77
"publisher": "iSorp",
88
"license": "MIT",
@@ -113,23 +113,6 @@
113113
"type": "object",
114114
"title": "MacroExecutor Configuration",
115115
"properties": {
116-
"macroLanguageServer.maxNumberOfProblems": {
117-
"scope": "resource",
118-
"type": "number",
119-
"default": 100,
120-
"description": "Controls the maximum number of problems produced by the server."
121-
},
122-
"macroLanguageServer.trace.server": {
123-
"scope": "window",
124-
"type": "string",
125-
"enum": [
126-
"off",
127-
"messages",
128-
"verbose"
129-
],
130-
"default": "off",
131-
"description": "Traces the communication between VS Code and the language server."
132-
},
133116
"macroLanguageServer.validate": {
134117
"scope": "resource",
135118
"type": "boolean",
@@ -199,11 +182,15 @@
199182
]
200183
},
201184
"scripts": {
202-
"vscode:prepublish": "cd client && npm run update-vscode && cd .. && npm run compile",
203185
"compile": "tsc -b",
186+
"compile:client": "tsc -b ./client/tsconfig.json",
187+
"compile:server": "tsc -b ./server/tsconfig.json",
204188
"watch": "tsc -b -w",
205-
"postinstall": "cd client && npm install && cd ../server && npm install && cd ..",
206-
"test": "sh ./scripts/e2e.sh"
189+
"lint": "npm run lint:client && npm run lint:server",
190+
"lint:client": "eslint --config ./client/.eslintrc.json ./client/src/*.ts",
191+
"lint:server": "eslint --config ./server/.eslintrc.json ./server/src/*.ts",
192+
"clean": "rimraf client/out && rimraf server/out",
193+
"postinstall": "cd client && npm install && cd ../server && npm install && cd .."
207194
},
208195
"devDependencies": {
209196
"@types/glob": "^7.1.1",
@@ -212,8 +199,6 @@
212199
"@typescript-eslint/parser": "^2.3.0",
213200
"mocha": "^7.0.1",
214201
"typescript": "^3.8.3",
215-
"eslint": "^6.4.0",
216-
"vscode-nls": "^4.1.1",
217-
"vscode-uri": "^2.1.1"
202+
"eslint": "^6.4.0"
218203
}
219204
}

server/package-lock.json

+87
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

server/package.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@
1414
},
1515
"dependencies": {
1616
"vscode-languageserver": "^6.1.1",
17-
"vscode-languageserver-textdocument": "^1.0.1"
17+
"vscode-languageserver-textdocument": "^1.0.1",
18+
"vscode-nls": "^4.1.1",
19+
"vscode-uri": "^2.1.1",
20+
"glob": "^7.1.6"
1821
},
1922
"scripts": {}
2023
}

server/src/macroLanguageService/macroLanguageService.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export function getMacroLanguageService(options?: LanguageServiceOptions): Langu
4747

4848
return createFacade(
4949
new Parser(options && options.fileProvider),
50-
new MacroHover(options && options.clientCapabilities, options && options.fileProvider),
50+
new MacroHover(options && options.fileProvider),
5151
new MacroNavigation(options && options.fileProvider),
5252
new MacroValidation(options && options.fileProvider)
5353
);

server/src/macroLanguageService/macroLanguageTypes.ts

+1-58
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export * from 'vscode-languageserver-types';
1313

1414

1515
export interface LanguageSettings {
16-
lint?: boolean;
16+
validate?: boolean;
1717
}
1818

1919
export interface DocumentContext {
@@ -24,66 +24,9 @@ export interface FindDocumentLinks {
2424
resolveReference(ref: string, base?: string): string;
2525
}
2626

27-
/**
28-
* Describes what LSP capabilities the client supports
29-
*/
30-
export interface ClientCapabilities {
31-
/**
32-
* The text document client capabilities
33-
*/
34-
textDocument?: {
35-
/**
36-
* Capabilities specific to completions.
37-
*/
38-
completion?: {
39-
/**
40-
* The client supports the following `CompletionItem` specific
41-
* capabilities.
42-
*/
43-
completionItem?: {
44-
/**
45-
* Client supports the follow content formats for the documentation
46-
* property. The order describes the preferred format of the client.
47-
*/
48-
documentationFormat?: MarkupKind[];
49-
};
50-
51-
};
52-
/**
53-
* Capabilities specific to hovers.
54-
*/
55-
hover?: {
56-
/**
57-
* Client supports the follow content formats for the content
58-
* property. The order describes the preferred format of the client.
59-
*/
60-
contentFormat?: MarkupKind[];
61-
};
62-
};
63-
}
64-
65-
export namespace ClientCapabilities {
66-
export const LATEST: ClientCapabilities = {
67-
textDocument: {
68-
completion: {
69-
completionItem: {
70-
documentationFormat: [MarkupKind.Markdown, MarkupKind.PlainText]
71-
}
72-
},
73-
hover: {
74-
contentFormat: [MarkupKind.Markdown, MarkupKind.PlainText]
75-
}
76-
}
77-
};
78-
}
79-
8027
export interface LanguageServiceOptions {
8128

8229
fileProvider?: MacroFileProvider;
83-
/**
84-
* Describes the LSP capabilities the client supports.
85-
*/
86-
clientCapabilities?: ClientCapabilities;
8730
}
8831

8932
export interface MacroFileType {

0 commit comments

Comments
 (0)