b25794e81b
Previously, elixir-ls would treat each sub-project within an umbrella as standalone, which isn't desirable from a language server perspective. Added ale#handlers#elixir#FindMixUmbrellaRoot, which locates the current project's root and then continues searching upwards for a potential umbrella project root. This literally looks just two levels up to keep things simple while keeping in line with Elixir project conventions. Use this new function to determine elixir-ls's LSP project root.
36 lines
1.1 KiB
Plaintext
36 lines
1.1 KiB
Plaintext
Before:
|
|
call ale#assert#SetUpLinterTest('elixir', 'elixir_ls')
|
|
|
|
let g:ale_has_override['win32'] = 0
|
|
|
|
After:
|
|
let g:ale_has_override = {}
|
|
|
|
call ale#assert#TearDownLinterTest()
|
|
|
|
Execute(should set correct defaults (unix)):
|
|
AssertLinter 'elixir-ls/language_server.sh', 'elixir-ls/language_server.sh'
|
|
|
|
Execute(should set correct defaults (win32)):
|
|
let g:ale_has_override['win32'] = 1
|
|
|
|
AssertLinter 'elixir-ls\language_server.bat', 'elixir-ls\language_server.bat'
|
|
|
|
Execute(should configure elixir-ls release location):
|
|
let b:ale_elixir_elixir_ls_release = 'boo'
|
|
|
|
AssertLinter 'boo/language_server.sh', 'boo/language_server.sh'
|
|
|
|
Execute(should set correct LSP values):
|
|
call ale#test#SetFilename('elixir_paths/umbrella_project/apps/app1/lib/app.ex')
|
|
|
|
AssertLSPLanguage 'elixir'
|
|
AssertLSPOptions {}
|
|
AssertLSPConfig {}
|
|
AssertLSPProject ale#path#Simplify(g:dir . '/elixir_paths/umbrella_project')
|
|
|
|
Execute(should accept configuration settings):
|
|
AssertLSPConfig {}
|
|
let b:ale_elixir_elixir_ls_config = {'elixirLS': {'dialyzerEnabled': v:false}}
|
|
AssertLSPConfig {'elixirLS': {'dialyzerEnabled': v:false}}
|