1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-02 20:20:05 +08:00

fix(toml): fix toml json preview plugin

This commit is contained in:
Shidong Wang 2021-11-13 15:05:04 +08:00
parent 0e9127e4dc
commit 8be152b48b
No known key found for this signature in database
GPG Key ID: 41BB7053E835C848

View File

@ -21,13 +21,13 @@ function! toml#preview() abort
" close other windows
silent only
" open preview windows
rightbelow vsplit __toml_json_preview__
rightbelow vsplit __toml_json_preview__.json
set ft=SpaceVimTomlViewer
set syntax=json
setlocal buftype=nofile bufhidden=wipe nobuflisted nolist noswapfile nowrap cursorline nospell nonu norelativenumber winfixwidth
let s:preview_bufnr = bufnr()
setlocal modifiable
call setline(1, json)
Neoformat! json
silent Neoformat! json
setlocal nomodifiable
set syntax=json
endfunction