Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Completion dropdown constantly reappears after selecting an option #1041

Closed
dylanpyle opened this issue Oct 23, 2017 · 4 comments
Closed

Completion dropdown constantly reappears after selecting an option #1041

dylanpyle opened this issue Oct 23, 2017 · 4 comments
Labels

Comments

@dylanpyle
Copy link

With ale_completion_enabled and no other settings changed, the completion dropdown automatically appears as I'm typing, and selects the first option every time I press Enter. However, the completion dropdown appears again almost immediately afterwards, so it's impossible to actually insert a newline unless you press Enter twice in very rapid succession.

This makes it really hard to write code given that the autocomplete results appear automatically and I'm not necessarily anticipating them every time I need to insert a new line.

Here's a video - whenever you see the menu flash, I'm pressing enter: https://cloudup.com/c8TXp9UnAIm+

If this is intentional behavior, I'd love to know either (a) how to disable it or (b) how to only show autocomplete results when I press Tab.

ALEInfo
 Current Filetype: typescript
Available Linters: ['eslint', 'tslint', 'tsserver', 'typecheck']
  Enabled Linters: ['eslint', 'tslint', 'tsserver', 'typecheck']
 Linter Variables:

let g:ale_typescript_tslint_config_path = ''
let g:ale_typescript_tslint_executable = 'tslint'
let g:ale_typescript_tslint_ignore_empty_files = 0
let g:ale_typescript_tslint_rules_dir = ''
let g:ale_typescript_tslint_use_global = 0
let g:ale_typescript_tsserver_config_path = ''
let g:ale_typescript_tsserver_executable = 'tsserver'
let g:ale_typescript_tsserver_use_global = 0
Global Variables:

let g:ale_echo_cursor = 1
let g:ale_echo_msg_error_str = 'Error'
let g:ale_echo_msg_format = '%s'
let g:ale_echo_msg_warning_str = 'Warning'
let g:ale_enabled = 1
let g:ale_fix_on_save = 0
let g:ale_fixers = {}
let g:ale_keep_list_window_open = 0
let g:ale_lint_delay = 200
let g:ale_lint_on_enter = 1
let g:ale_lint_on_save = 1
let g:ale_lint_on_text_changed = 'always'
let g:ale_linter_aliases = {}
let g:ale_linters = {}
let g:ale_open_list = 0
let g:ale_set_highlights = 1
let g:ale_set_loclist = 1
let g:ale_set_quickfix = 0
let g:ale_set_signs = 1
let g:ale_sign_column_always = 0
let g:ale_sign_error = '>>'
let g:ale_sign_offset = 1000000
let g:ale_sign_warning = '--'
let g:ale_statusline_format = ['%d error(s)', '%d warning(s)', 'OK']
let g:ale_warn_about_trailing_whitespace = 1
Command History:

(started) ['/bin/zsh', '-c', 'cd ''/Users/dylan/dev/cala/studio/src/redux/options'' && /Users/dylan/dev/cala/studio/node_modules/.bin/tslint --format json -c ''/Users/dylan/dev/cala/studio/tslint.json'' ''/var/folders/1s/jy19st5d3cx8tzdz0zymzv4m0000gn/T/vGsnikX/72/reducer.ts''']
(executable check - failure) typecheck
(executable check - failure) eslint
(started) ['/bin/zsh', '-c', 'cd ''/Users/dylan/dev/cala/studio/src/redux/options'' && /Users/dylan/dev/cala/studio/node_modules/.bin/tslint --format json -c ''/Users/dylan/dev/cala/studio/tslint.json'' ''/var/folders/1s/jy19st5d3cx8tzdz0zymzv4m0000gn/T/vGsnikX/73/reducer.ts''']
(executable check - failure) typecheck
(executable check - failure) eslint
(started) ['/bin/zsh', '-c', 'cd ''/Users/dylan/dev/cala/studio/src/redux/options'' && /Users/dylan/dev/cala/studio/node_modules/.bin/tslint --format json -c ''/Users/dylan/dev/cala/studio/tslint.json'' ''/var/folders/1s/jy19st5d3cx8tzdz0zymzv4m0000gn/T/vGsnikX/74/reducer.ts''']
(executable check - failure) typecheck
(executable check - failure) eslint
(finished - exit code 0) ['/bin/zsh', '-c', 'cd ''/Users/dylan/dev/cala/studio/src/redux/options'' && /Users/dylan/dev/cala/studio/node_modules/.bin/tslint --format json -c ''/Users/dylan/dev/cala/studio/tslint.json'' ''/var/folders/1s/jy19st5d3cx8tzdz0zymzv4m0000gn/T/vGsnikX/75/reducer.ts''']

<<>>
[]
<<>>

(executable check - failure) typecheck
(executable check - failure) eslint
(finished - exit code 0) ['/bin/zsh', '-c', 'cd ''/Users/dylan/dev/cala/studio/src/redux/options'' && /Users/dylan/dev/cala/studio/node_modules/.bin/tslint --format json -c ''/Users/dylan/dev/cala/studio/tslint.json'' ''/var/folders/1s/jy19st5d3cx8tzdz0zymzv4m0000gn/T/vGsnikX/76/reducer.ts''']

<<>>
[]
<<>>

(executable check - failure) typecheck
(executable check - failure) eslint
(finished - exit code 0) ['/bin/zsh', '-c', 'cd ''/Users/dylan/dev/cala/studio/src/redux/options'' && /Users/dylan/dev/cala/studio/node_modules/.bin/tslint --format json -c ''/Users/dylan/dev/cala/studio/tslint.json'' ''/var/folders/1s/jy19st5d3cx8tzdz0zymzv4m0000gn/T/vGsnikX/77/reducer.ts''']

<<>>
[]
<<>>

(executable check - failure) typecheck
(executable check - failure) eslint
(finished - exit code 0) ['/bin/zsh', '-c', 'cd ''/Users/dylan/dev/cala/studio/src/redux/options'' && /Users/dylan/dev/cala/studio/node_modules/.bin/tslint --format json -c ''/Users/dylan/dev/cala/studio/tslint.json'' ''/var/folders/1s/jy19st5d3cx8tzdz0zymzv4m0000gn/T/vGsnikX/78/reducer.ts''']

<<>>
[]
<<>>

(executable check - failure) typecheck

@w0rp w0rp added the bug label Oct 24, 2017
@w0rp
Copy link
Member

w0rp commented Oct 24, 2017

Hey! Someone else actually tried the completion support I added.

I hadn't hit that bug myself, but I can repeat it. The problem occurs if you don't select anything for completion, and hit Return. If you select an item with Tab and then press Return, then the menu goes away.

@dylanpyle
Copy link
Author

dylanpyle commented Oct 24, 2017

Someone else actually tried the completion support I added

Yes! And very happy to have found something faster than tsuquyomi (in fact, your comment here led me to Ale). Thanks for your work on this!

@w0rp w0rp closed this as completed in 6490d3a Oct 26, 2017
@w0rp
Copy link
Member

w0rp commented Oct 26, 2017

This should be fixed now. Now ALE doesn't ask for completions shortly after CompleteDone.

@w0rp
Copy link
Member

w0rp commented Nov 26, 2017

I have updated the fix for this. Before it would wait 100ms before requesting completions again. Now it doesn't ask for completions again if the cursor hasn't moved. This makes it so you can type Boolean, hit return, then quickly type . to get the completions again, without the menu re-appearing in an annoying way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants