Skip to content

Commit a8f92d2

Browse files
committed
misc fixes
1 parent 046e280 commit a8f92d2

4 files changed

Lines changed: 224 additions & 176 deletions

File tree

src/JETLS.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ function initialize_result()
249249
completionItem = (;
250250
labelDetailsSupport = true)),
251251
signatureHelpProvider = SignatureHelpOptions(;
252-
triggerCharacters = ["(", ","]),
252+
triggerCharacters = ["(", ",", ";"]),
253253
),
254254
serverInfo = (;
255255
name = "JETLS",

src/completions.jl

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -254,33 +254,6 @@ end
254254
# global completions
255255
# ==================
256256

257-
function find_file_module!(state::ServerState, uri::URI, pos::Position)
258-
mod = find_file_module(state, uri, pos)
259-
state.completion_module[] = mod
260-
return mod
261-
end
262-
function find_file_module(state::ServerState, uri::URI, pos::Position)
263-
haskey(state.contexts, uri) || return Main
264-
contexts = state.contexts[uri]
265-
context = first(contexts)
266-
for ctx in contexts
267-
# prioritize `PackageSourceAnalysisEntry` if exists
268-
if isa(context.entry, PackageSourceAnalysisEntry)
269-
context = ctx
270-
break
271-
end
272-
end
273-
safi = successfully_analyzed_file_info(context, uri)
274-
isnothing(safi) && return Main
275-
curline = Int(pos.line) + 1
276-
curmod = Main
277-
for (range, mod) in safi.module_range_infos
278-
curline in range || continue
279-
curmod = mod
280-
end
281-
return curmod
282-
end
283-
284257
function global_completions!(items::Dict{String, CompletionItem}, state::ServerState, uri::URI, params::CompletionParams)
285258
pos = params.position
286259
is_macro_invoke = let context = params.context

0 commit comments

Comments
 (0)