From d9dddd3dcf8f9bebc62b2a34570498a63e9f9103 Mon Sep 17 00:00:00 2001 From: baabelfish Date: Fri, 5 Feb 2016 08:16:29 +0200 Subject: [PATCH] Update README --- README.md | 1 - autoload/features/debugger.vim | 14 ++++++++++++-- ftplugin/nim.vim | 2 +- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 6804dce..9179be7 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,6 @@ Nim support for Neovim - [ ] Autocompletion - [x] Autocompletion with ycm - [ ] Auto complete modules - - [ ] Snippet/documentation support after complete - [ ] Debugging - [ ] Commands diff --git a/autoload/features/debugger.vim b/autoload/features/debugger.vim index 0d476de..4753291 100644 --- a/autoload/features/debugger.vim +++ b/autoload/features/debugger.vim @@ -6,6 +6,7 @@ let s:NimDebugger = { function! s:NimDebugger.on_stdout(job, chunk) for line in a:chunk + echom line " *** endb| reached edb.nim(4) wat *** " let matched = matchlist(line, "\\*\\*\\* endb\|\(.*\)$") let matched = matchlist(line, "") @@ -26,7 +27,14 @@ function! features#debugger#run() echo "Debugger already running" else " vnew - let s:edb_terminal_job = jobstart(["nim", "c", "--colors:off", "--debugger:on", "-r", "edb.nim"], s:NimDebugger) + let s:edb_terminal_job = jobstart([ + \ "nim", + \ "c", + \ "--colors:off", + \ "--debugger:native", + \ "--lineDir:on", + \ "--lineTrace:on", + \ "edb.nim"], s:NimDebugger) " let s:edb_terminal_job = termopen("nim c --debugger:on -r edb.nim") " wincmd p endif @@ -43,7 +51,9 @@ endfunction function! s:SendCommand(cmd) if s:edb_terminal_job > 0 call jobsend(s:edb_terminal_job, a:cmd . "\n") - " call jobsend(s:edb_terminal_job, "w\n") + call jobsend(s:edb_terminal_job, "w\n") + call jobsend(s:edb_terminal_job, "g\n") + call jobsend(s:edb_terminal_job, "l\n") else echom "Debugger not running" endif diff --git a/ftplugin/nim.vim b/ftplugin/nim.vim index 83c136d..75494a8 100644 --- a/ftplugin/nim.vim +++ b/ftplugin/nim.vim @@ -9,7 +9,7 @@ setlocal comments=s1:#[,mb:#,ex:]#,:#,:## setlocal commentstring=#\ %s setlocal expandtab setlocal omnifunc=omni#nim -setlocal makeprg=nim\ c\ --verbosity:0\ --colors:off\ % +setlocal makeprg=nim\ c\ --compileOnly\ --verbosity:0\ --colors:off\ % setlocal errorformat= \%-GHint:\ %m, \%A%f(%l\\,\ %c)\ Hint:\ %m,