diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index 0daad5d..0000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,30 +0,0 @@ -# Contributing to XML Tools -Welcome and thank you for contributing to **XML Tools for Visual Studio Code**! This document aims to provide an overview of standards and expectations for those interested in contributing to the project. - -## Asking Questions -If you have any questions, please ask on Gitter or Twitter instead of submitting an issue. - -## Reporting Issues -Before submitting a new issue, please be sure to check for an existing issue that matches yours first. Issues that are waiting for information for more than 30 days will be closed, so please be sure to follow your issues! - -## Writing Code -If you would like to contribute code to the project, please follow these conventions: - -* Use spaces over tabs (4 spaces per tab is preferred). -* Use double quotes whenever possible instead of single quotes. -* Use **snake-case** for file names. -* Use **PascalCase** for class and interface names. -* Use **camelCase** for all other identifiers unless otherwise specified. -* Prefix private members with an underscore. -* Implement and maintain barrels (`index.ts` files) when creating new folders or files. -* Use constants when referencing a static value more than once in your code. -* Place `else` and `else if` on their own lines. -* Never put opening braces (`{`) on their own line. -* Always use semicolons. -* Always prefer `const` whenever possible and fall back to `let` only if absolutely necessary. - -### Branches and Pull Requests -Always develop on a new feature branch in your fork and submit pull requests from that branch to our master branch. Don't worry about changing any version numbers - that happens in its own PR before a release. - -### Formatter Changes -For small bug fixes or feature additions, always add a new test case to accompany your change. If you are making large sweeping changes to how the formatter works or leveraging an external dependency for formatting XML, please create a new XmlFormatter implementation. diff --git a/package.json b/package.json index 40baf46..f154629 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "vscode-basex", "displayName": "BaseX tools", "description": "BaseX tools: XQuery, XML, XPath Tools for Visual Studio Code", - "version": "0.0.64", + "version": "0.0.65", "preview": true, "publisher": "quodatum", "author": "Andy Bunce (https://github.com/Quodatum)", diff --git a/src/completion/xquery-completion-item-provider.ts b/src/completion/xquery-completion-item-provider.ts index 52d0e30..aff265a 100644 --- a/src/completion/xquery-completion-item-provider.ts +++ b/src/completion/xquery-completion-item-provider.ts @@ -1,6 +1,6 @@ import { CompletionItem, CompletionItemKind, CompletionItemProvider, Position, TextDocument } from "vscode"; import { XQLint} from "@quodatum/xqlint"; -//const XQLint = require("@quodatum/xqlint").XQLint; + export class XQueryCompletionItemProvider implements CompletionItemProvider { diff --git a/src/formatting/commands/minifyXml.ts b/src/formatting/commands/minifyXml.ts index f6ee759..aeb93aa 100644 --- a/src/formatting/commands/minifyXml.ts +++ b/src/formatting/commands/minifyXml.ts @@ -1,10 +1,7 @@ -import { workspace } from "vscode"; -import { ProviderResult, Range, TextEdit, TextEditor, TextEditorEdit } from "vscode"; +import { Range, TextEditor, TextEditorEdit } from "vscode"; -import * as constants from "../../constants"; import { XmlFormatterFactory } from "../xml-formatter"; -import { XmlFormattingEditProvider } from "../xml-formatting-edit-provider"; import { XmlFormattingOptionsFactory } from "../xml-formatting-options"; export function minifyXml(editor: TextEditor, edit: TextEditorEdit): void { diff --git a/src/formatting/xml-formatting-options.ts b/src/formatting/xml-formatting-options.ts index 7c5185a..fb54d92 100644 --- a/src/formatting/xml-formatting-options.ts +++ b/src/formatting/xml-formatting-options.ts @@ -1,7 +1,6 @@ import { EndOfLine, FormattingOptions, TextDocument } from "vscode"; import { Configuration } from "../common"; -import * as constants from "../constants"; export interface XmlFormattingOptions { editorOptions: FormattingOptions; diff --git a/src/hover/hover.ts b/src/hover/hover.ts index cc7fc69..c0e54c2 100644 --- a/src/hover/hover.ts +++ b/src/hover/hover.ts @@ -1,6 +1,7 @@ // xquery hover import { CancellationToken, Hover, HoverProvider, Position, TextDocument } from "vscode"; +import { XQLint} from "@quodatum/xqlint"; import { channel } from "../common/logger"; export class XQueryHoverProvider implements HoverProvider { @@ -9,9 +10,10 @@ export class XQueryHoverProvider implements HoverProvider { position: Position, token: CancellationToken ): Hover | null { + const linter = new XQLint(document.getText()); const range = document.getWordRangeAtPosition(position); const word = document.getText(range); - return new Hover(`Hover info: ${word} at ${position.line}: ${position.character}`); + return new Hover(`XQuery Hover info: ${word} at ${position.line}: ${position.character}`); // return null; if there is no information to show } }