From ed96fadcd360d5c830170f43daa129b2e1a94a5b Mon Sep 17 00:00:00 2001 From: Elliot Saba Date: Sun, 2 Jun 2024 08:58:13 -0700 Subject: [PATCH 1/2] Fixes for Julia v1.12+ REPL.REPLCompletions had some internals change around recently, this adds a polyfill for the completions. [test/External] Actually develop the correct path --- src/lexers/julia.jl | 3 +-- test/runtests.jl | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/lexers/julia.jl b/src/lexers/julia.jl index 37118a7..514593b 100644 --- a/src/lexers/julia.jl +++ b/src/lexers/julia.jl @@ -66,9 +66,8 @@ end julia_is_triple_string_macro(ctx::Context) = julia_is_string_macro(ctx, 3) # Julia Script Lexer. - @lexer JuliaLexer let - keywords = [kw.keyword for kw in REPL.REPLCompletions.complete_keyword("")] + keywords = [kw.keyword for kw in REPL.REPLCompletions.sorted_keywords] char_regex = [ raw"'(\\.|\\[0-7]{1,3}|\\x[a-fA-F0-9]{1,3}|", raw"\\u[a-fA-F0-9]{1,4}|\\U[a-fA-F0-9]{1,6}|", diff --git a/test/runtests.jl b/test/runtests.jl index a016f04..1d9a6c1 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -337,5 +337,5 @@ end # Hack to make the test in External actually usable... using Pkg Pkg.activate(joinpath(@__DIR__, "External")) -Pkg.develop("Highlights") +Pkg.develop(Pkg.PackageSpec(;path=dirname(@__DIR__))) using External From 1bad9adf8405ba3fe96bc5793c268c55152a1997 Mon Sep 17 00:00:00 2001 From: Elliot Saba Date: Sun, 2 Jun 2024 23:53:48 -0700 Subject: [PATCH 2/2] Update src/lexers/julia.jl Co-authored-by: Shuhei Kadowaki <40514306+aviatesk@users.noreply.github.com> --- src/lexers/julia.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lexers/julia.jl b/src/lexers/julia.jl index 514593b..50fc879 100644 --- a/src/lexers/julia.jl +++ b/src/lexers/julia.jl @@ -67,7 +67,7 @@ julia_is_triple_string_macro(ctx::Context) = julia_is_string_macro(ctx, 3) # Julia Script Lexer. @lexer JuliaLexer let - keywords = [kw.keyword for kw in REPL.REPLCompletions.sorted_keywords] + keywords = copy(REPL.REPLCompletions.sorted_keywords) char_regex = [ raw"'(\\.|\\[0-7]{1,3}|\\x[a-fA-F0-9]{1,3}|", raw"\\u[a-fA-F0-9]{1,4}|\\U[a-fA-F0-9]{1,6}|",