new: nvim: rewrite julials managing scripts with julia for cross-platform compatibility
This commit is contained in:
parent
5c27c02e69
commit
2497b9b54d
3 changed files with 33 additions and 1 deletions
16
bin/neovim/setup_julials.jl
Normal file
16
bin/neovim/setup_julials.jl
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
#!/usr/bin/julia
|
||||||
|
project_path = joinpath(homedir(), ".julia", "environments", "nvim-lspconfig")
|
||||||
|
if !ispath(project_path)
|
||||||
|
try
|
||||||
|
mkdir(project_path)
|
||||||
|
@info "Created $(project_path)"
|
||||||
|
catch e
|
||||||
|
@error e
|
||||||
|
@error dump(e)
|
||||||
|
throw(e)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
cmd = `julia --project=$(project_path) $(@__DIR__)/add_dependencies.jl`
|
||||||
|
@info cmd
|
||||||
|
run(cmd)
|
||||||
|
|
11
bin/neovim/update_julials.jl
Normal file
11
bin/neovim/update_julials.jl
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
#!/usr/bin/julia
|
||||||
|
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))
|
||||||
|
@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"
|
||||||
|
run(`julia --project=. -J sys-ls.so -e 'using Pkg; Pkg.precompile()'`)
|
||||||
|
|
|
@ -533,8 +533,13 @@ lspconfig.powershell_es.setup {
|
||||||
-- -- jetls
|
-- -- jetls
|
||||||
-- lspconfig.jetls.setup {}
|
-- lspconfig.jetls.setup {}
|
||||||
-- ccls
|
-- ccls
|
||||||
|
-- -- csharp
|
||||||
|
-- lspconfig.omnisharp.setup {
|
||||||
|
-- cmd = {'omnisharp'},
|
||||||
|
-- }
|
||||||
|
|
||||||
local lss = { "pyright", "rust_analyzer", "texlab", "ccls", "clangd", "tsserver", --[["tailwindcss"]] "hls", "cmake", "html", }
|
local lss = { "pyright", "rust_analyzer", "texlab", "ccls", "clangd", "tsserver", --[["tailwindcss"]] "hls", "cmake",
|
||||||
|
"csharp_ls", "html", }
|
||||||
for _, ls in pairs(lss) do
|
for _, ls in pairs(lss) do
|
||||||
lspconfig[ls].setup {
|
lspconfig[ls].setup {
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
|
|
Loading…
Reference in a new issue