From e5d9872b95ee0d8c844e12e656f30b8b155b904d Mon Sep 17 00:00:00 2001 From: Ivar Fatland Date: Mon, 15 Jun 2026 12:02:12 +0200 Subject: [PATCH] swap pyright to basedpyright --- nvim/.config/nvim/compiler/basedpyright.vim | 15 +++++++++++++ nvim/.config/nvim/compiler/pyright.vim | 25 --------------------- nvim/.config/nvim/init.lua | 2 +- 3 files changed, 16 insertions(+), 26 deletions(-) create mode 100644 nvim/.config/nvim/compiler/basedpyright.vim delete mode 100644 nvim/.config/nvim/compiler/pyright.vim diff --git a/nvim/.config/nvim/compiler/basedpyright.vim b/nvim/.config/nvim/compiler/basedpyright.vim new file mode 100644 index 0000000..277806c --- /dev/null +++ b/nvim/.config/nvim/compiler/basedpyright.vim @@ -0,0 +1,15 @@ +if exists("current_compiler") | finish | endif +let current_compiler = "basedpyright" +let s:cpo_save = &cpo +set cpo&vim + +CompilerSet makeprg=basedpyright +CompilerSet errorformat= + \%E%f:%l:%c\ -\ error:\ %m, + \%W%f:%l:%c\ -\ warning:\ %m, + \%N%f:%l:%c\ -\ note:\ %m, + \%C[\ \t]\ %.%#, + \%-G%.%# + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/nvim/.config/nvim/compiler/pyright.vim b/nvim/.config/nvim/compiler/pyright.vim deleted file mode 100644 index eef6a9e..0000000 --- a/nvim/.config/nvim/compiler/pyright.vim +++ /dev/null @@ -1,25 +0,0 @@ -" Vim compiler file -" Compiler: Pyright (Python Type Checker) -" Maintainer: @konfekt -" Last Change: 2025 Feb 7 - -if exists("current_compiler") | finish | endif -let current_compiler = "pyright" - -let s:cpo_save = &cpo -set cpo&vim - -" CompilerSet makeprg=pyright -" CompilerSet makeprg=basedpyright -exe 'CompilerSet makeprg=' .. escape( - \ get(b:, 'pyright_makeprg', get(g:, 'pyright_makeprg', 'pyright')), - \ ' \|"') -CompilerSet errorformat= - \%E%f:%l:%c\ -\ error:\ %m, - \%W%f:%l:%c\ -\ warning:\ %m, - \%N%f:%l:%c\ -\ note:\ %m, - \%C[\ \t]\ %.%#, - \%-G%.%# - -let &cpo = s:cpo_save -unlet s:cpo_save diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua index 5c10f46..e88c609 100644 --- a/nvim/.config/nvim/init.lua +++ b/nvim/.config/nvim/init.lua @@ -345,7 +345,7 @@ end do local compiler_mapping = { dotnet={'*.csproj', '*.sln'}, - pyright={'requirements.txt', 'pyproject.toml'}, + basedpyright={'requirements.txt', 'pyproject.toml'}, go={'go.mod'}, gcc={'*.c'}, ['g++']={'*.cpp'},