Binaryify / OneDark-Pro

Atom's iconic One Dark theme for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=zhuangtongfa.Material-theme
MIT License
1.51k stars 290 forks source link

Support julia is not good #807

Open guessable opened 10 months ago

guessable commented 10 months ago

Hi, thank you for the extension.I like this colorscheme but I don't have enough syntax highlighting on the julia language. Snipaste_2023-11-20_10-34-04 Can we make it better?

Binaryify commented 9 months ago

could you provide some example code

guessable commented 9 months ago

could you provide some example code

Thanks for your reply.sure,here is some julia code

using LinearAlgebra

mat = Matrix{Float64}
vec = Vector{Float64}

function GramSchmidt(š”ø::mat)::mat
  m, n = size(š”ø)
  š•Œ = š”ø[:, 1] / norm(š”ø[:, 1])
  @simd for j in 2:n
    vā±¼ = š”ø[:, j]
    @simd for i in 1:j-1
      vā±¼ -= (@view š”ø[:, j])' * (@view š•Œ[:, i]) * (@view š•Œ[:, i])
    end
    š•Œ = cat(š•Œ, vā±¼ / norm(vā±¼), dims=2)
  end
  return š•Œ
end

function ModifiedGS(š”ø::mat)::mat
  m, n = size(š”ø)
  š•Œ = š”ø[:, 1] / norm(š”ø[:, 1])
  for j in 2:n
    vā±¼ = š”ø[:, j]
    for i in 1:j-1
      vā±¼ -= vā±¼' * (@view š•Œ[:, i]) * (@view š•Œ[:, i])
    end
    š•Œ = cat(š•Œ, vā±¼ / norm(vā±¼), dims=2)
  end
  return š•Œ
end

n = 1000
up = range(0, 1, n)
down = range(0, 1, n)
A = diagm(1 => up, -1 => down)
A += 2 * I(n + 1)

@timev ModifiedGS(A)