Check LSP capabilities before using them

This commit is contained in:
w0rp
2018-07-22 19:04:45 +01:00
parent 899b61c5cc
commit 6dc737cda1
13 changed files with 389 additions and 231 deletions

View File

@@ -23,15 +23,14 @@ Execute(Command formatting should be applied correctly for LSP linters):
\ 'executable': has('win32') ? 'cmd': 'true',
\ 'command': '%e --foo',
\ },
\ {->0}
\)
if has('win32')
AssertEqual
\ ['cmd', 'cmd /s/c "cmd --foo"', '/foo/bar'],
\ g:args[:2]
\ ['cmd', 'cmd /s/c "cmd --foo"', {}],
\ g:args
else
AssertEqual
\ ['true', [&shell, '-c', '''true'' --foo'], '/foo/bar'],
\ g:args[:2]
\ ['true', [&shell, '-c', '''true'' --foo'], {}],
\ g:args
endif