Home

tailwind-ctp-intellisense @master - refs - log -
-
https://git.jolheiser.com/tailwind-ctp-intellisense.git
Tailwind intellisense + Catppuccin
tree log patch
update to work with lsp definition format
Brad Cornes <bradlc41@gmail.com>
6 years ago
1 changed files, 9 additions(+), 5 deletions(-)
M src/index.ts -> src/index.ts
diff --git a/src/index.ts b/src/index.ts
index d84f23cd2413f91441dfad1e92784d05e8860d91..f8e98505c14bbcebe00dc125ecac9a2a7db76df5 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -21,7 +21,8 @@
 import {
   LanguageClient,
   LanguageClientOptions,
-  TransportKind
+  TransportKind,
+  Location
 } from 'vscode-languageclient'
 
 import { createTreeView } from './treeView'
@@ -137,11 +138,14 @@           let refresh = createTreeView(configPath)
         })
         client.onNotification(
           'tailwindcss/foundDefinition',
-          (configPath, pos) => {
-            Workspace.openTextDocument(configPath).then((doc: TextDocument) => {
+          ({ uri, range }: Location) => {
+            Workspace.openTextDocument(uri.replace(/^file:\/\//, '')).then((doc: TextDocument) => {
               Window.showTextDocument(doc).then((editor: TextEditor) => {
-                let start = new Position(pos.start.line, pos.start.character)
-                let end = new Position(pos.end.line, pos.end.character)
+                let start = new Position(
+                  range.start.line,
+                  range.start.character
+                )
+                let end = new Position(range.end.line, range.end.character)
                 editor.revealRange(
                   new Range(start, end),
                   TextEditorRevealType.InCenter