From 2f181658e6e40798c74e2f58067ab3aeffab8224 Mon Sep 17 00:00:00 2001 From: Bartek thindil Jasicki Date: Fri, 18 Oct 2019 18:26:08 +0200 Subject: [PATCH] rename command variable to *_adals_* instead of *_lsp_* and whole name to adals instead of adalsp --- ale_linters/ada/adals.vim | 16 ++++++++++++++++ ale_linters/ada/adalsp.vim | 16 ---------------- doc/ale-ada.txt | 4 ++-- .../test_adals_command_callbacks.vader | 9 +++++++++ .../test_adalsp_command_callbacks.vader | 9 --------- 5 files changed, 27 insertions(+), 27 deletions(-) create mode 100644 ale_linters/ada/adals.vim delete mode 100644 ale_linters/ada/adalsp.vim create mode 100644 test/command_callback/test_adals_command_callbacks.vader delete mode 100644 test/command_callback/test_adalsp_command_callbacks.vader diff --git a/ale_linters/ada/adals.vim b/ale_linters/ada/adals.vim new file mode 100644 index 00000000..354156f0 --- /dev/null +++ b/ale_linters/ada/adals.vim @@ -0,0 +1,16 @@ +" Author: Bartek Jasicki http://github.com/thindil +" Description: Support for Ada Language Server + +call ale#Set('ada_adals_executable', 'ada_language_server') + +function! ale_linters#ada#adals#GetRootDirectory(buffer) abort + return fnamemodify(bufname(a:buffer), ':p:h') +endfunction + +call ale#linter#Define('ada', { +\ 'name': 'adals', +\ 'lsp': 'stdio', +\ 'executable': {b -> ale#Var(b, 'ada_adals_executable')}, +\ 'command': '%e', +\ 'project_root': function('ale_linters#ada#adals#GetRootDirectory'), +\}) diff --git a/ale_linters/ada/adalsp.vim b/ale_linters/ada/adalsp.vim deleted file mode 100644 index 10c4be07..00000000 --- a/ale_linters/ada/adalsp.vim +++ /dev/null @@ -1,16 +0,0 @@ -" Author: Bartek Jasicki http://github.com/thindil -" Description: Support for Ada Language Server - -call ale#Set('ada_lsp_executable', 'ada_language_server') - -function! ale_linters#ada#adalsp#GetRootDirectory(buffer) abort - return fnamemodify(bufname(a:buffer), ':p:h') -endfunction - -call ale#linter#Define('ada', { -\ 'name': 'adalsp', -\ 'lsp': 'stdio', -\ 'executable': {b -> ale#Var(b, 'ada_lsp_executable')}, -\ 'command': '%e', -\ 'project_root': function('ale_linters#ada#adalsp#GetRootDirectory'), -\}) diff --git a/doc/ale-ada.txt b/doc/ale-ada.txt index 4ffce5b7..1a31c804 100644 --- a/doc/ale-ada.txt +++ b/doc/ale-ada.txt @@ -35,8 +35,8 @@ g:ale_ada_gnatpp_options *g:ale_ada_gnatpp_options* =============================================================================== ada-language-server *ale-ada-language-server* -g:ale_ada_lsp_executable *g:ale_ada_lsp_executable* - *b:ale_ada_lsp_executable* +g:ale_ada_adals_executable *g:ale_ada_adals_executable* + *b:ale_ada_adals_executable* Type: |String| Default: `'ada_language_server'` diff --git a/test/command_callback/test_adals_command_callbacks.vader b/test/command_callback/test_adals_command_callbacks.vader new file mode 100644 index 00000000..0b1f6006 --- /dev/null +++ b/test/command_callback/test_adals_command_callbacks.vader @@ -0,0 +1,9 @@ +Before: + call ale#assert#SetUpLinterTest('ada', 'adals') + +After: + call ale#assert#TearDownLinterTest() + +Execute(Sets adals executable): + let g:ale_ada_adals_executable = '/path/to /Ada' + AssertLinter '/path/to /Ada', ale#Escape('/path/to /Ada') diff --git a/test/command_callback/test_adalsp_command_callbacks.vader b/test/command_callback/test_adalsp_command_callbacks.vader deleted file mode 100644 index e635acb3..00000000 --- a/test/command_callback/test_adalsp_command_callbacks.vader +++ /dev/null @@ -1,9 +0,0 @@ -Before: - call ale#assert#SetUpLinterTest('ada', 'adalsp') - -After: - call ale#assert#TearDownLinterTest() - -Execute(Sets adalsp executable): - let g:ale_ada_lsp_executable = '/path/to /Ada' - AssertLinter '/path/to /Ada', ale#Escape('/path/to /Ada')