dense-analysis/ale

ALERename wipes undolist

開放

#3,747 建立於 2021年6月1日

 (1 則留言) (0 個反應) (0 位負責人)Vim Script (1,487 個分叉)batch import
bughelp wanted

倉庫指標

星標
 (13,990 顆星)
PR 合併指標
 (平均合併 51天 4小時) (30 天內合併 3 個 PR)

描述

Information

VIM version

NVIM v0.4.4 Build type: Release

Operating System Arch Linux, kernel 5.12.8-arch1-1

What went wrong

When using :ALERename, neovim does not save the undo list. This only occurs when renaming is the last edit made before saving. If another edit is made after the rename, everything behaves as expected.

Reproducing the bug

  1. Open Typescript file.
  2. Optional: make edits.
  3. Rename a variable using :ALERename.
  4. Save and close file (:x) without making any other edits.
  5. Observe that neovim did not write the undo file to disk.
  6. Reopen file and view the undo list (:undolist) which reports "Nothing to undo".

ALE project commit: 1b087912

.vimrc (subset):

set undofile

let g:ale_linters_explicit = 1  " Only run linters named in ale_linters settings.
let g:ale_linters = {
\   'javascript': ['eslint'],
\   'typescript': ['eslint', 'tsserver'],
\   'json': ['jq'],
\}
let g:ale_fixers = {
\   'javascript': ['eslint'],
\   'typescript': ['eslint'],
\}
let g:ale_lint_on_text_changed = 'never'
let g:ale_lint_on_insert_leave = 0

sample.ts:

const var1 = 42;

const var2 = var1 + 1;

:ALEInfo

Current Filetype: typescript Available Linters: ['deno', 'eslint', 'standard', 'tslint', 'tsserver', 'typecheck', 'xo'] Enabled Linters: ['eslint', 'tsserver'] Ignored Linters: [] Suggested Fixers: 'deno' - Fix TypeScript using deno fmt. 'eslint' - Apply eslint --fix to a file. 'prettier' - Apply prettier to a file. '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. 'tslint' - Fix typescript files with tslint --fix. 'xo' - Fix JavaScript/TypeScript files using xo --fix. Linter Variables:

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_cache_executable_check_failures = v:null let g:ale_change_sign_column_color = v:null 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_disable_lsp = 0 let g:ale_echo_cursor = 1 let g:ale_echo_msg_error_str = 'Error' let g:ale_echo_msg_format = '%code: %%s' 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 = {'typescript': ['eslint'], 'javascript': ['eslint']} let g:ale_history_enabled = 1 let g:ale_history_log_output = 1 let g:ale_keep_list_window_open = v:null 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 = 0 let g:ale_lint_on_save = 1 let g:ale_lint_on_text_changed = 'never' let g:ale_linter_aliases = {} let g:ale_linters = {'typescript': ['eslint', 'tsserver'], 'json': ['jq'], 'javascript': ['eslint']} let g:ale_linters_explicit = 1 let g:ale_linters_ignore = {} let g:ale_list_vertical = v:null let g:ale_list_window_size = v:null let g:ale_loclist_msg_format = v:null let g:ale_max_buffer_history_size = 20 let g:ale_max_signs = v:null let g:ale_maximum_file_size = v:null let g:ale_open_list = v:null let g:ale_pattern_options = v:null let g:ale_pattern_options_enabled = v:null let g:ale_root = {} 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 = v:null let g:ale_sign_error = '●' let g:ale_sign_info = v:null let g:ale_sign_offset = v:null let g:ale_sign_style_error = v:null let g:ale_sign_style_warning = v:null let g:ale_sign_warning = '.' let g:ale_sign_highlight_linenrs = v:null let g:ale_statusline_format = v:null 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 - failure) eslint (executable check - success) /tmp/bug_test/node_modules/.bin/tsserver (started) ['/usr/bin/zsh', '-c', '''/tmp/bug_test/node_modules/.bin/tsserver''']

貢獻者指南