nvim: new: add tree-sitter injection query for julia(md_str)

This commit is contained in:
qwjyh 2024-04-09 08:47:08 +09:00
parent 6fc88c3ad4
commit abf2a17474
4 changed files with 16 additions and 1 deletions

View file

@ -3,7 +3,10 @@ project_path = joinpath(homedir(), ".julia", "environments", "nvim-lspconfig")
cd(project_path)
@info "now at " pwd()
run(`julia --project=. -e 'using Pkg; Pkg.update()'`)
read("precompile_exec_head.jl", String) * read("tracecompile.jl", String) |> (b -> write("precompile_exec.jl", b))
compile_traces = Iterators.filter(eachline("tracecompile.jl")) do line
!startswith(line, '#') && !occursin(r"\#\d+\#\d+", line)
end |> join
read("precompile_exec_head.jl", String) * compile_traces |> (b -> write("precompile_exec.jl", b))
@info "compiling sysimage..."
run(`julia --project=. -e 'using PackageCompiler; create_sysimage(["LanguageServer"], sysimage_path = "sys-ls.so", precompile_execution_file = ["precompile_exec.jl"])'`)
@info "post precompile"