mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-03 00:20:05 +08:00
feat(layer): add julia code formattor
Problem: can not format julia. Solution: add custom neoformat configuration for julia
This commit is contained in:
parent
2f4a805440
commit
a45a8242ff
@ -32,7 +32,8 @@
|
||||
" SPC l s l send current line
|
||||
" SPC l s s send selection text
|
||||
" <
|
||||
"
|
||||
" To format julia code, you need to install `JuliaFormatter`, and the key
|
||||
" binding is `SPC b f`
|
||||
|
||||
function! SpaceVim#layers#lang#julia#plugins() abort
|
||||
let plugins = []
|
||||
@ -54,6 +55,15 @@ function! SpaceVim#layers#lang#julia#config() abort
|
||||
|
||||
" julia
|
||||
let g:default_julia_version = '0.7'
|
||||
" format code
|
||||
" if you want to use mirror:
|
||||
" let $JULIA_PKG_SERVER = 'https://mirrors.tuna.tsinghua.edu.cn/julia'
|
||||
let g:neoformat_enabled_julia = ['juliafmt']
|
||||
let g:neoformat_julia_juliafmt = {
|
||||
\ 'exe': 'julia',
|
||||
\ 'args': ['-e', '"using JuliaFormatter; print(format_text(read(stdin, String)))"'],
|
||||
\ 'stdin': 1,
|
||||
\ }
|
||||
endfunction
|
||||
|
||||
function! s:language_specified_mappings() abort
|
||||
|
@ -2982,7 +2982,8 @@ This layer also provides REPL support for julia, the key bindings are:
|
||||
SPC l s l send current line
|
||||
SPC l s s send selection text
|
||||
<
|
||||
|
||||
To format julia code, you need to install `JuliaFormatter`, and the key
|
||||
binding is `SPC b f`
|
||||
|
||||
==============================================================================
|
||||
LANG#KOTLIN *SpaceVim-layers-lang-kotlin*
|
||||
|
Loading…
Reference in New Issue
Block a user