-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlsp.jl
More file actions
46 lines (39 loc) · 1.5 KB
/
Copy pathlsp.jl
File metadata and controls
46 lines (39 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
using LanguageServer
using LanguageServer.SymbolServer
using DrWatson: projectdir, srcdir, scriptsdir
tmp=true
if isdir(srcdir())
push!(LOAD_PATH, srcdir())
end
if tmp
let env=Base.load_path(),
dir=pwd(),
project_path=dirname(something(Base.current_project(pwd()),
Base.load_path_expand(LOAD_PATH[2])))
depot_path=get(ENV, "JULIA_DEPOT_PATH", "$(projectdir()):/home/ryoung/Projects/goal-code/src:/home/ryoung/Projects/goal-code/:$(srcdir())")
push!(LOAD_PATH, pwd())
push!(LOAD_PATH, joinpath(pwd(),"src"))
if isdir(srcdir())
push!(LOAD_PATH, srcdir())
end
if isdir(scriptsdir())
push!(LOAD_PATH, scriptsdir())
end
@info "LANGUAGE SERVER SETTINGS"
@info env dir project_path depot_path
@info "srcdir()=$(srcdir())"
server = LanguageServer.LanguageServerInstance(stdin, stdout, project_path, depot_path)
server.runlinter=true
run(server)
end
else
env=Base.load_path()
dir=pwd()
depot_path=get(ENV, "JULIA_DEPOT_PATH", "$(projectdir()):/home/ryoung/Projects/goal-code/:/home/ryoung/Projects/goal-code/src")
project_path=dirname(something(Base.current_project(pwd()),
Base.load_path_expand(LOAD_PATH[2])))
@info env dir project_path depot_path
server = LanguageServer.LanguageServerInstance(stdin, stdout, project_path, depot_path)
server.runlinter=true
run(server)
end