File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,8 @@ import {
2121import {
2222 LanguageClient ,
2323 LanguageClientOptions ,
24- TransportKind
24+ TransportKind ,
25+ Location
2526} from 'vscode-languageclient'
2627
2728import { createTreeView } from './treeView'
@@ -137,11 +138,14 @@ export async function activate(context: ExtensionContext) {
137138 } )
138139 client . onNotification (
139140 'tailwindcss/foundDefinition' ,
140- ( configPath , pos ) => {
141- Workspace . openTextDocument ( configPath ) . then ( ( doc : TextDocument ) => {
141+ ( { uri , range } : Location ) => {
142+ Workspace . openTextDocument ( uri . replace ( / ^ f i l e : \/ \/ / , '' ) ) . then ( ( doc : TextDocument ) => {
142143 Window . showTextDocument ( doc ) . then ( ( editor : TextEditor ) => {
143- let start = new Position ( pos . start . line , pos . start . character )
144- let end = new Position ( pos . end . line , pos . end . character )
144+ let start = new Position (
145+ range . start . line ,
146+ range . start . character
147+ )
148+ let end = new Position ( range . end . line , range . end . character )
145149 editor . revealRange (
146150 new Range ( start , end ) ,
147151 TextEditorRevealType . InCenter
You can’t perform that action at this time.
0 commit comments