From 1d85bd7af20611bb7879110ea419b01acec63d3c Mon Sep 17 00:00:00 2001 From: Alpha Chen Date: Fri, 12 Jul 2024 15:58:41 -0700 Subject: [PATCH] nvim mypy compiler --- .config/nvim/compiler/mypy.vim | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .config/nvim/compiler/mypy.vim diff --git a/.config/nvim/compiler/mypy.vim b/.config/nvim/compiler/mypy.vim new file mode 100644 index 0000000..ce460be --- /dev/null +++ b/.config/nvim/compiler/mypy.vim @@ -0,0 +1,26 @@ +" https://github.com/Konfekt/vim-compilers/blob/master/compiler/mypy.vim +" +" Maintainer: Enno Nagel +" Email: enno.nagel+vim@gmail.com +" +" This is free and unencumbered software released into the public domain. +" +" Anyone is free to copy, modify, publish, use, compile, sell, or +" distribute this software, either in source code form or as a compiled +" binary, for any purpose, commercial or non-commercial, and by any +" means. + +if exists("current_compiler") | finish | endif +let current_compiler = "mypy" + +let s:cpo_save = &cpo +set cpo&vim + +setlocal makeprg=mypy\ --show-column-numbers +setlocal errorformat=%f:%l:%c:\ %t%*[^:]:\ %m + +silent CompilerSet makeprg +silent CompilerSet errorformat + +let &cpo = s:cpo_save +unlet s:cpo_save