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 {
21
21
import {
22
22
LanguageClient ,
23
23
LanguageClientOptions ,
24
- TransportKind
24
+ TransportKind ,
25
+ Location
25
26
} from 'vscode-languageclient'
26
27
27
28
import { createTreeView } from './treeView'
@@ -137,11 +138,14 @@ export async function activate(context: ExtensionContext) {
137
138
} )
138
139
client . onNotification (
139
140
'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 ) => {
142
143
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 )
145
149
editor . revealRange (
146
150
new Range ( start , end ) ,
147
151
TextEditorRevealType . InCenter
You can’t perform that action at this time.
0 commit comments