mirror of
				https://github.com/amix/vimrc
				synced 2025-10-31 14:43:35 +08:00 
			
		
		
		
	Updated plugins
This commit is contained in:
		| @ -1,13 +1,8 @@ | ||||
| " Author: w0rp <devw0rp@gmail.com> | ||||
| " Description: flake8 for python files | ||||
|  | ||||
| " remove in 2.0 | ||||
| " Support an old setting as a fallback. | ||||
| let s:deprecation_warning_echoed = 0 | ||||
| let s:default_options = get(g:, 'ale_python_flake8_args', '') | ||||
|  | ||||
| call ale#Set('python_flake8_executable', 'flake8') | ||||
| call ale#Set('python_flake8_options', s:default_options) | ||||
| call ale#Set('python_flake8_options', '') | ||||
| call ale#Set('python_flake8_use_global', get(g:, 'ale_use_global_executables', 0)) | ||||
| call ale#Set('python_flake8_change_directory', 1) | ||||
|  | ||||
| @ -40,12 +35,6 @@ function! ale_linters#python#flake8#VersionCheck(buffer) abort | ||||
| endfunction | ||||
|  | ||||
| function! ale_linters#python#flake8#GetCommand(buffer, version_output) abort | ||||
|     " remove in 2.0 | ||||
|     if exists('g:ale_python_flake8_args') && !s:deprecation_warning_echoed | ||||
|         execute 'echom ''Rename your g:ale_python_flake8_args setting to g:ale_python_flake8_options instead. Support for this will removed in ALE 2.0.''' | ||||
|         let s:deprecation_warning_echoed = 1 | ||||
|     endif | ||||
|  | ||||
|     let l:cd_string = ale#Var(a:buffer, 'python_flake8_change_directory') | ||||
|     \   ? ale#path#BufferCdString(a:buffer) | ||||
|     \   : '' | ||||
|  | ||||
| @ -30,6 +30,10 @@ endfunction | ||||
| function! ale_linters#python#prospector#Handle(buffer, lines) abort | ||||
|     let l:output = [] | ||||
|  | ||||
|     if empty(a:lines) | ||||
|         return [] | ||||
|     endif | ||||
|  | ||||
|     let l:prospector_error = json_decode(join(a:lines, '')) | ||||
|  | ||||
|     for l:error in l:prospector_error.messages | ||||
|  | ||||
							
								
								
									
										29
									
								
								sources_non_forked/ale/ale_linters/python/pyre.vim
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								sources_non_forked/ale/ale_linters/python/pyre.vim
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,29 @@ | ||||
| " Author: dsifford <dereksifford@gmail.com> | ||||
| " Description: A performant type-checker supporting LSP for Python 3 created by Facebook | ||||
|  | ||||
| call ale#Set('python_pyre_executable', 'pyre') | ||||
| call ale#Set('python_pyre_use_global', get(g:, 'ale_use_global_executables', 0)) | ||||
|  | ||||
| function! ale_linters#python#pyre#GetExecutable(buffer) abort | ||||
|     return ale#python#FindExecutable(a:buffer, 'python_pyre', ['pyre']) | ||||
| endfunction | ||||
|  | ||||
| function! ale_linters#python#pyre#GetCommand(buffer) abort | ||||
|     let l:executable = ale_linters#python#pyre#GetExecutable(a:buffer) | ||||
|  | ||||
|     let l:exec_args = l:executable =~? 'pipenv$' | ||||
|     \   ? ' run pyre persistent' | ||||
|     \   : ' persistent' | ||||
|  | ||||
|     return ale#Escape(l:executable) . l:exec_args | ||||
| endfunction | ||||
|  | ||||
| call ale#linter#Define('python', { | ||||
| \   'name': 'pyre', | ||||
| \   'lsp': 'stdio', | ||||
| \   'executable_callback': 'ale_linters#python#pyre#GetExecutable', | ||||
| \   'command_callback': 'ale_linters#python#pyre#GetCommand', | ||||
| \   'language': 'python', | ||||
| \   'project_root_callback': 'ale#python#FindProjectRoot', | ||||
| \   'completion_filter': 'ale#completion#python#CompletionItemFilter', | ||||
| \}) | ||||
		Reference in New Issue
	
	Block a user
	 Amir Salihefendic
					Amir Salihefendic