Skip to content

Commit 7838fb7

Browse files
authored
Merge pull request #101 from Frederisk/lsp
Add Add the support of WikiParser Language Server
2 parents 8a602fb + b54765d commit 7838fb7

20 files changed

+1015
-929
lines changed

.vscode/extensions.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55
{
6-
// See http://go.microsoft.com/fwlink/?LinkId=827846
7-
// for the documentation about the extensions.json format
8-
"recommendations": [
9-
"dbaeumer.vscode-eslint",
10-
// "pedro-w.tmlanguage",
11-
"redhat.vscode-yaml",
12-
"gamunu.vscode-yarn",
13-
"editorconfig.editorconfig"
14-
]
6+
// See http://go.microsoft.com/fwlink/?LinkId=827846
7+
// for the documentation about the extensions.json format
8+
"recommendations": [
9+
"dbaeumer.vscode-eslint",
10+
// "pedro-w.tmlanguage",
11+
"redhat.vscode-yaml",
12+
"gamunu.vscode-yarn",
13+
"editorconfig.editorconfig"
14+
]
1515
}

.vscode/launch.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
"request": "launch",
1616
"runtimeExecutable": "${execPath}",
1717
"args": [
18-
"--disable-extensions",
1918
"--extensionDevelopmentPath=${workspaceFolder}"
2019
],
2120
"outFiles": [
@@ -24,11 +23,12 @@
2423
"preLaunchTask": "npm: pretest"
2524
},
2625
{
27-
"name": "Launch Extension with Other Extensions",
26+
"name": "Launch Extension without Other Extensions",
2827
"type": "extensionHost",
2928
"request": "launch",
3029
"runtimeExecutable": "${execPath}",
3130
"args": [
31+
"--disable-extensions",
3232
"--extensionDevelopmentPath=${workspaceFolder}"
3333
],
3434
"outFiles": [
@@ -71,7 +71,7 @@
7171
"request": "launch",
7272
"args": [
7373
"--extensionDevelopmentPath=${workspaceFolder}",
74-
"--disable-extensions",
74+
// "--disable-extensions",
7575
"--extensionDevelopmentKind=web"
7676
],
7777
"outFiles": [

.vscode/settings.json

Lines changed: 42 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -4,44 +4,46 @@
44
*--------------------------------------------------------------------------------------------*/
55
// Place your settings in this file to overwrite default and user settings.
66
{
7-
"files.exclude": {
8-
"out": false,
9-
"dist":false,
10-
"**/.classpath": false,
11-
"**/.project": false,
12-
"**/.settings": false,
13-
"**/.factorypath": false
14-
},
15-
"search.exclude": {
16-
"**/node_modules": true,
17-
"out": true, // set this to false to include "out" folder in search results
18-
"dist": true,
19-
".vscode-test": true,
20-
".vscode-test-web": true
21-
},
22-
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
23-
"typescript.tsc.autoDetect": "off",
24-
"typescript.tsdk": "./node_modules/typescript/lib",
25-
"cmake.configureOnOpen": false,
26-
"cSpell.words": [
27-
"bibtex",
28-
"caltaojihun",
29-
"eqeqeq",
30-
"luxon",
31-
"mimetypes",
32-
"mwbot",
33-
"Scribunto",
34-
"syntaxhighlight",
35-
"uncast",
36-
"vsix",
37-
"wikitable",
38-
"wikixml",
39-
"Xvfb"
40-
],
41-
"files.associations": {
42-
"*.tmLanguage.json": "json-tmlanguage",
43-
"*.tmLanguage.yaml": "yaml-tmlanguage"
44-
},
45-
"jshint.packageManager": "yarn",
46-
"eslint.packageManager": "yarn",
7+
"files.exclude": {
8+
"out": false,
9+
"dist": false,
10+
"**/.classpath": false,
11+
"**/.project": false,
12+
"**/.settings": false,
13+
"**/.factorypath": false
14+
},
15+
"search.exclude": {
16+
"**/node_modules": true,
17+
"out": true, // set this to false to include "out" folder in search results
18+
"dist": true,
19+
".vscode-test": true,
20+
".vscode-test-web": true
21+
},
22+
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
23+
"typescript.tsc.autoDetect": "off",
24+
"typescript.tsdk": "./node_modules/typescript/lib",
25+
"cmake.configureOnOpen": false,
26+
"cSpell.words": [
27+
"bibtex",
28+
"caltaojihun",
29+
"eqeqeq",
30+
"luxon",
31+
"mimetypes",
32+
"mwbot",
33+
"parsoid",
34+
"Scribunto",
35+
"syntaxhighlight",
36+
"uncast",
37+
"vsix",
38+
"wikiparser",
39+
"wikitable",
40+
"wikixml",
41+
"Xvfb"
42+
],
43+
"files.associations": {
44+
"*.tmLanguage.json": "json-tmlanguage",
45+
"*.tmLanguage.yaml": "yaml-tmlanguage"
46+
},
47+
"jshint.packageManager": "yarn",
48+
"eslint.packageManager": "yarn",
4749
}

.vscode/tasks.json

Lines changed: 62 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -5,66 +5,66 @@
55
// See https://go.microsoft.com/fwlink/?LinkId=733558
66
// for the documentation about the tasks.json format
77
{
8-
"version": "2.0.0",
9-
"tasks": [
10-
{
11-
"type": "npm",
12-
"script": "watch",
13-
"label": "webpack: watch",
14-
"detail": "convert & webpack --watch",
15-
"isBackground": true,
16-
"presentation": {
17-
"echo": true,
18-
"reveal": "never",
19-
"focus": false,
20-
"panel": "shared",
21-
"showReuseMessage": true,
22-
"clear": false
23-
},
24-
"group": {
25-
"kind": "build",
26-
"isDefault": true
27-
}
28-
},
29-
{
30-
"type": "npm",
31-
"script": "package",
32-
"label": "vsce: package",
33-
"detail": "vsce package --yarn",
34-
"presentation": {
35-
"echo": true,
36-
"reveal": "always",
37-
"focus": false,
38-
"panel": "shared",
39-
"showReuseMessage": true,
40-
"clear": false
41-
},
42-
"group": "build"
43-
},
44-
{
45-
"type": "npm",
46-
"script": "test",
47-
"label": "vscode extension: test",
48-
"detail": "tsc & lint & run test",
49-
"presentation": {
50-
"echo": true,
51-
"reveal": "always",
52-
"focus": false,
53-
"panel": "shared",
54-
"showReuseMessage": true,
55-
"clear": false
56-
},
57-
"group": {
58-
"kind": "test",
59-
"isDefault": true
60-
}
61-
},
62-
{
63-
"type": "npm",
64-
"script": "lint",
65-
"label": "npm: eslint",
66-
"problemMatcher": "$eslint-stylish",
67-
"detail": "eslint"
68-
}
69-
]
8+
"version": "2.0.0",
9+
"tasks": [
10+
{
11+
"type": "npm",
12+
"script": "watch",
13+
"label": "webpack: watch",
14+
"detail": "convert & webpack --watch",
15+
"isBackground": true,
16+
"presentation": {
17+
"echo": true,
18+
"reveal": "never",
19+
"focus": false,
20+
"panel": "shared",
21+
"showReuseMessage": true,
22+
"clear": false
23+
},
24+
"group": {
25+
"kind": "build",
26+
"isDefault": true
27+
}
28+
},
29+
{
30+
"type": "npm",
31+
"script": "package",
32+
"label": "vsce: package",
33+
"detail": "vsce package --yarn",
34+
"presentation": {
35+
"echo": true,
36+
"reveal": "always",
37+
"focus": false,
38+
"panel": "shared",
39+
"showReuseMessage": true,
40+
"clear": false
41+
},
42+
"group": "build"
43+
},
44+
{
45+
"type": "npm",
46+
"script": "test",
47+
"label": "vscode extension: test",
48+
"detail": "tsc & lint & run test",
49+
"presentation": {
50+
"echo": true,
51+
"reveal": "always",
52+
"focus": false,
53+
"panel": "shared",
54+
"showReuseMessage": true,
55+
"clear": false
56+
},
57+
"group": {
58+
"kind": "test",
59+
"isDefault": true
60+
}
61+
},
62+
{
63+
"type": "npm",
64+
"script": "lint",
65+
"label": "npm: eslint",
66+
"problemMatcher": "$eslint-stylish",
67+
"detail": "eslint"
68+
}
69+
]
7070
}

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to the "Wikitext" extension will be documented in this file.
55

66
(The version marked with an asterisk(\*) means that the version has been adjusted internally and has not been released.)<!-- http://keepachangelog.com/ -->
77

8+
## [4.0.0] - 2024-12-01
9+
10+
### Added
11+
12+
- Add the support of [WikiParser Language Server](https://github.com/bhsd-harry/vscode-extension-wikiparser).
13+
814
## [3.8.3] - 2024-11-14
915

1016
### Changed

README.md

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,24 @@ Of course, the development of this extension is short, and there may be some err
1919

2020
If you get help with this project, give this project a star or recommend it to others, thanks!😸
2121

22-
## Enhancement Tool: [Wikitext-Extension-Gadget](https://github.com/Frederisk/Wikitext-Extension-Gadget)
22+
## Enhancement Tools
23+
24+
### WikiParser Language Server
25+
26+
- [WikiParser Language Server](https://github.com/bhsd-harry/vscode-extension-wikiparser) is a powerful tool that brings you better code folding, syntax error prompts, file outline and other features!
27+
28+
#### WikiParser Usage
29+
30+
- Install WikiParser Language Server through the extensions store (such as [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=Bhsd.vscode-extension-wikiparser)) or [download the vsix file yourself](https://github.com/bhsd-harry/vscode-extension-wikiparser).
31+
- Find `wikitext.wikiparser.enable` in settings and enable it.
32+
- Press `F1` and execute the command `wikitext.restartLsp` or restart VSCode to apply changes.
33+
34+
#### WikiParser Previews
35+
36+
- <img alt="" src="https://github.com/user-attachments/assets/449065c2-fddc-4636-8ee1-d897afc5afe7" width="768">
37+
- <img alt="" src="https://github.com/user-attachments/assets/5705d3b8-b77b-4142-87c9-3ff7c35c7bbe" width="768">
38+
39+
### Wikitext Extension Gadget
2340

2441
- Now you can add [Wikitext Extension Gadget](https://github.com/Frederisk/Wikitext-Extension-Gadget) as a user gadget on your wiki site. And you will get a button to open VSCode directly in your browser to edit the page!
2542

@@ -78,14 +95,14 @@ Generally, make sure that your VSCode is always the latest version.
7895
Firstly, clone this repository and change directory to the repository, then install VS Code Extension Manager and other packages:
7996

8097
```bash
81-
npm install -g yarn vsce # VS Code Extension Manager
82-
yarn install # Install devDependencies
98+
npm install -g yarn # install yarn classic
99+
yarn install # Install all dependencies
83100
```
84101

85102
Package this project and you will get a `.vsix` file:
86103

87104
```bash
88-
vsce package --yarn # Package Extension with yarn
105+
yarn run package
89106
```
90107

91108
This is it!

eslint.config.mjs

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,27 @@ const compat = new FlatCompat({
1313
allConfig: js.configs.all
1414
});
1515

16-
export default [{
17-
files: ['**/*.ts'],
18-
ignores: ["**/out", "**/dist", "**/*.d.ts", "**/webpack.config.js", '**/eslint.config.mjs'],
19-
}, ...compat.extends("eslint:recommended", "plugin:@typescript-eslint/recommended"), {
20-
plugins: {
21-
"@typescript-eslint": typescriptEslint,
22-
},
23-
24-
languageOptions: {
25-
parser: tsParser,
26-
ecmaVersion: 5,
27-
sourceType: "module"
28-
},
16+
export default [
17+
// ...compat.extends("eslint:recommended", "plugin:@typescript-eslint/recommended"),
18+
{
19+
files: ['**/*.ts'],
20+
ignores: ["**/out", "**/dist", "**/*.d.ts", "**/webpack.config.js", '**/eslint.config.mjs'],
21+
plugins: {
22+
"@typescript-eslint": typescriptEslint,
23+
},
24+
languageOptions: {
25+
parser: tsParser,
26+
ecmaVersion: 5,
27+
sourceType: "module"
28+
},
29+
rules: {
30+
"@typescript-eslint/naming-convention": "warn",
31+
semi: "warn",
32+
curly: "warn",
33+
eqeqeq: "warn",
34+
"no-throw-literal": "warn",
35+
"@typescript-eslint/no-explicit-any": "warn",
36+
},
2937

30-
rules: {
31-
"@typescript-eslint/naming-convention": "warn",
32-
semi: "warn",
33-
curly: "warn",
34-
eqeqeq: "warn",
35-
"no-throw-literal": "warn",
36-
"@typescript-eslint/no-explicit-any" : "warn",
3738
},
38-
}];
39+
];

0 commit comments

Comments
 (0)