nvim: new: add tree-sitter injection query for julia(md_str)
This commit is contained in:
parent
6fc88c3ad4
commit
abf2a17474
4 changed files with 16 additions and 1 deletions
|
@ -62,6 +62,8 @@ mkdir $env:LOCALAPPDATA\nvim\after\queries\satysfi
|
||||||
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/monaqa/tree-sitter-satysfi/master/queries/highlights.scm" -OutFile $env:LOCALAPPDATA\nvim\after\queries\satysfi\highlights.scm
|
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/monaqa/tree-sitter-satysfi/master/queries/highlights.scm" -OutFile $env:LOCALAPPDATA\nvim\after\queries\satysfi\highlights.scm
|
||||||
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/monaqa/tree-sitter-satysfi/master/queries/indents.scm" -OutFile $env:LOCALAPPDATA\nvim\after\queries\satysfi\indents.scm
|
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/monaqa/tree-sitter-satysfi/master/queries/indents.scm" -OutFile $env:LOCALAPPDATA\nvim\after\queries\satysfi\indents.scm
|
||||||
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/monaqa/tree-sitter-satysfi/master/queries/matchup.scm" -OutFile $env:LOCALAPPDATA\nvim\after\queries\satysfi\matchup.scm
|
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/monaqa/tree-sitter-satysfi/master/queries/matchup.scm" -OutFile $env:LOCALAPPDATA\nvim\after\queries\satysfi\matchup.scm
|
||||||
|
mkdir $env:LOCALAPPDATA\nvim\after\queries\julia
|
||||||
|
New-Item -ItemType SymbolicLink -Path $env:LOCALAPPDATA\nvim\after\queries\julia\injections.scm -Target (Resolve-Path .\dotfiles\neovim\after\queries\julia\injections.scm)
|
||||||
# pwsh
|
# pwsh
|
||||||
New-Item -ItemType SymbolicLink -Path $PROFILE -Target (Resolve-Path .\dotfiles\pwsh\powershell_profile.ps1) -Force
|
New-Item -ItemType SymbolicLink -Path $PROFILE -Target (Resolve-Path .\dotfiles\pwsh\powershell_profile.ps1) -Force
|
||||||
New-Item -ItemType SymbolicLink -Path ~\.config\powershell\chezmoi_completion.ps1 -Target (Resolve-Path .\dotfiles\pwsh\chezmoi_completion.ps1) -Force
|
New-Item -ItemType SymbolicLink -Path ~\.config\powershell\chezmoi_completion.ps1 -Target (Resolve-Path .\dotfiles\pwsh\chezmoi_completion.ps1) -Force
|
||||||
|
|
|
@ -25,6 +25,7 @@ ln -sf $(pwd)/dotfiles/neovim/init.lua ~/.config/nvim/init.lua
|
||||||
mkdir -p ~/.config/nvim/lua
|
mkdir -p ~/.config/nvim/lua
|
||||||
ln -sf $(pwd)/dotfiles/neovim/lua/lualine_setup.lua ~/.config/nvim/lua/lualine_setup.lua
|
ln -sf $(pwd)/dotfiles/neovim/lua/lualine_setup.lua ~/.config/nvim/lua/lualine_setup.lua
|
||||||
ln -sf $(pwd)/dotfiles/neovim/lua/term_powershell.lua ~/.config/nvim/lua/term_powershell.lua
|
ln -sf $(pwd)/dotfiles/neovim/lua/term_powershell.lua ~/.config/nvim/lua/term_powershell.lua
|
||||||
|
ln -sf $(pwd)/dotfiles/neovim/lua/pluto_nvim.lua ~/.config/nvim/lua/pluto_nvim.lua
|
||||||
mkdir -p ~/.config/nvim/lua/lspconfig/server_configurations
|
mkdir -p ~/.config/nvim/lua/lspconfig/server_configurations
|
||||||
ln -sf $(pwd)/dotfiles/neovim/lua/lspconfig/server_configurations/satysfi_ls.lua ~/.config/nvim/lua/lspconfig/server_configurations/satysfi_ls.lua
|
ln -sf $(pwd)/dotfiles/neovim/lua/lspconfig/server_configurations/satysfi_ls.lua ~/.config/nvim/lua/lspconfig/server_configurations/satysfi_ls.lua
|
||||||
mkdir -p ~/.config/nvim/after/ftplugin
|
mkdir -p ~/.config/nvim/after/ftplugin
|
||||||
|
@ -34,6 +35,8 @@ mkdir -p ~/.config/nvim/after/queries/satysfi
|
||||||
curl -o ~/.config/nvim/after/queries/satysfi/highlights.scm https://raw.githubusercontent.com/monaqa/tree-sitter-satysfi/master/queries/highlights.scm
|
curl -o ~/.config/nvim/after/queries/satysfi/highlights.scm https://raw.githubusercontent.com/monaqa/tree-sitter-satysfi/master/queries/highlights.scm
|
||||||
curl -o ~/.config/nvim/after/queries/satysfi/indents.scm https://raw.githubusercontent.com/monaqa/tree-sitter-satysfi/master/queries/indents.scm
|
curl -o ~/.config/nvim/after/queries/satysfi/indents.scm https://raw.githubusercontent.com/monaqa/tree-sitter-satysfi/master/queries/indents.scm
|
||||||
curl -o ~/.config/nvim/after/queries/satysfi/matchup.scm https://raw.githubusercontent.com/monaqa/tree-sitter-satysfi/master/queries/matchup.scm
|
curl -o ~/.config/nvim/after/queries/satysfi/matchup.scm https://raw.githubusercontent.com/monaqa/tree-sitter-satysfi/master/queries/matchup.scm
|
||||||
|
mkdir -p ~/.config/nvim/after/queries/julia
|
||||||
|
ln -sf $(pwd)/dotfiles/neovim/after/queries/julia/injections.scm ~/.config/nvim/after/queries/julia/injections.scm
|
||||||
mkdir -p ~/.config/nvim/luasnippets
|
mkdir -p ~/.config/nvim/luasnippets
|
||||||
ln -sf $(pwd)/dotfiles/neovim/luasnippets/all.lua ~/.config/nvim/luasnippets/all.lua
|
ln -sf $(pwd)/dotfiles/neovim/luasnippets/all.lua ~/.config/nvim/luasnippets/all.lua
|
||||||
mkdir -p ~/.config/nvim/luasnippets/satysfi
|
mkdir -p ~/.config/nvim/luasnippets/satysfi
|
||||||
|
|
|
@ -3,7 +3,10 @@ project_path = joinpath(homedir(), ".julia", "environments", "nvim-lspconfig")
|
||||||
cd(project_path)
|
cd(project_path)
|
||||||
@info "now at " pwd()
|
@info "now at " pwd()
|
||||||
run(`julia --project=. -e 'using Pkg; Pkg.update()'`)
|
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..."
|
@info "compiling sysimage..."
|
||||||
run(`julia --project=. -e 'using PackageCompiler; create_sysimage(["LanguageServer"], sysimage_path = "sys-ls.so", precompile_execution_file = ["precompile_exec.jl"])'`)
|
run(`julia --project=. -e 'using PackageCompiler; create_sysimage(["LanguageServer"], sysimage_path = "sys-ls.so", precompile_execution_file = ["precompile_exec.jl"])'`)
|
||||||
@info "post precompile"
|
@info "post precompile"
|
||||||
|
|
7
dotfiles/neovim/after/queries/julia/injections.scm
Normal file
7
dotfiles/neovim/after/queries/julia/injections.scm
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
;; extends
|
||||||
|
|
||||||
|
((prefixed_string_literal
|
||||||
|
prefix: (identifier) @_prefix) @injection.content
|
||||||
|
(#eq? @_prefix "md")
|
||||||
|
(#set! injection.language "markdown")
|
||||||
|
(#offset! @injection.content 0 2 0 -1))
|
Loading…
Reference in a new issue