Skip to content

Commit 39f7723

Browse files
Fix quick info priority
1 parent 29e22d0 commit 39f7723

File tree

6 files changed

+39
-16
lines changed

6 files changed

+39
-16
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ temp
5757
.fake
5858
.vs
5959
*.js
60-
.vscode
6160
.orig
6261
release.cmd
6362
paket-files
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33
"version": "0.1.0",
44
"configurations": [
55
{
6+
"preLaunchTask": "Default",
67
"name": "Launch Extension",
78
"type": "extensionHost",
89
"runtimeExecutable": "${execPath}",
9-
"args": ["--extensionDevelopmentPath=${workspaceRoot}" ],
10+
"args": ["--extensionDevelopmentPath=${workspaceRoot}/release" ],
1011
"stopOnEntry": false
1112
}
1213
]

.vscode/tasks.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// Available variables which can be used inside of strings.
2+
// ${workspaceRoot}: the root folder of the team
3+
// ${file}: the current opened file
4+
// ${fileBasename}: the current opened file's basename
5+
// ${fileDirname}: the current opened file's dirname
6+
// ${fileExtname}: the current opened file's extension
7+
// ${cwd}: the current working directory of the spawned process
8+
9+
{
10+
"version": "0.1.0",
11+
"command": "build.cmd",
12+
"isShellCommand": true,
13+
"showOutput": "silent",
14+
"args": [],
15+
"tasks": [
16+
{
17+
"taskName": "Default",
18+
"args": [],
19+
"isBuildCommand": true
20+
}
21+
]
22+
23+
}

src/Components/Linter.fs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ open FunScript.TypeScript.vscode.languages
88
open FunScript.TypeScript.path
99
open FunScript.TypeScript.fs
1010

11-
open DTO
11+
open DTO
1212
open Ionide.VSCode.Helpers
1313

1414
[<ReflectedDefinition>]
@@ -35,7 +35,6 @@ module Linter =
3535
p
3636
|> Globals.dirname
3737
|> findFsProj
38-
|> Option.map (fun n -> LanguageService.project n )
3938

4039
let private parse path text =
4140

@@ -57,7 +56,10 @@ module Linter =
5756
let path = file.fileName
5857
let prom = project path
5958
match prom with
60-
| Some p -> p |> Promise.success (fun _ -> parse path (file.getText ())) |> ignore
59+
| Some p -> p
60+
|> LanguageService.project
61+
|> Promise.success (fun _ -> parse path (file.getText ()))
62+
|> ignore
6163
| None -> parse path (file.getText ())
6264

6365
let mutable private timer = None : NodeJS.Timer option

src/Components/QuickInfo.fs

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,32 +13,30 @@ open Ionide.VSCode.Helpers
1313
module QuickInfo =
1414
let mutable private item : StatusBarItem option = None
1515

16-
17-
18-
let private handle' (event : TextEditorSelectionChangeEvent) =
16+
let private handle' (event : TextEditorSelectionChangeEvent) =
1917
let doc = event.textEditor.document
2018
let pos = event.selections.[0].active
2119
LanguageService.tooltip (doc.fileName) (int pos.line + 1) (int pos.character + 1)
22-
|> Promise.success (fun o ->
20+
|> Promise.success (fun o ->
2321
let res = (o.Data |> Array.fold (fun acc n -> (n |> Array.toList) @ acc ) []).Head.Signature
24-
let t = res.Split('\n').[0]
22+
let t = res.Split('\n').[0]
2523
item |> Option.iter (fun n -> n.hide ())
26-
let i = window.Globals.createStatusBarItem (1 |> unbox)
24+
let i = window.Globals.createStatusBarItem (1 |> unbox, -1.)
2725
i.text <- t
2826
i.tooltip <- res
2927
i.show ()
3028
item <- Some i
3129
()
3230
)
3331
|> ignore
34-
32+
3533
let mutable private timer = None : NodeJS.Timer option
36-
34+
3735
let private handle (event : TextEditorSelectionChangeEvent) =
3836
timer |> Option.iter(Globals.clearTimeout)
3937
timer <- Some (Globals.setTimeout((fun n -> handle' event), 500.) )
4038

41-
let activate (disposables: Disposable[]) =
39+
let activate (disposables: Disposable[]) =
4240
window.Globals.onDidChangeTextEditorSelection
43-
|> EventHandler.add handle () disposables
41+
|> EventHandler.add handle () disposables
4442
()

src/Ionide.FSharp.fsproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<RootNamespace>Ionide.FSharp</RootNamespace>
99
<AssemblyName>Ionide.FSharp</AssemblyName>
1010
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
11-
<TargetFrameworkProfile />
11+
<TargetFrameworkProfile />
1212
</PropertyGroup>
1313
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
1414
<DebugSymbols>true</DebugSymbols>

0 commit comments

Comments
 (0)