mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-14 22:43:49 -05:00
Add nim support
This commit is contained in:
27
ftplugin/nim.vim
Normal file
27
ftplugin/nim.vim
Normal file
@@ -0,0 +1,27 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nim') == -1
|
||||
|
||||
if exists("b:nim_loaded")
|
||||
finish
|
||||
endif
|
||||
|
||||
let b:nim_loaded = 1
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
call nim#init()
|
||||
|
||||
setlocal formatoptions-=t formatoptions+=croql
|
||||
setlocal comments=:##,:#
|
||||
setlocal commentstring=#\ %s
|
||||
setlocal omnifunc=NimComplete
|
||||
setlocal suffixesadd=.nim
|
||||
setlocal expandtab "Make sure that only spaces are used
|
||||
|
||||
compiler nim
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
|
||||
endif
|
||||
Reference in New Issue
Block a user