mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-06 12:44:23 +08:00
Merge pull request #2378 from antew/feature/elm-lsp-linter
Elm: Support for elm-lsp
This commit is contained in:
29
test/command_callback/test_elm_lsp_command_callbacks.vader
Normal file
29
test/command_callback/test_elm_lsp_command_callbacks.vader
Normal file
@@ -0,0 +1,29 @@
|
||||
Before:
|
||||
call ale#assert#SetUpLinterTest('elm', 'elm_lsp')
|
||||
|
||||
After:
|
||||
call ale#assert#TearDownLinterTest()
|
||||
|
||||
Execute(The default executable path should be correct):
|
||||
call ale#test#SetFilename('../elm-test-files/newapp/src/Main.elm')
|
||||
|
||||
AssertLinter 'elm-lsp', ale#Escape('elm-lsp') . ' --stdio'
|
||||
|
||||
Execute(The project root should be detected correctly):
|
||||
AssertLSPProject ''
|
||||
|
||||
call ale#test#SetFilename('../elm-test-files/newapp/src/Main.elm')
|
||||
|
||||
AssertLSPProject ale#path#Simplify(g:dir . '/../elm-test-files/newapp')
|
||||
|
||||
Execute(Should let users configure a global executable and override local paths):
|
||||
call ale#test#SetFilename('../elm-test-files/newapp/src/Main.elm')
|
||||
|
||||
let g:ale_elm_lsp_executable = '/path/to/custom/elm-lsp'
|
||||
let g:ale_elm_lsp_use_global = 1
|
||||
|
||||
AssertLinter '/path/to/custom/elm-lsp',
|
||||
\ ale#Escape('/path/to/custom/elm-lsp') . ' --stdio'
|
||||
|
||||
Execute(The language should be correct):
|
||||
AssertLSPLanguage 'elm'
|
||||
Reference in New Issue
Block a user