-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsimplecc.json
More file actions
136 lines (136 loc) · 5.22 KB
/
Copy pathsimplecc.json
File metadata and controls
136 lines (136 loc) · 5.22 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
{
"languageServers": {
"rust-analyzer": {
"command": "rust-analyzer",
"args": [],
"filetypes": ["rust"],
"rootPatterns": ["Cargo.toml", "rust-project.json", ".git"],
"priority": 100,
"initializationOptions": {},
"settings": {
"rust-analyzer": {
"check": {
"command": "check"
},
"diagnostics": {
"experimental": {
"enable": false
}
}
}
}
},
"clangd": {
"command": "clangd",
"args": [],
"filetypes": ["c", "cpp", "objc", "objcpp"],
"rootPatterns": [
"compile_commands.json",
"compile_flags.txt",
".clangd",
"CMakeLists.txt",
".git"
],
"priority": 100,
"initializationOptions": {},
"settings": {}
},
"pyright": {
"command": "pyright-langserver",
"args": ["--stdio"],
"filetypes": ["python"],
"rootPatterns": [
"pyrightconfig.json",
"pyproject.toml",
"setup.cfg",
"setup.py",
".git"
],
"priority": 100,
"initializationOptions": {},
"settings": {
"python": {
"analysis": {
"typeCheckingMode": "standard",
"diagnosticMode": "openFilesOnly",
"autoSearchPaths": true,
"useLibraryCodeForTypes": true
}
}
}
},
"gopls": {
"command": "gopls",
"args": [],
"filetypes": ["go", "gomod", "gowork"],
"rootPatterns": ["go.work", "go.mod", ".git"],
"priority": 100,
"initializationOptions": {},
"settings": {}
},
"typescript-language-server": {
"command": "typescript-language-server",
"args": ["--stdio"],
"filetypes": [
"typescript",
"javascript",
"typescriptreact",
"javascriptreact"
],
"rootPatterns": [
"tsconfig.json",
"jsconfig.json",
"package.json",
".git"
],
"priority": 100,
"initializationOptions": {},
"settings": {}
},
"lua-language-server": {
"command": "lua-language-server",
"args": [],
"filetypes": ["lua"],
"rootPatterns": [".luarc.json", ".luarc.jsonc", ".git"],
"priority": 100,
"initializationOptions": {},
"settings": {}
},
"julia-lsp": {
"command": "julia",
"args": [
"--startup-file=no",
"--history-file=no",
"-e",
"ls_env = joinpath(get(DEPOT_PATH, 1, joinpath(homedir(), \".julia\")), \"environments\", \"simplecc\"); pushfirst!(LOAD_PATH, ls_env); using LanguageServer; popfirst!(LOAD_PATH); depot = get(ENV, \"JULIA_DEPOT_PATH\", \"\"); project = dirname(something(Base.current_project(pwd()), get(Base.load_path(), 1, nothing), Base.active_project())); import Pkg, TOML; function _simplecc_lsp_env(project); try; pf = joinpath(project, \"Project.toml\"); isfile(pf) || return project; t = TOML.parsefile(pf); nm = get(t, \"name\", nothing); uu = get(t, \"uuid\", nothing); (nm isa String && uu isa String) || return project; isfile(joinpath(project, \"src\", nm * \".jl\")) || return project; mf = nothing; for c in (\"Manifest-v$(VERSION.major).$(VERSION.minor).toml\", \"JuliaManifest.toml\", \"Manifest.toml\"); p = joinpath(project, c); if isfile(p); mf = p; break; end; end; mf === nothing && return project; shadow = joinpath(get(DEPOT_PATH, 1, joinpath(homedir(), \".julia\")), \"environments\", \"simplecc-pkgs\", uu); stampf = joinpath(shadow, \".source_stamp\"); stamp = string(mtime(mf)); ok = isfile(joinpath(shadow, basename(mf))) && isfile(stampf) && read(stampf, String) == stamp; if !ok; redirect_stdout(stderr) do; rm(shadow; force=true, recursive=true); mkpath(shadow); proj = Dict{String,Any}(); haskey(t, \"deps\") && (proj[\"deps\"] = t[\"deps\"]); haskey(t, \"compat\") && (proj[\"compat\"] = t[\"compat\"]); open(joinpath(shadow, \"Project.toml\"), \"w\") do io; TOML.print(io, proj; sorted=true); end; cp(mf, joinpath(shadow, basename(mf)); force=true); withenv(\"JULIA_PKG_PRECOMPILE_AUTO\" => \"0\") do; io = IOBuffer(); Pkg.activate(shadow; io=io); Pkg.develop(Pkg.PackageSpec(path=project); preserve=Pkg.PRESERVE_ALL, io=io); end; write(stampf, stamp); end; end; return shadow; catch e; redirect_stdout(stderr) do; @warn \"simplecc: shadow env setup failed; using project env\" exception=e; end; return project; end; end; lsp_env = _simplecc_lsp_env(project); server = LanguageServer.LanguageServerInstance(stdin, stdout, lsp_env, depot); run(server)"
],
"filetypes": ["julia"],
"rootPatterns": ["JuliaProject.toml", "Project.toml", ".git"],
"priority": 100,
"initializationOptions": {
"useFormatterConfigDefaults": true
},
"settings": {
"julia": {
"lint": {
"run": true,
"missingrefs": "none",
"disabledDirs": ["docs", "test"]
},
"completionmode": "qualify",
"inlayHints": {
"static": {
"enabled": false,
"variableTypes": {
"enabled": true
},
"parameterNames": {
"enabled": "literals"
}
}
}
}
}
}
}
}