From 7d90ff56d96d601478f00895e009ae63a7d8b4bb Mon Sep 17 00:00:00 2001 From: w0rp Date: Tue, 8 Sep 2020 21:40:10 +0100 Subject: Close #3333 - Add an ALECompletePost event Add an `ALECompletePost` event along with everything needed to make it useful for its primary purpose: fixing code after inserting completions. * `ALEFix` can now be called with a bang (`!`) to suppress errors. * A new `ALELintStop` command lets you stop linting, and start it later. --- rplugin/python3/deoplete/sources/ale.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'rplugin/python3/deoplete/sources') diff --git a/rplugin/python3/deoplete/sources/ale.py b/rplugin/python3/deoplete/sources/ale.py index ae1f4039..82d9bbf2 100644 --- a/rplugin/python3/deoplete/sources/ale.py +++ b/rplugin/python3/deoplete/sources/ale.py @@ -49,12 +49,13 @@ class Source(Base): if event == 'Async': result = self.vim.call('ale#completion#GetCompletionResult') + return result or [] if context.get('is_refresh'): self.vim.command( - "call ale#completion#GetCompletions('ale-callback', " + \ - "{'callback': {completions -> deoplete#auto_complete() }})" + "call ale#completion#GetCompletions('ale-callback', " + + "{'callback': {completions -> deoplete#auto_complete() }})" ) return [] -- cgit v1.2.3