Home

tailwind-ctp-intellisense @master - refs - log -
-
https://git.jolheiser.com/tailwind-ctp-intellisense.git
Tailwind intellisense + Catppuccin
tree log patch
increase classlist search range (#414)
Brad Cornes <bradlc41@gmail.com>
3 years ago
2 changed files, 5 additions(+), 6 deletions(-)
M packages/tailwindcss-language-service/src/completionProvider.ts -> packages/tailwindcss-language-service/src/completionProvider.ts
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)
M packages/tailwindcss-language-service/src/util/find.ts -> packages/tailwindcss-language-service/src/util/find.ts
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'
   }