dense-analysis / ale

Check syntax in Vim/Neovim asynchronously and fix files, with Language Server Protocol (LSP) support
BSD 2-Clause "Simplified" License
13.49k stars 1.43k forks source link

Wrong quickfix position with minimap #2834

Open XadillaX opened 4 years ago

XadillaX commented 4 years ago

Information

VIM version

Neovim 0.3.4

Operating System: macOS 10.14.5

What went wrong

Something went wrong in specifically this place, and I also searched through both open and closed issues for the same problem before reporting a bug here.

When it work with minimap together, the quickfix window opened in minimap's buffer.

Reproducing the bug

  1. Configuration
    let g:ale_fixers = [ 'prettier', 'eslint' ]
    let g:ale_set_quickfix = 1
    let g:ale_open_list = 1
  2. Write a wrong JavaScript file. image
  3. See the quickfix: image

:ALEInfo


 Current Filetype: javascript
Available Linters: ['eslint', 'fecs', 'flow', 'flow-language-server', 'jscs', 'jshint', 'standard', 'tsserver', 'xo']
  Enabled Linters: ['eslint', 'fecs', 'flow', 'flow-language-server', 'jscs', 'jshint', 'standard', 'tsserver', 'xo']
 Suggested Fixers: 
  'eslint' - Apply eslint --fix to a file.
  'fecs' - Apply fecs format to a file.
  'importjs' - automatic imports for javascript
  'prettier' - Apply prettier to a file.
  'prettier_eslint', 'prettier-eslint' - Apply prettier-eslint to a file.
  'prettier_standard', 'prettier-standard' - Apply prettier-standard to a file.
  'remove_trailing_lines' - Remove all blank lines at the end of a file.
  'standard' - Fix JavaScript files using standard --fix
  'trim_whitespace' - Remove all trailing whitespace characters at the end of every line.
  'xo' - Fix JavaScript/TypeScript files using xo --fix.
 Linter Variables:

let g:ale_javascript_eslint_executable = 'eslint'
let g:ale_javascript_eslint_options = ''
let g:ale_javascript_eslint_suppress_eslintignore = 0
let g:ale_javascript_eslint_suppress_missing_config = 0
let g:ale_javascript_eslint_use_global = 0
let g:ale_javascript_fecs_executable = 'fecs'
let g:ale_javascript_fecs_use_global = 0
let g:ale_javascript_flow_executable = 'flow'
let g:ale_javascript_flow_ls_executable = 'flow'
let g:ale_javascript_flow_ls_use_global = 0
let g:ale_javascript_flow_use_global = 0
let g:ale_javascript_flow_use_home_config = 0
let g:ale_javascript_flow_use_respect_pragma = 1
let g:ale_javascript_jscs_executable = 'jscs'
let g:ale_javascript_jscs_use_global = 0
let g:ale_javascript_jshint_executable = 'jshint'
let g:ale_javascript_jshint_use_global = 0
let g:ale_javascript_standard_executable = 'standard'
let g:ale_javascript_standard_options = ''
let g:ale_javascript_standard_use_global = 0
let g:ale_javascript_tsserver_config_path = ''
let g:ale_javascript_tsserver_executable = 'tsserver'
let g:ale_javascript_tsserver_use_global = 0
let g:ale_javascript_xo_executable = 'xo'
let g:ale_javascript_xo_options = ''
let g:ale_javascript_xo_use_global = 0
 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 = '%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 = ['prettier', 'eslint']
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 = 'normal'
let g:ale_linter_aliases = {}
let g:ale_linters = {}
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 = '%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 = 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 = 1
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 = 0
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 - success) /Users/xadillax/Workspace/alipay/satori/satori/node_modules/_eslint@4.19.1@eslint/bin/eslint.js
(finished - exit code 1) ['/bin/zsh', '-c', '''/Users/xadillax/Workspace/alipay/satori/satori/node_modules/_eslint@4.19.1@eslint/bin/eslint.js'' -f json --stdin --stdin-filename ''/Users/xadillax/Workspace/alipay/satori/satori/app.js'' < ''/var/folders/cm/wp6jbv3n7kxfh1__qq_354wm0000gn/T/nvimVidLim/2/app.js''']

<<<OUTPUT STARTS>>>
[{"filePath":"/Users/xadillax/Workspace/alipay/satori/satori/app.js","messages":[{"ruleId":"no-trailing-spaces","severity":2,"message":"Trailing spaces not allowed.","line":37,"column":28,"nodeType":"Program","source":"module.exports = SatoriBoot ","fix":{"range":[1065,1066],"text":""}},{"ruleId":"semi","severity":2,"message":"Missing semicolon.","line":37,"column":28,"nodeType":"ExpressionStatement","source":"module.exports = SatoriBoot ","fix":{"range":[1065,1065],"text":";"}}],"errorCount":2,"warningCount":0,"fixableErrorCount":2,"fixableWarningCount":0,"source":"'use strict';\n\nconst moreValidatorRules = require('./app/lib/register_validator_rules');\n\nclass SatoriBoot {\n  constructor(app) {\n    this.app = app;\n  }\n\n  configDidLoad() {\n    const { app } = this;\n\n    const bodyParserPos = app.config.coreMiddleware.indexOf('session');\n\n    app.config.coreMiddleware.splice(bodyParserPos + 1, 0, 'dryrun');\n    app.config.coreMiddleware.splice(bodyParserPos + 2, 0, 'externalRequestSalt');\n    app.config.coreMiddleware.splice(bodyParserPos + 3, 0, 'apiNeedLogin');\n    app.config.coreMiddleware.splice(bodyParserPos + 4, 0, 'isAdmin');\n    app.config.coreMiddleware.push('requestSchema');\n\n    app.on('db-response', ({ meta, ctx }) => {\n      if (meta.error) {\n        ctx.logger.error(`Failed to execute SQL [${meta.sql}]`);\n        ctx.logger.error(meta.error);\n      } else if (process.env.NODE_ENV !== 'prod') {\n        ctx.logger.info(`SQL [${meta.sql}] executed (%sms)`, meta.duration);\n      }\n    });\n  }\n\n  didLoad() {\n    const { app } = this;\n    moreValidatorRules.register(app);\n  }\n}\n\nmodule.exports = SatoriBoot \n"}]
<<<OUTPUT ENDS>>>

(executable check - failure) fecs
(executable check - failure) jscs
(executable check - failure) jshint
(executable check - failure) standard
(executable check - success) tsserver
(started) ['/bin/zsh', '-c', '''tsserver''']
(executable check - failure) xo
w0rp commented 4 years ago

What's the bug here?