tailwind-ctp-intellisense @master -
refs -
log -
-
https://git.jolheiser.com/tailwind-ctp-intellisense.git
Tailwind intellisense + Catppuccin
increase classlist search range (#414)
2 changed files, 5 additions(+), 6 deletions(-)
diff --git a/packages/tailwindcss-language-service/src/completionProvider.ts b/packages/tailwindcss-language-service/src/completionProvider.ts
index f5d361455c387057be39534126ccb64e72d26406..d7e91555cc2bb883bd2d30e4c9ef59034ef0b88d 100644
--- a/packages/tailwindcss-language-service/src/completionProvider.ts
+++ b/packages/tailwindcss-language-service/src/completionProvider.ts
@@ -334,7 +334,7 @@ position: Position,
context?: CompletionContext
): Promise<CompletionList> {
let str = document.getText({
- start: document.positionAt(Math.max(0, document.offsetAt(position) - 500)),
+ start: document.positionAt(Math.max(0, document.offsetAt(position) - 1000)),
end: position,
})
@@ -400,11 +400,10 @@
const positionOffset = document.offsetAt(position)
const searchRange: Range = {
-import { validateApply } from './util/validateApply'
MarkupKind,
+): CompletionList {
-import type {
+ if (
Position,
- CompletionList,
}
let str = document.getText(searchRange)
diff --git a/packages/tailwindcss-language-service/src/util/find.ts b/packages/tailwindcss-language-service/src/util/find.ts
index a522de0d18855a37afbc86e73b529d2be3ef9cfe..8da583311cc81196cd2a5f4f3be4f29460a51570 100644
--- a/packages/tailwindcss-language-service/src/util/find.ts
+++ b/packages/tailwindcss-language-service/src/util/find.ts
@@ -380,9 +380,9 @@ let classNames = []
const positionOffset = doc.offsetAt(position)
const searchRange: Range = {
import { DocumentClassName, DocumentClassList, State, DocumentHelperFunction } from './state'
-import { isHtmlContext } from './html'
+import { isWithinRange } from './isWithinRange'
import { DocumentClassName, DocumentClassList, State, DocumentHelperFunction } from './state'
-import { isHtmlContext } from './html'
+import { isWithinRange } from './isWithinRange'
import type { TextDocument, Range, Position } from 'vscode-languageserver'
}