ale/test
Gerry Agbobada 3a3c244723 TUI / GUI tooltip with content from ALEHover (#1556)
* Guard the ballooneval settings

* Mark main objectives to do to get nice Hover

* Make tweaks to make the tooltip work - See " XXX: comments

* Guard balloon_show call

* Use return instead of finish for functions

* ale#hover#show : Add optional arguments to specify arbtirary position

This change is requested to be able to call the function with mouse
position to enable hover information in vim's balloon

* ale#ballon#Disable : Remove feature guards

* ale#balloon : Show 'ALEHover' output on balloon if no diagnostic found

* ale#hover#HandleLSPResponse : remove the check for cursor position

This check prevented the 'ALEHover in balloon' feature, since mouse
position is almost never cursor position.

* ale#balloon#MessageForPos : Change the return of balloonexpr

balloonexpr evaluation now works even without balloon_show for basic
diagnostics, leaving the balloon_show call to ale#hover#Show, which can
then feature guard the call to avoid errors

* ale#hover#Response : Feature guard balloon_show calls

* ale#hover : always display 'Hover' information in messages

Also add a small comment to warn readers the different outputs the
ale#hover#Show will write to

* {LSP,TS}Response : use only variables from the Response

It is clearer that we only rely on l:options to get the relevant data to
build the LSP Response string

* hover#ShowDetails : fix an issue where not having focus broke balloons

The issue was caused by not using a buffer-specific version of getline()
to cap the value of the column sent in the message to LSP. Therefore a
cursor on column 10 in an inactive window could send a message with
column=0, if the active window had a buffer with too few lines

* {LSP,TS}Response : Remove redundant checks for balloon_show call

With the upcoming change in ale_set_balloons default value (see Pull
Request w0rp/ale#1565), this check will be useless

* balloonexpr? : Add a flag to separate hover#Show() calls

The goal of this flag is to make `:ALEHover` calls not pop a balloon
under the cursor, since the user has probably no interest in their
cursor while typing the command

The flag is a default argument which is overridden only in ballonexpr
call of ale#hover#Show, and stays set in the hover_map until the
callback for the LSP handles it.

There are no automated tests for this feature right now, and the nature
of the addition (one optional argument in the API) should make it
transparent to existing tests.

Since the differentiation is now possible, the check for moved cursor
has been put back in ale#hover#HandleLSPResponse

* ale#hover#hover_map : Protect accesses to hover_map

Using get() is safer than trying to access directly with ., as the tests
show.

* Raise timeout to try to get Appveyor happy

* Review : Fix comments

* Review : pass the optional argument 'called_from_balloonexpr' in a Dict

This optional dictionary has documentation just before the function
using it, ale#hover#Show, and allows easier extension in the future.
2018-05-16 21:23:48 +01:00
..
.config/nvim Run all tests in NeoVim, improve the test script, and make all tests pass for NeoVim 2017-05-12 20:38:52 +01:00
command_callback Fixed handle test for Windows 2018-05-04 23:04:45 +02:00
completion Add g:ale_completion_excluded_words for completion filtering 2018-05-03 11:17:41 +01:00
csslint-test-files Fix #260 automatically set .csslintrc files from ancestor directories 2017-03-29 00:56:39 +01:00
cucumber_fixtures/features Add cucumber checker for cucumber files 2018-04-20 22:54:29 -04:00
elixir-test-files new fixer elixir mix format 2017-10-22 19:20:38 -04:00
elm-test-files Elm local install support (#915) 2017-09-10 12:58:42 +01:00
eslint-test-files Fix #923 Use package.json as a last resort for eslint --fix 2017-09-12 09:10:37 +01:00
fix Add tests for ALEFix commandline parameters 2018-04-18 02:13:24 +02:00
fixers add perltidy fixer 2018-04-21 22:09:38 +09:00
flow Fix #246 Don't run flow if there's no .flowconfig 2017-02-10 22:47:56 +00:00
go_files Go: Add gotype support (#1099) 2018-01-07 12:11:01 +00:00
gradle-test-files Kotlin and general Gradle support. (#745) 2017-07-10 23:03:36 +01:00
hack_files Add hackfmt fixer 2017-10-27 13:42:55 -07:00
hamllint-test-files force add test fixtures for hamllint 2017-10-25 21:35:24 +02:00
handler Fix #1584 - Make duplicate msgfmt messages easier to navigate 2018-05-15 18:01:49 +01:00
javascript_files added importjs fixer 2017-12-05 00:37:31 +09:00
json_files Support fixing JSON files with fixjson 2018-01-24 10:36:31 +00:00
lsp Close #1428 Implement LSP hover-like functionality for tsserver too 2018-04-26 21:54:11 +01:00
phpcs-test-files Fix some escaping and make some tests set filenames consistently 2017-06-21 22:33:34 +01:00
prettier-test-files Add 'prettier' fixer support to TypeScript, CSS, SCSS and JSON (#910) 2017-09-06 15:21:26 +01:00
reasonml_files refmt fixer for ReasonML 2017-10-29 21:48:28 +01:00
ruby_fixtures [eruby] Add GetCommand to erb linter 2017-11-12 23:33:30 -05:00
rust_files add rustfmt fixer 2017-10-21 12:31:49 -05:00
script Update run-tests to make use of /usr/bin/env (#1548) 2018-05-01 13:18:03 +01:00
sign Make one of the sign tests work in all locales 2017-10-25 22:35:21 +01:00
slimlint-test-files slimlint: Search for .rubocop.yml and use it 2017-09-15 18:56:59 +02:00
smlnj Detect and use CM files for smlnj (#884) 2017-09-03 19:56:14 +01:00
test_c_projects Added additional unit tests + adapted review comments #1167 2018-03-21 20:44:35 +01:00
tflint-test-files/foo Add tflint fot Terraform 2017-10-26 19:37:04 +01:00
top Improve mypy handling a little bit more 2017-01-20 17:30:34 +00:00
util Fix more random Windows test issues 2017-09-09 18:03:34 +01:00
smoke_test.vader TUI / GUI tooltip with content from ALEHover (#1556) 2018-05-16 21:23:48 +01:00
test_ale_info.vader #1278 Allow linters to be defined pretty much anywhere 2018-04-24 21:48:33 +01:00
test_ale_lint_command.vader Get all tests to pass on Windows 2017-10-23 23:09:40 +01:00
test_ale_toggle.vader Fix condition to test a balloon feature 2018-05-11 19:07:16 +09:00
test_ale_var.vader #591 Store buffer variables when fixing filess, and read them back in ale#Var 2017-05-30 22:15:24 +01:00
test_alejobstarted_autocmd.vader Add test for ALEJobStarted 2018-04-27 22:00:50 -07:00
test_alelint_autocmd.vader Close #1379 - Increment b:ale_linted when a buffer is checked 2018-03-03 16:22:56 +00:00
test_autocmd_commands.vader Move autocmd commands out of the toggle file, to improve load times 2018-04-23 10:16:48 +01:00
test_backwards_compatibility.vader Rename g:ale_linters_sh_* to g:ale_sh_* 2017-04-30 22:38:28 +02:00
test_balloon_messages.vader Close #1494 - Prefer displaying higher severity problems for cursor messages, balloons, and highlights 2018-04-10 21:05:22 +01:00
test_c_import_paths.vader #1167 Use the make -n parsing for C++ compilers, and document the new option 2018-03-27 19:24:22 +01:00
test_c_parse_makefile.vader Extended unit tests + simplified parsing algoritme #1167 2018-03-27 10:18:24 +02:00
test_checkingbuffer_autocmd.vader Add some tests for IsCheckingBuffer 2018-04-28 14:50:20 -07:00
test_cleanup.vader Clean up ALE linter buffer data when buffers are deleted, not unloaded 2017-12-19 15:35:57 +00:00
test_command_chain.vader Get all tests to pass on Windows 2017-10-23 23:09:40 +01:00
test_conflicting_plugin_warnings.vader Run all tests in NeoVim, improve the test script, and make all tests pass for NeoVim 2017-05-12 20:38:52 +01:00
test_csslint_config_detection.vader Fix the mscs tests on Windows, and use the improved Simplify for all tests instead. 2017-12-19 18:23:09 +00:00
test_cursor_warnings.vader Close #1494 - Prefer displaying higher severity problems for cursor messages, balloons, and highlights 2018-04-10 21:05:22 +01:00
test_disabling_ale.vader Fix #577 Add an option preventing linting of large files 2017-05-26 21:21:15 +01:00
test_dockerfile_hadolint_linter.vader Added tests for hadolint 2018-01-29 22:21:50 +01:00
test_elm_executable_detection.vader Fix the mscs tests on Windows, and use the improved Simplify for all tests instead. 2017-12-19 18:23:09 +00:00
test_engine_invocation.vader Fix #315 Implement the read_buffer option 2017-02-09 23:32:57 +00:00
test_engine_lsp_response_handling.vader Cover the Rust LSP with tests, allow LSP linters to be named anything, and rename the Rust LSP linter to rls 2017-08-02 23:21:30 +01:00
test_errors_removed_after_filetype_changed.vader Get all tests to pass on Windows 2017-10-23 23:09:40 +01:00
test_eslint_executable_detection.vader Fix the mscs tests on Windows, and use the improved Simplify for all tests instead. 2017-12-19 18:23:09 +00:00
test_filetype_linter_defaults.vader Fix #1128 - Add g:ale_linters_explicit for only enabling linters explicitly 2017-11-14 19:55:46 +00:00
test_filetype_mapping.vader #283 Fix linting buffers with no filename, by creating a filename with a guess for the file extension 2017-02-13 10:36:38 +00:00
test_find_nearest_directory.vader Fix the mscs tests on Windows, and use the improved Simplify for all tests instead. 2017-12-19 18:23:09 +00:00
test_find_references.vader Add support for finding references using LSP servers or tsserver 2018-04-22 19:49:30 +01:00
test_flow_command.vader Close #1504 - Add an option for removing --respect-pragma for flow 2018-04-15 12:25:15 +01:00
test_format_command.vader Get more of the tests to pass on Windows 2017-10-23 01:26:31 +01:00
test_format_temporary_file_creation.vader Get more of the tests to pass on Windows 2017-10-23 01:26:31 +01:00
test_function_arg_count.vader Move all functions for fixing things to autoload/ale/fixers, and only accept the lines of input where needed. 2017-06-07 14:02:29 +01:00
test_fuzzy_json_decode.vader Fix #988 - Support --fix-dry-run for ESLint by processing the JSON output 2017-11-22 23:23:14 +00:00
test_get_abspath.vader Fix #1210 - Fix a Windows path issue which broke TSLint 2017-12-18 13:27:59 +00:00
test_get_loclist.vader Merge everything into the one global map. 2016-10-24 20:21:42 +01:00
test_getmatches.vader Add a function for getting matches, and use it to simplify a lot of code 2017-04-18 00:35:53 +01:00
test_go_to_definition.vader Implement a preview window for selecting locations to open 2018-04-22 15:53:01 +01:00
test_gradle_build_classpath_command.vader Fix the mscs tests on Windows, and use the improved Simplify for all tests instead. 2017-12-19 18:23:09 +00:00
test_gradle_find_executable.vader Fix the mscs tests on Windows, and use the improved Simplify for all tests instead. 2017-12-19 18:23:09 +00:00
test_gradle_find_project_root.vader Fix the mscs tests on Windows, and use the improved Simplify for all tests instead. 2017-12-19 18:23:09 +00:00
test_highlight_placement.vader Fix #741 - Set highlights for entire lines when signs are disabled 2017-11-17 14:29:57 +00:00
test_highlight_position_chunking.vader Fix #604 - Support highlights spanning many lines 2017-05-31 13:14:39 +01:00
test_history_saving.vader Fix #1298 - Escape commands for PowerShell 2018-01-17 18:08:17 +00:00
test_hover.vader Close #1428 Implement LSP hover-like functionality for tsserver too 2018-04-26 21:54:11 +01:00
test_line_join.vader Fix #1251 - Handle an empty list in the line callback when NeoVim crashes 2017-12-26 18:15:59 +00:00
test_lint_error_delay.vader #1497 Tolerate important ALE variables being undefined for some reason when viewing buffers like git commits 2018-04-12 20:31:45 +01:00
test_lint_file_linters.vader #857 - Add b:ale_fix_on_save for controlling fixing on save for specific buffers 2017-10-30 22:19:57 +00:00
test_lint_on_enter_when_file_changed.vader Get more of the tests to pass on Windows 2017-10-23 01:26:31 +01:00
test_lint_on_filetype_changed.vader #505 - Do not lint files on enter if the option for linting when the filetype changed is on 2017-09-02 16:57:01 +01:00
test_linter_defintion_processing.vader Close #1521 - Allow the language to be set with simple strings for LSP linters 2018-04-27 22:52:11 +01:00
test_linter_retrieval.vader #1278 Allow linters to be defined pretty much anywhere 2018-04-24 21:48:33 +01:00
test_linter_type_mapping.vader Fix #536 - Implement linter problem type re-mapping 2017-06-14 17:59:13 +01:00
test_linting_blacklist.vader Fix ALEInfo and some test issues 2017-05-27 23:51:27 +01:00
test_linting_updates_loclist.vader Fix some random test issues for Windows 2017-09-11 00:47:27 +01:00
test_list_formatting.vader Make the message formats configurable with buffer local variables 2017-11-19 23:44:09 +00:00
test_list_opening.vader Option to open lists vertically (#1381) 2018-03-02 20:22:29 +00:00
test_list_titles.vader Fix the mscs tests on Windows, and use the improved Simplify for all tests instead. 2017-12-19 18:23:09 +00:00
test_load_all_linters.vader #427 Implement buffer variable overrides for all linter options 2017-04-16 01:24:08 +01:00
test_loclist_binary_search.vader Close #1494 - Prefer displaying higher severity problems for cursor messages, balloons, and highlights 2018-04-10 21:05:22 +01:00
test_loclist_corrections.vader Fix #605 - Support vcol: 1 for multi-byte character positions 2018-04-08 17:17:46 +01:00
test_loclist_jumping.vader Close #1494 - Prefer displaying higher severity problems for cursor messages, balloons, and highlights 2018-04-10 21:05:22 +01:00
test_loclist_sorting.vader Close #1494 - Prefer displaying higher severity problems for cursor messages, balloons, and highlights 2018-04-10 21:05:22 +01:00
test_nearest_file_search.vader Fix the mscs tests on Windows, and use the improved Simplify for all tests instead. 2017-12-19 18:23:09 +00:00
test_no_linting_on_write_quit.vader Get more tests to pass on Windows 2017-10-18 23:42:51 +01:00
test_path_equality.vader Fix the mscs tests on Windows, and use the improved Simplify for all tests instead. 2017-12-19 18:23:09 +00:00
test_path_upwards.vader Fix #1210 - Fix a Windows path issue which broke TSLint 2017-12-18 13:27:59 +00:00
test_path_uri.vader #1149 Fix conversion from URIs to filenames on Windows 2017-11-20 00:02:33 +00:00
test_pattern_options.vader #1095 Cache the sorting of patterns for g:ale_pattern_options 2017-11-12 10:56:53 +00:00
test_phpcs_executable_detection.vader Fix the mscs tests on Windows, and use the improved Simplify for all tests instead. 2017-12-19 18:23:09 +00:00
test_phpcs_include_code.vader Add test for phpcs error code 2017-10-26 12:22:34 -04:00
test_prepare_command.vader Fix #1495 - Fall back to /bin/sh when shell=pwsh 2018-04-12 21:01:35 +01:00
test_python_virtualenv.vader Add a test to ensure $VIRTUAL_ENV is respected. 2017-10-11 13:42:38 -07:00
test_quickfix_deduplication.vader Close #1494 - Prefer displaying higher severity problems for cursor messages, balloons, and highlights 2018-04-10 21:05:22 +01:00
test_quitting_variable.vader #904 - Allow linting to run on save a second after :q fails 2017-10-17 00:37:29 +01:00
test_regex_escaping.vader #756 Escape the paths used for the --include parameter for gometalinter, which uses RE2 2017-07-11 23:47:21 +01:00
test_resolve_local_path.vader Fix the mscs tests on Windows, and use the improved Simplify for all tests instead. 2017-12-19 18:23:09 +00:00
test_results_not_cleared_when_opening_loclist.vader Fix some random test issues for Windows 2017-09-11 00:47:27 +01:00
test_sandbox_execution.vader Fix issues with running individual tests, and get the Vim tests to run on certain machines again 2017-07-09 14:58:21 +01:00
test_semver_utils.vader Simplfy semver handling and share the semver version cache across everything 2017-11-09 23:42:54 +00:00
test_set_list_timers.vader Fix #899 - Make the quickfix and loclist windows close again 2017-09-03 19:44:00 +01:00
test_setting_loclist_from_another_buffer.vader #653 Collect items for quickfix from all buffers, and de-duplicate them. Set filename items in quickfix and loclist. 2017-08-19 14:28:51 +01:00
test_setting_problems_found_in_previous_buffers.vader #653 Set loclists better when taking data from previous buffers 2017-08-22 22:45:55 +01:00
test_shell_detection.vader Fix #1051 - Support ash and dash for shellcheck and the sh linter 2017-10-26 21:21:42 +01:00
test_should_do_nothing_conditions.vader #1497 Tolerate important ALE variables being undefined for some reason when viewing buffers like git commits 2018-04-12 20:31:45 +01:00
test_sml_command.vader Fix the mscs tests on Windows, and use the improved Simplify for all tests instead. 2017-12-19 18:23:09 +00:00
test_statusline.vader Fix typos 2017-10-03 01:11:54 +09:00
test_temporary_file_management.vader Get some more random tests to work on Windows 2017-09-08 21:51:49 +01:00
test_tflint_config_detection.vader Fix the mscs tests on Windows, and use the improved Simplify for all tests instead. 2017-12-19 18:23:09 +00:00
test_tmpdir_init.vader Get some more random tests to work on Windows 2017-09-08 21:51:49 +01:00
test_verilog_verilator_options.vader Adds an option to pass additional arguments to the verilog/verilator … (#698) 2017-06-29 09:15:52 +01:00
test_vim8_processid_parsing.vader Refactor jobs into a Vim version agnostic API which can be used for other purposes 2017-05-12 21:16:15 +01:00
test_windows_escaping.vader Fix #549 - escape strings more appropriately for use with cmd /c 2017-05-26 00:06:16 +01:00
test_wrap_comand.vader Fix a command wrapper test on Windows 2018-01-17 18:11:20 +00:00
test_writefile_function.vader Fix #823 - Write Windows files with CRLF 2017-08-05 20:17:25 +01:00
vimrc execute the set encoding test setting to get Vint to shut up 2017-09-09 18:22:59 +01:00