From f62f91eba0bda7c443ea91412d11e5459ff0fd04 Mon Sep 17 00:00:00 2001 From: Shub Date: Fri, 11 Feb 2022 00:06:22 +0530 Subject: [PATCH] v0.6.0 --- package.json | 2 +- src/color-provider.ts | 8 +------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index b4359c1..0eb1637 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "intellisense" ], "description": "Intellisense support for CSS Variables", - "version": "0.5.0", + "version": "0.6.0", "publisher": "phoenisx", "license": "MIT", "homepage": "https://github.com/willofindie/vscode-cssvar", diff --git a/src/color-provider.ts b/src/color-provider.ts index 3e422db..b214d5f 100644 --- a/src/color-provider.ts +++ b/src/color-provider.ts @@ -17,6 +17,7 @@ import { parseFiles } from "./parser"; const getChunkRange = (startLineNumber: number, endLineNumber: number): Range => new Range(new Position(startLineNumber, 0), new Position(endLineNumber, 0)); + export class CssColorProvider implements DocumentColorProvider { async provideDocumentColors( document: TextDocument @@ -29,13 +30,6 @@ export class CssColorProvider implements DocumentColorProvider { const eol = document.eol === EndOfLine.CRLF ? "\r\n" : "\n"; const colorInfo: ColorInformation[] = []; - /** - * FIXME: document.getText() contains unsaved text as well. - * This is crucial, as the range keeps on changing for the Color Info - * Not sure why but VScode doesn't provide any Buffer instead of text for - * huge file content. - * That means I will have to work upon the entire text all at once. - */ // Assuming the worst case that each line has 120 characters (for JS like files) // 500 lines will contain at-max 500 * 120 = 60000 chars, which is very close to