Fix a few errors
This commit is contained in:
parent
e8edebccbe
commit
26aa6a5cbb
6 changed files with 37 additions and 20 deletions
|
|
@ -180,7 +180,7 @@ function! s:RenderOutline()
|
|||
exec ":" . len(rlines)
|
||||
normal! dG
|
||||
|
||||
if !wasFocused && g:nvim_nim_outline_track_symbol && closest != 0
|
||||
if !wasFocused && g:nvim_nim_outline_track_symbol && closest != 0 && has_key(s:buffermap, closest)
|
||||
call cursor(s:buffermap[closest], 2)
|
||||
normal zz
|
||||
normal ^
|
||||
|
|
|
|||
|
|
@ -1,10 +1,9 @@
|
|||
scriptencoding utf-8
|
||||
|
||||
|
||||
if exists("s:loaded")
|
||||
finish
|
||||
endif
|
||||
let s:loaded = 1
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
|
||||
let s:all_highlights = {
|
||||
\ 'skProc': "Function",
|
||||
|
|
@ -51,13 +50,20 @@ endfunction
|
|||
function! s:NimHighlighter.on_stderr(job, chunk)
|
||||
endfunction
|
||||
|
||||
function! Remove(id)
|
||||
try
|
||||
call matchdelete(a:id)
|
||||
catch /E803:/
|
||||
endtry
|
||||
endfunction
|
||||
|
||||
function! s:NimHighlighter.on_exit()
|
||||
if empty(self.lines) && self.file != expand("%:p")
|
||||
return
|
||||
endif
|
||||
|
||||
for m in b:highlights
|
||||
call matchdelete(m)
|
||||
call Remove(m)
|
||||
endfor
|
||||
|
||||
let b:highlights = []
|
||||
|
|
@ -130,3 +136,7 @@ function! highlighter#guard()
|
|||
endif
|
||||
endif
|
||||
endfunction
|
||||
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
|
|
|||
|
|
@ -1,10 +1,8 @@
|
|||
scriptencoding utf-8
|
||||
|
||||
|
||||
if exists("s:loaded")
|
||||
finish
|
||||
endif
|
||||
let s:loaded = 1
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
|
||||
function! modules#FindImportLocation()
|
||||
|
|
@ -83,3 +81,7 @@ endfunction
|
|||
function! modules#FindGlobalImports()
|
||||
return modules#ImportMap(globpath(g:nvim_nim_deps_nim, "**/*.nim", 0, 1))
|
||||
endfunction
|
||||
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
|
|
|||
|
|
@ -1,10 +1,9 @@
|
|||
scriptencoding utf-8
|
||||
|
||||
|
||||
if exists("s:loaded")
|
||||
finish
|
||||
endif
|
||||
let s:loaded = 1
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
|
||||
function! omni#item(parsed)
|
||||
return {
|
||||
|
|
@ -70,3 +69,7 @@ function! omni#nim(findstart, base)
|
|||
\ 'words': completions,
|
||||
\ 'refresh': 'always' }
|
||||
endfunction
|
||||
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
scriptencoding utf-8
|
||||
|
||||
|
||||
if exists("s:loaded")
|
||||
finish
|
||||
endif
|
||||
let s:loaded = 1
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
|
||||
let s:idtypes = {
|
||||
|
|
@ -298,3 +295,7 @@ function! NimReplSend(motion_wiseness)
|
|||
echom str
|
||||
call features#repl#send(str)
|
||||
endfunction
|
||||
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
|
|
|||
|
|
@ -59,7 +59,8 @@ let g:nvim_nim_enable_custom_textobjects = 1
|
|||
|
||||
let g:nvim_nim_highlighter_enable = 1
|
||||
let g:nvim_nim_highlight_builtin = 1
|
||||
let g:nvim_nim_highlighter_semantics = ["skConst", "skForVar", "skGlobalVar", "skGlobalLet", "skLet", "skModule", "skParam", "skTemp", "skVar"]
|
||||
" let g:nvim_nim_highlighter_semantics = ["skConst", "skForVar", "skGlobalVar", "skGlobalLet", "skLet", "skModule", "skParam", "skTemp", "skVar"]
|
||||
let g:nvim_nim_highlighter_semantics = []
|
||||
|
||||
call highlighter#select_highlights(["skProc", "skTemplate", "skType", "skMacro", "skMethod", "skField", "skForVar", "skIterator"])
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue