Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions runtime/compiler/ty.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
" Vim compiler file
" Compiler: Ty (Python Type Checker)
" Maintainer: @konfekt
" Last Change: 2024 Dec 18

if exists("current_compiler") | finish | endif
let current_compiler = "ty"

let s:cpo_save = &cpo
set cpo&vim

" CompilerSet makeprg=ty
exe 'CompilerSet makeprg=' .. escape(
\ get(b:, 'ty_makeprg', get(g:, 'ty_makeprg', 'ty --no-progress --color=never'))
\ ..' check --output-format=concise', ' \|"')
CompilerSet errorformat=%f:%l:%c:\ %m,%f:%l:\ %m,%f:%l:%c\ -\ %m,%f:

let &cpo = s:cpo_save
unlet s:cpo_save
9 changes: 9 additions & 0 deletions runtime/doc/quickfix.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1654,6 +1654,15 @@ b/g:mypy_makeprg_params variable. For example: >
The global default is "--strict --ignore-missing-imports".

TY TYPE CHECKER *compiler-ty*

Commonly used compiler options and executable can be set by the
b/g:ty_makeprg variable. For example: >
let b:ty_makeprg = "uv run ty"
The global default is "ty --no-progress --color=never".

RUFF LINTER *compiler-ruff*

Commonly used compiler options can be added to 'makeprg' by setting the
Expand Down
1 change: 1 addition & 0 deletions runtime/doc/tags
Original file line number Diff line number Diff line change
Expand Up @@ -6778,6 +6778,7 @@ compiler-spotbugs quickfix.txt /*compiler-spotbugs*
compiler-tex quickfix.txt /*compiler-tex*
compiler-tombi quickfix.txt /*compiler-tombi*
compiler-tsc quickfix.txt /*compiler-tsc*
compiler-ty quickfix.txt /*compiler-ty*
compiler-typst quickfix.txt /*compiler-typst*
compiler-vaxada ft_ada.txt /*compiler-vaxada*
compl-current insert.txt /*compl-current*
Expand Down
Loading