dense-analysis / dense-analysis/ale

Vim exits insert mode when using snippent and loclist is open

Open
#3,293 5 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Vim Script
Stars
14k
Forks
1.5k
Avg merge
17h 49m
Merged PRs (30d)
1

Description

## Information

**VIM version**

VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Aug 10 2020 17:11:32)
Patch included: 1-1412

Operating System:
Linux ac 5.4.52-1-MANJARO #1 SMP PREEMPT Thu Jul 16 16:07:11 UTC 2020 x86_64 GNU/Linux

## What went wrong
I set `let g:ale_open_list = 1 `, and use coc-snippets (version:2.1.28) to expand vim-snippent , and finied expand, vim exit to nornal mode

## Reproducing the bug

1. open a python file
2. write some, use snippent,
3. vim exit insert mode to nornal mode

### :ALEInfo

Current Filetype: go
Available Linters: ['bingo', 'gobuild', 'gofmt', 'golangci-lint', 'golint', 'gometalinter', 'gopls', 'gosimple', 'gotype', 'govet', 'golangserver', 'revive', 'staticcheck']
Linter Aliases:
'gobuild' -> ['go build']
'govet' -> ['go vet']
Enabled Linters: ['golint']
Suggested Fixers:
'gofmt' - Fix Go files with go fmt.
'goimports' - Fix Go files imports with goimports.
'remove_trailing_lines' - Remove all blank lines at the end of a file.
'trim_whitespace' - Remove all trailing whitespace characters at the end of every line.
Linter Variables:

let g:ale_go_go_executable = 'go'
let g:ale_go_golangci_lint_executable = 'golangci-lint'
let g:ale_go_golangci_lint_options = '--enable-all'
let g:ale_go_golangci_lint_package = 0
let g:ale_go_golint_executable = 'golint'
let g:ale_go_golint_options = ''
let g:ale_go_langserver_executable = 'go-langserver'
let g:ale_go_langserver_options = ''
Global Variables:

let g:ale_cache_executable_check_failures = v:null
let g:ale_change_sign_column_color = 0
let g:ale_command_wrapper = ''
let g:ale_completion_delay = v:null
let g:ale_completion_enabled = 0
let g:ale_completion_max_suggestions = v:null
let g:ale_echo_cursor = 1
let g:ale_echo_msg_error_str = '✗ Error'
let g:ale_echo_msg_format = '[%linter%] %s [%severity%]'
let g:ale_echo_msg_info_str = 'Info'
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_history_enabled = 1
let g:ale_history_log_output = 1
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_filetype_changed = 1
let g:ale_lint_on_insert_leave = 1
let g:ale_lint_on_save = 1
let g:ale_lint_on_text_changed = 'never'
let g:ale_linter_aliases = {}
let g:ale_linters = {'mail': ['alex'], 'html': ['alex'], 'c++': ['clang'], 'latex': ['alex'], 'go': ['golint', 'vet'], 'markdown': ['alex'], 'bash': ['shellcheck'], 'python': ['yapf', 'pyflakes'], 'vim': ['vim-vint'], 'c': ['clang'], 'javascript': ['prettier', 'eslint'], 'make': ['checkmake'], 'zsh': ['shellcheck'], 'csh': ['shellcheck'], 'json': ['fixjson', 'jq']}
let g:ale_linters_explicit = 0
let g:ale_list_vertical = 0
let g:ale_list_window_size = 10
let g:ale_loclist_msg_format = '[%linter%] %s [%severity%]'
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 = v:null
let g:ale_open_list = 1
let g:ale_pattern_options = v:null
let g:ale_pattern_options_enabled = v:null
let g:ale_set_balloons = 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_info = '⚠'
let g:ale_sign_offset = 1000000
let g:ale_sign_style_error = '✗'
let g:ale_sign_style_warning = '⚠'
let g:ale_sign_warning = '⚠'
let g:ale_sign_highlight_linenrs = 1
let g:ale_statusline_format = ['✗ %d', '⚠ %d', '✔ OK']
let g:ale_type_map = {}
let g:ale_use_global_executables = v:null
let g:ale_virtualtext_cursor = 0
let g:ale_warn_about_trailing_blank_lines = 1
let g:ale_warn_about_trailing_whitespace = 1
Command History:

(executable check - success) golint
(finished - exit code 0) ['/usr/bin/zsh', '-c', '''golint'' ''/tmp/vn4H6jt/2/test.go''']

<<>>
/tmp/vn4H6jt/2/test.go:15:3: don't use underscores in Go names; var mac_byte should be macByte
/tmp/vn4H6jt/2/test.go:25:3: don't use underscores in Go names; var new_mac_addr should be newMacAddr
<<>>

(finished - exit code 0) ['/usr/bin/zsh', '-c', '''golint'' ''/tmp/vn4H6jt/3/test.go''']

<<>>
/tmp/vn4H6jt/3/test.go:14:19: expected ';', found i
<<>>

Contributor guide

Open the contributing guide

Research direction

No repository files or tests are named. Reproduce with Vim 8.2, ALE configured with g:ale_open_list=1, an open loclist, and coc-snippets, then trace what happens when snippet expansion finishes. Done means snippet expansion no longer leaves insert mode when ALE opens or updates the loclist.

Written by the indexing model from the issue text.

Assessment

Tech stack
vim
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.