-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Completion by LanguageServer #338
Labels
completion
Better completion or incorrect completions
language server
Give up writing a complete analyzer
Milestone
Comments
zxj5470
added
completion
Better completion or incorrect completions
language server
Give up writing a complete analyzer
labels
Feb 3, 2019
Base.in(a::AbstractString,b::AbstractString)=occursin(a,b)
using REPL
search(name::AbstractString)=REPL.doc_completions(name) |> self->filter(it -> name in it,self) usagejulia> search("dif")
6-element Array{String,1}:
"diff"
"symdiff"
"setdiff"
"symdiff!"
"setdiff!"
"Cptrdiff_t" julia> search("diff") .|>
Meta.parse .|>
eval |>
self -> filter(it->it isa Function,self) .|>
methods |>
Iterators.flatten |>
collect .|>
self -> self.sig
18-element Array{Type,1}:
Tuple{typeof(diff),SparseArrays.SparseMatrixCSC}
Tuple{typeof(diff),AbstractArray{T,1} where T}
Tuple{typeof(diff),AbstractArray{T,N}} where N where T
Tuple{typeof(symdiff),Any}
Tuple{typeof(symdiff),Any,Vararg{Any,N} where N}
Tuple{typeof(setdiff),AbstractSet,Vararg{Any,N} where N}
Tuple{typeof(setdiff),Any}
Tuple{typeof(setdiff),Any,Vararg{Any,N} where N}
Tuple{typeof(symdiff!),BitSet,BitSet}
Tuple{typeof(symdiff!),AbstractArray{T,1},Vararg{Any,N} where N} where T
Tuple{typeof(symdiff!),BitSet,Any}
Tuple{typeof(symdiff!),AbstractSet,Any}
Tuple{typeof(symdiff!),AbstractSet,Vararg{Any,N} where N}
Tuple{typeof(setdiff!),BitSet,BitSet}
Tuple{typeof(setdiff!),AbstractArray{T,1} where T,Vararg{Any,N} where N}
Tuple{typeof(setdiff!),Set,Set}
Tuple{typeof(setdiff!),AbstractSet,Any}
Tuple{typeof(setdiff!),AbstractSet,Vararg{Any,N} where N}
julia>
|
struct A
a;b;c
end
aobject = A(1,2,3)
fieldnames(A)
fieldnames(typeof(aobject))
# or
aobject |> typeof |> fieldnames Return
julia> aobject |> typeof |> fieldnames |> collect .|> String
3-element Array{String,1}:
"a"
"b"
"c" |
Open
get return type Base.return_types(occursin)
6-element Array{Any,1}:
Bool
Bool
Union{Missing, Bool, ##58#59{_1} where _1}
Bool
Bool
Union{Missing, Bool} Specify param Base.return_types(occursin,(Regex,SubString))
1-element Array{Any,1}:
Bool |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
completion
Better completion or incorrect completions
language server
Give up writing a complete analyzer
names
)fieldnames
)The text was updated successfully, but these errors were encountered: