This repository has been archived on 2024-07-19. You can view files and clone it, but cannot push or open issues or pull requests.
ale/test/command_callback/test_ink_ls_command_callbacks.vader
Andrew Hayworth ab0bf61512 Add support for ink-language-server
This commit add support for ink-language-server, which it does by
largely copying and pasting from the pure-language-server PR that was
merged recently.

The most interesting things to note are:
- ink-language-server is distributed upstream via npm, which is why we
  search through node_modules
- With some coaxing, it can be installed globally - which is why we
  search for a global binary.
- Ink is a funky language, and users will likely need to add
  initialization options.
- I am not incredibly familiar with vimscript; and I may not have done
  some of the buffer searching correctly.
2019-08-07 16:35:12 -05:00

22 lines
675 B
Text

Before:
call ale#assert#SetUpLinterTest('ink', 'ls')
set ft=ink
After:
call ale#assert#TearDownLinterTest()
Execute(should set correct defaults):
AssertLinter 'ink-language-server', ale#Escape('ink-language-server') . ' --stdio'
Execute(should set correct LSP values):
call ale#test#SetFilename('ink_paths/story/main.ink')
AssertLSPLanguage 'ink'
AssertLSPOptions {}
AssertLSPConfig {}
AssertLSPProject ale#path#Simplify(g:dir . '/ink_paths/story')
Execute(should accept configuration settings):
AssertLSPConfig {}
let b:ale_ink_ls_initialization_options = {'ink': {'runThroughMono': v:true}}
AssertLSPOptions {'ink': {'runThroughMono': v:true}}