summaryrefslogtreecommitdiff
path: root/test/test_ale_info.vader
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2019-01-26 04:45:12 +0000
committerbrian m. carlson <sandals@crustytoothpaste.net>2019-01-26 04:46:41 +0000
commit6fc016ad052725e0d6a474e80f817cb1853e98e2 (patch)
tree974a57185079982a6ccb8565155909fa2f127d26 /test/test_ale_info.vader
parent766636e0c436d8508ae45c51df9229745b4d05d1 (diff)
downloadale-6fc016ad052725e0d6a474e80f817cb1853e98e2.zip
Add additional ways to detect LSP project root
Currently, we detect the linter root based on a variety of techniques. However, these techniques are not foolproof. For example, clangd works fine for many things without a compile_commands.json file, and Go projects may be built outside of the GOPATH to take advantage of Go 1.11's automatic module support. Add global and buffer-specific variables to allow the user to specify the root, either as a string or a funcref. Make the funcrefs accept the buffer number as an argument to make sure that they can function easily in an asynchronous environment. We define the global variable in the main plugin, since the LSP linter code is not loaded unless required, and we want the variable to be able to be read correctly by :ALEInfo regardless.
Diffstat (limited to 'test/test_ale_info.vader')
-rw-r--r--test/test_ale_info.vader1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/test_ale_info.vader b/test/test_ale_info.vader
index 325c2aa8..29c19b8e 100644
--- a/test/test_ale_info.vader
+++ b/test/test_ale_info.vader
@@ -97,6 +97,7 @@ Before:
\ 'let g:ale_list_vertical = 0',
\ 'let g:ale_list_window_size = 10',
\ 'let g:ale_loclist_msg_format = ''%code: %%s''',
+ \ 'let g:ale_lsp_root = {}',
\ 'let g:ale_max_buffer_history_size = 20',
\ 'let g:ale_max_signs = -1',
\ 'let g:ale_maximum_file_size = 0',