From ea7ba4ea4055b6427c8cba5d4b29b6f210388453 Mon Sep 17 00:00:00 2001 From: Steve Dunham Date: Fri, 27 Feb 2026 21:53:56 -0800 Subject: [PATCH] fixes for Linux nvim support --- src/Prelude.newt | 8 +++++--- vim/ftplugin/newt.vim | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Prelude.newt b/src/Prelude.newt index 155295b..0488c87 100644 --- a/src/Prelude.newt +++ b/src/Prelude.newt @@ -388,10 +388,12 @@ class HasIO (m : U → U) where instance HasIO IO where liftIO a = a +-- NB console.log is _not_ always synchronous +-- https://nodejs.org/api/process.html#a-note-on-process-io +-- But writeSync(1, ...) adds noise to LSP on linux pfunc primPutStrLn uses (MkIORes MkUnit) : String → IO Unit := `(s) => (w) => { - // https://nodejs.org/api/process.html#a-note-on-process-io - // Previously console.log, but that is _not_ always synchronous - fs.writeSync(1, s + '\n') + //fs.writeSync(1, s + '\n') + console.log(s) return Prelude_MkIORes(Prelude_MkUnit,w) }` diff --git a/vim/ftplugin/newt.vim b/vim/ftplugin/newt.vim index 54855c3..5cdbdcf 100644 --- a/vim/ftplugin/newt.vim +++ b/vim/ftplugin/newt.vim @@ -4,4 +4,4 @@ setlocal commentstring=--\ %s setlocal expandtab setlocal tabstop=2 -setlocal makeprg=build/exec/newt\ % +setlocal makeprg=newt\ %