Skip to content

Instantly share code, notes, and snippets.

@Clyybber
Last active February 4, 2018 17:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Clyybber/8861110a55f63ef1c255b26dbabfec1c to your computer and use it in GitHub Desktop.
Save Clyybber/8861110a55f63ef1c255b26dbabfec1c to your computer and use it in GitHub Desktop.
Nim check support for Kakoune
#Many thanks to SolitudeSF for testing and improving the snippet
#Script for making Nim(nim-lang.org) check work with Kakoune(kakoune.org)
hook global WinSetOption filetype=nim %{
set buffer lintcmd "sh -c 'cp -f $0 $0.nim;nim --stdout --colors:off --hints:off --path:$(dirname ${kak_buffile}) check $0 | sed \"s/(/:/;s/, /:/;s/)/:/\" | sed \":a;N;/\n[buf.nim]/!s/\n//;ta;P;D\"'"
lint-enable
}
@Clyybber
Copy link
Author

Clyybber commented Feb 4, 2018

Needs GNU sed (i think)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment