[fix] typescript
This commit is contained in:
parent
a0b3d96f38
commit
b3f47dc553
@ -1,4 +1,4 @@
|
||||
Detailed release notes are available [here](https://github.com/DotJoshJohnson/vscode-xml/releases).
|
||||
Detailed release notes are available [here](https://git.quodatum.duckdns.org/apb/vscode-basex/releases).
|
||||
|
||||
0.0.27 doc format
|
||||
0.0.4 [add] treat schematron (.sch) as XML
|
||||
* 0.0.54
|
||||
* 0.0.52 typescript fixes
|
27
README.md
27
README.md
@ -6,22 +6,31 @@ This extension adds features to support BaseX development on VSCode.
|
||||
* XQuery code format
|
||||
|
||||
## Features
|
||||
* [XML Formatting](https://github.com/DotJoshJohnson/vscode-xml/wiki/xml-formatting)
|
||||
* [XML Tree View](https://github.com/DotJoshJohnson/vscode-xml/wiki/xml-tree-view)
|
||||
* [XPath Evaluation](https://github.com/DotJoshJohnson/vscode-xml/wiki/xpath-evaluation)
|
||||
* [XQuery Linting](https://github.com/DotJoshJohnson/vscode-xml/wiki/xquery-linting)
|
||||
* [XQuery Execution](https://github.com/DotJoshJohnson/vscode-xml/wiki/xquery-script-execution)
|
||||
* [XQuery Code Completion](https://github.com/DotJoshJohnson/vscode-xml/wiki/xquery-code-completion)
|
||||
* [XML Formatting](https://git.quodatum.duckdns.org/apb/vscode-basex/wiki/xml-formatting)
|
||||
* [XML Tree View](https://git.quodatum.duckdns.org/apb/vscode-basex/wiki/xml-tree-view)
|
||||
* [XPath Evaluation](https://git.quodatum.duckdns.org/apb/vscode-basex/wiki/xpath-evaluation)
|
||||
* [XQuery Linting](https://git.quodatum.duckdns.org/apb/vscode-basex/wiki/xquery-linting)
|
||||
* [XQuery Execution](https://git.quodatum.duckdns.org/apb/vscode-basex/wiki/xquery-script-execution)
|
||||
* [XQuery Code Completion](https://git.quodatum.duckdns.org/apb/vscode-basex/wiki/xquery-code-completion)
|
||||
|
||||
## Requirements
|
||||
* VS Code `1.63.0` or higher
|
||||
|
||||
## Release Notes
|
||||
Detailed release notes are available [here](https://github.com/DotJoshJohnson/vscode-xml/releases).
|
||||
Detailed release notes are available [here](https://git.quodatum.duckdns.org/apb/vscode-basex/releases).
|
||||
|
||||
## Issues
|
||||
Run into a bug? Report it [here](https://github.com/DotJoshJohnson/vscode-xml/issues).
|
||||
Run into a bug? Report it [here](https://git.quodatum.duckdns.org/apb/vscode-basex/issues).
|
||||
## build
|
||||
|
||||
```
|
||||
npm install
|
||||
npm install -g typescript #maybe
|
||||
npm install --global vsce
|
||||
#
|
||||
npm run compile
|
||||
vsce package
|
||||
```
|
||||
## Icon Credits
|
||||
Icons used in the XML Tree View are used under the Creative Commons 3.0 BY license.
|
||||
* "Code" icon by Dave Gandy from www.flaticon.com
|
||||
@ -29,4 +38,4 @@ Icons used in the XML Tree View are used under the Creative Commons 3.0 BY licen
|
||||
|
||||
## Inspiration
|
||||
|
||||
This is a fork of [DotJoshJohnson/vscode-xml](https://github.com/DotJoshJohnson/vscode-xml). DotJoshJohnson did the intial work, but I want to go in a different direction.
|
||||
This is built on a fork of [DotJoshJohnson/vscode-xml](https://github.com/DotJoshJohnson/vscode-xml).
|
8308
package-lock.json
generated
8308
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
21
package.json
21
package.json
@ -81,7 +81,6 @@
|
||||
{
|
||||
"id": "xmltree",
|
||||
"title": "XML tree view ",
|
||||
|
||||
"properties": {
|
||||
"basexTools.xmlTree.enableTreeView": {
|
||||
"type": "boolean",
|
||||
@ -106,7 +105,7 @@
|
||||
{
|
||||
"id": "xpath",
|
||||
"title": "XPath ",
|
||||
"properties":{
|
||||
"properties": {
|
||||
"basexTools.xpath.ignoreDefaultNamespace": {
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
@ -119,11 +118,12 @@
|
||||
"description": "Remember the last XPath query used.",
|
||||
"scope": "window"
|
||||
}
|
||||
}
|
||||
},{
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "xquery",
|
||||
"title": "XQuery ",
|
||||
"properties":{
|
||||
"properties": {
|
||||
"basexTools.xquery.executionArguments": {
|
||||
"type": "array",
|
||||
"default": [
|
||||
@ -156,8 +156,8 @@
|
||||
"scope": "window"
|
||||
}
|
||||
}
|
||||
|
||||
},{
|
||||
},
|
||||
{
|
||||
"title": "BaseX Tools ",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@ -167,7 +167,6 @@
|
||||
"description": "Enforces a space before the forward slash at the end of a self-closing XML tag.",
|
||||
"scope": "resource"
|
||||
},
|
||||
|
||||
"basexTools.removeCommentsOnMinify": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
@ -196,7 +195,7 @@
|
||||
"description": "Supported XML Formatters: classic",
|
||||
"scope": "window"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"grammars": [
|
||||
@ -314,11 +313,11 @@
|
||||
"eslint": "^8.10.0",
|
||||
"glob": "^7.2.0",
|
||||
"mocha": "^9.2.1",
|
||||
"typescript": "^4.6.2"
|
||||
"typescript": "^4.7.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"@quodatum/xqlint": "^0.0.11",
|
||||
"@xmldom/xmldom": "^0.8.1",
|
||||
"xpath": "0.0.32"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -13,6 +13,15 @@ function makeSymbol(name: string, description: string, icon: SymbolKind, pos: an
|
||||
const selrange = new Range(spos, spos);
|
||||
return new DocumentSymbol(name, description, icon, fullrange, selrange);
|
||||
}
|
||||
export type VarTypes = {
|
||||
name: string;
|
||||
pos: any;
|
||||
};
|
||||
export type FunTypes = {
|
||||
name: string;
|
||||
params: any; //@todo
|
||||
pos: boolean;
|
||||
};
|
||||
|
||||
export class Symbols implements DocumentSymbolProvider {
|
||||
provideDocumentSymbols = async (
|
||||
@ -36,17 +45,17 @@ export class Symbols implements DocumentSymbolProvider {
|
||||
// pos: pos,
|
||||
// qname: qname,
|
||||
// annotations: {}
|
||||
xqdoc.variables.forEach(v => {
|
||||
xqdoc.variables.forEach(function (v: VarTypes): void {
|
||||
const name = v.name;
|
||||
const info = makeSymbol(name, "", SymbolKind.Variable, v.pos)
|
||||
const info = makeSymbol(name, "", SymbolKind.Variable, v.pos);
|
||||
vars.children.push(info);
|
||||
});
|
||||
|
||||
const funs=makeSymbol("Variables", "", SymbolKind.Function, prolog)
|
||||
funs.children=[]
|
||||
xqdoc.functions.forEach(v => {
|
||||
const name = v.name +"#" + v.params.length;
|
||||
const info = makeSymbol(name, "", SymbolKind.Function, v.pos)
|
||||
xqdoc.functions.forEach(function (f: FunTypes) {
|
||||
const name = f.name + "#" + f.params.length;
|
||||
const info = makeSymbol(name, "", SymbolKind.Function, f.pos);
|
||||
funs.children.push(info);
|
||||
});
|
||||
symbols.push(vars)
|
||||
|
Loading…
Reference in New Issue
Block a user