mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-06 12:44:23 +08:00
Lazy-load LSP linters, and check b:changedtick before notifying about changes
This commit is contained in:
@@ -11,12 +11,18 @@ Before:
|
||||
runtime autoload/ale/lsp.vim
|
||||
runtime autoload/ale/util.vim
|
||||
|
||||
function! ale#linter#StartLSP(buffer, linter, callback) abort
|
||||
function! ale#lsp_linter#StartLSP(buffer, linter, callback) abort
|
||||
let g:Callback = a:callback
|
||||
|
||||
let l:conn = ale#lsp#NewConnection({})
|
||||
let l:conn.id = 347
|
||||
let l:conn.open_documents = {a:buffer : -1}
|
||||
|
||||
return {
|
||||
\ 'buffer': a:buffer,
|
||||
\ 'connection_id': 347,
|
||||
\ 'project_root': '/foo/bar',
|
||||
\ 'language_id': 'python',
|
||||
\}
|
||||
endfunction
|
||||
|
||||
@@ -31,6 +37,7 @@ Before:
|
||||
endfunction
|
||||
|
||||
After:
|
||||
call ale#lsp#RemoveConnectionWithID(347)
|
||||
call ale#definition#SetMap({})
|
||||
call ale#test#RestoreDirectory()
|
||||
call ale#linter#Reset()
|
||||
|
||||
Reference in New Issue
Block a user