ale
ale copied to clipboard
ALEFindReference: pressing "enter" or "t" does not open any file
Information
VIM version
VIM - Vi IMproved 9.0 (2022 Jun 28, compiled May 10 2022 08:40:37) Included patches: 1-749
Operating System: Ubuntu 22.04.5 LTS on WSL
What went wrong
I'm using ALEFindReference on a C++ project. The window with the list of referencing files is correctly shown, but I cannot open the selected file using "enter" or "t": nothing happens.
Reproducing the bug
- I open a cpp file
- I use ALEFindReference on a class method or class name
- The list of file referencing that method is shown in split mode
- Selecting one of the file and pressing "enter" or "t" nothing happens
Expected behavior:
- The selected file open in the bottom window (pressing enter) or in a new tab (pressing t), immediately closing the preview window
:ALEInfo
Current Filetype: ale-preview-selection
Available Linters: []
Enabled Linters: []
Ignored Linters: []
Suggested Fixers:
'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:
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 = 100
let g:ale_completion_enabled = 1
let g:ale_completion_max_suggestions = 50
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 = {}
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_linters_ignore = {}
let g:ale_list_vertical = 0
let g:ale_list_window_size = 10
let g:ale_loclist_msg_format = '%code: %%s'
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 = 0
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 = 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 = 'all'
let g:ale_warn_about_trailing_blank_lines = 1
let g:ale_warn_about_trailing_whitespace = 1
Command History:
.vimrc
set number "display line numbers on the left"
"Tab configuration"
set autoindent
set expandtab
set tabstop=4 "set 4 spaces for a tab pressure"
set shiftwidth=4
set fillchars+=vert:\
set encoding=UTF-8 "needed for dev-icons plugin"
set termguicolors "needed for the synthwave84 plugin"
"colorscheme synthwave84"
let g:material_theme_style = 'ocean'
let g:material_terminal_italics = 1
colorscheme material
autocmd ColorScheme * hi NonText guifg=bg
syntax on
" Open the existing NERDTree on each new tab.
autocmd BufWinEnter * if &buftype != 'quickfix' && getcmdwintype() == '' | silent NERDTreeMirror | endif
" Close the tab if NERDTree is the only window remaining in it.
autocmd BufEnter * if winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | call feedkeys(":quit\<CR>:\<BS>") | endif
let NERDTreeMinimalUI = 1
" Start remapping for NERDTree "
nnoremap <C-n> :NERDTree<CR>
" Debugger config "
packadd termdebug
let g:termdebug_wide=1
" Enable completion where available.
" This setting must be set before ALE is loaded.
"
" You should not turn this setting on if you wish to use ALE as a completion
" source for other completion plugins, like Deoplete.
let g:ale_completion_enabled = 1
function ALELSPMappings()
let l:lsp_found=0
for l:linter in ale#linter#Get(&filetype) | if !empty(l:linter.lsp) | let l:lsp_found=1 | endif | endfor
if (l:lsp_found)
nnoremap <buffer> <C-]> :ALEGoToDefinition<CR>
nnoremap <buffer> <C-^> :ALEFindReferences<CR>
else
silent! unmap <buffer> <C-]>
silent! unmap <buffer> <C-^>
endif
endfunction
autocmd BufRead,FileType * call ALELSPMappings()