Skip to content

Commit

Permalink
Merge pull request #20 from Quodatum/dev
Browse files Browse the repository at this point in the history
0.2.7
  • Loading branch information
apb2006 authored Dec 31, 2023
2 parents 8b6e826 + d1690e9 commit 2b7711d
Show file tree
Hide file tree
Showing 64 changed files with 29,833 additions and 692 deletions.
1 change: 1 addition & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
{
"version": "0.1.0",
"configurations": [


{
"name": "Extension",
Expand Down
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
},
"yaml.schemas": {
"https://json.schemastore.org/mkdocs-1.0.json": "file:///c%3A/Users/mrwhe/git/vscode-basex/mkdocs.yml"
}
},
"basexTools.xquery.processor": "basex-9"
}
36 changes: 33 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,37 @@
# 0.2.7 (2023-12-31)
* goto definition for imported sources
* rename cmd `basexTools.xquery.processor` to `basexTools.xquery.profile`
# 0.2.6 (2023-12-14)
* Nested outline
* Improve hovers
* goto definition (current file only)

# 0.2.5 (2023-11-20)
* support otherwise/ ?:
* xqlint 0.5.0
* replace parseError decorator with standard error
# 0.2.4 (2023-10-28)
* Improve autocomplete (but not much)
* Improve XQuery snippets
* add statusbar
* create bxs (cmd) and bxs (xml) language ids and snippets
# 0.2.3 (2023-10-23)
* xsl extension conflict #18
* Use xqlint 0.4.5
# 0.1.19 (2023-10-06)
* Use xqlint 0.4.1
# 0.1.18 (2023-09-21)
* parseError decorator
* empty codeaction hint
# 0.1.16 (2023-09-10)
* virtual docs fixes
* add command basexTools.xqLibrary
# 0.1.15 (2023-09-09)
* Add commands: set processor and selectDeclaration.
* rework event handlers
# 0.1.14 (2023-08-26)
* [mod] Use xqlint 0.3.3
* [mod] rewrite event subscriptions
* Use xqlint 0.3.3
* rewrite event subscriptions

# 0.1.8 (2023-05-26)
* extract namespace library data to `xq-catalogs` component
Expand All @@ -23,7 +53,7 @@
* Add XQuery icon

# 0.1.4 (2023-03-18)
* [fix] use xqlint 0.2.1, was using 0.2.0
* [fix] use xqlint 0.2.1, was using 0.2.0 in error

# 0.1.3 (2023-02-27)
* Rename setting `platform` to `processor`
Expand Down
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,20 @@
The `vscode-basex` extension adds features to support [BaseX](https://basex.org/) development on VSCode.
A key feature is a parser for [XQuery](https://quodatum.github.io/basex-xqparse/) sources that supports all BaseX features, including XQuery Update and the Full text search syntax.
# Status
__Work in progress. Errors and changes to be expected.__
* __Work in progress. Errors and changes to be expected.__


# Features
See the [documentation](https://quodatum.github.io/vscode-basex/) for more detail
* Works in a Browser using [Code-server](https://github.com/coder/code-server) or [Github code-server](https://github.com/codespaces)
## XQuery
* [Linting]
* [Code Completion]
* [Execution]
* [source formating]
* [Symbols]
* [Snippets]
* [Goto definition]
## XPath
* [XPath Evaluation]
## XML
Expand All @@ -31,7 +34,7 @@ See the [documentation](https://quodatum.github.io/vscode-basex/) for more detai


# Requirements
* VS Code `1.73.0` or higher
* VS Code `1.76.0` or higher

# Release Notes
Detailed release notes are available [here](https://github.com/Quodatum/vscode-basex/releases).
Expand All @@ -51,8 +54,8 @@ npm run compile
vsce package
```
## Documentation
Uses https://github.com/squidfunk/mkdocs-material
https://quodatum.github.io/basex-xqparse/i-BaseX.xhtml#ArrowFunctionSpecifier
Uses [mkdocs-material](https://github.com/squidfunk/mkdocs-material)


# Inspiration
## VSCode
Expand All @@ -61,7 +64,8 @@ This project was created from a fork of [DotJoshJohnson/vscode-xml](https://gith
The code parsing uses [quodatum/xqlint](https://github.com/Quodatum/xqlint) which a fork of [wcandillon/xqlint](https://github.com/wcandillon/xqlint).
These both make use of Gunther Rademacher's [REx](https://www.bottlecaps.de/rex/) Parser Generator.

## Icon
The EBNF is shown [here](https://quodatum.github.io/basex-xqparse/i-BaseX.xhtml)
## Icons

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
Expand Down
9 changes: 9 additions & 0 deletions docs/history.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: History
summary: The release history of the vscode-basex extension
authors:
- Andy Bunce
date: 2023-07-23
---

Versions...
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ date: 2023-07-05
!!! warning Status
This extension is "Work in progress". Errors and changes to be expected.

For information about installing this extension see [here](installation.md).
Information about installing this extension is [here](installation.md).

## Working with XQuery sources
* [XQuery coding](xquery/)
Expand Down
17 changes: 16 additions & 1 deletion docs/xquery/xquery-code-completion.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,21 @@ authors:
date: 2023-07-05
tags:
- XQuery
- completion
---
`Ctl-space` triggered
## Usage
Code completion suggestions can be triggered by `Ctl-space`
![completion](xquery-code-completion.gif)

## Details
There are several types of completion. The context position is used to determine which to run.
### Type completions
If the previous token was `as` then type completions are displayed. Examples include:
* `let $a as `|
* `declare variable $a as `|
* `declare function local:f( $a as `|
* `declare function local:f( $a as item()) as `|

### Import completions
### Expression completions

8 changes: 8 additions & 0 deletions docs/xquery/xquery-errors.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: XQuery errors
summary: Error markers generated by XQlint.
authors:
- Andy Bunce
date: 2023-09-11
---
TODO A LIST
2 changes: 1 addition & 1 deletion docs/xquery/xquery-script-execution.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ date: 2023-07-05
![doclink](xquery-execution.gif)
!!! note
Currently starts new basex instance and passes file path to it.
See [vscode-xquery-notebook](https://github.com/Quodatum/vscode-xquery-notebook) for an experimental execution using the basex client and notebook features.
[vscode-xquery-noteook](https://github.com/Quodatum/vscode-xquery-notebook) is an experimental execution using the basex client and notebook features.
36 changes: 36 additions & 0 deletions languages/bxs/snippets-cmd.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"new basex script": {
"isFileTemplate": true,
"prefix": "BXS (cmd) Script",
"body": [
"# A BaseX script https://docs.basex.org/wiki/Commands#Command_Scripts",
""
],
"description": "New BXS (cmd)"
},
"create db":{
"prefix":"create",
"body": "CREATE DB ${1:name} ([input])",
"description": "create a database"
},
"open db":{
"prefix":"open",
"body": "OPEN ${1:name}",
"description": "open a database"
},
"check db":{
"prefix":"check",
"body": "CHECK ${1:name}",
"description": "open or create a database"
},
"close db":{
"prefix":"close",
"body": "CLOSE",
"description": "close database"
},
"list":{
"prefix":"list",
"body": "LIST ${1:name}",
"description": "Lists all available databases. If name is specified, the resources of a database are listed. The output can be further restricted to the resources matching the specified path. If database resources are listed, the size is either the number of nodes (for XML resources) or the number of bytes (for binary resources)."
}
}
29 changes: 29 additions & 0 deletions languages/bxs/snippets-xml.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"new basex script": {
"isFileTemplate": true,
"prefix": "BXS (XML) Script commands",
"body": [
"<!-- A BaseX script https://docs.basex.org/wiki/Commands#Command_Scripts -->",
"<commands>",
"${1}",
"</commands>"
],
"description": "New BXS (xml)"
},
"create db":{
"prefix":"<create",
"body": "<create-db name='${1:name}'/>",
"description": "create a database"
},
"open db":{
"prefix":"<open",
"body": "<open name='${1:name}'/>",
"description": "open a database"
},
"list":{
"prefix":"<list",
"body": "<list name='${1:name}' path='${2:path}' />",
"description": "list database content"
}

}
Loading

0 comments on commit 2b7711d

Please sign in to comment.