Closed hissssst closed 2 years ago
I have the same problem for hover but not for aledetail I am on arch linux this is my .vimrc
set shell=/bin/bash
set ttymouse=sgr
set mouse=a
set nocompatible
filetype off
set clipboard=unnamedplus
set hidden
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'preservim/nerdcommenter'
Plugin 'tpope/vim-fugitive' " Git
Plugin 'tpope/vim-surround'
Plugin 'scrooloose/nerdtree'
let g:ale_set_balloons = 1
Plugin 'dense-analysis/ale'
Plugin 'itchyny/lightline.vim'
Plugin 'maximbaz/lightline-ale'
Plugin 'luochen1990/rainbow'
Plugin 'morhetz/gruvbox'
Plugin 'terryma/vim-multiple-cursors'
Plugin 'mattn/emmet-vim'
Plugin 'Rykka/colorv.vim'
Plugin 'sjl/gundo.vim'
Plugin 'dag/vim-fish'
Plugin 'Shougo/deoplete.nvim'
Plugin 'roxma/nvim-yarp'
Plugin 'roxma/vim-hug-neovim-rpc'
" ddc (archived)
" Plugin 'Shougo/ddc.vim'
" Plugin 'statiolake/ddc-ale'
" Plugin 'vim-denops/denops.vim'
" Plugin 'Shougo/ddc-around'
" Plugin 'Shougo/ddc-matcher_head'
" Plugin 'Shougo/ddc-sorter_rank'
call vundle#end()
filetype plugin indent on
set encoding=utf-8
syntax on
set completeopt=menu,noinsert
set autoindent
set expandtab
set smartindent
set laststatus=0
set tabstop=2
set shiftwidth=2
set ruler
set colorcolumn=80
set number
set list
set ttyfast
set visualbell
set t_vb=
set ignorecase
set background=dark
colorscheme gruvbox
set cursorline
highlight CursorLine cterm=NONE ctermfg=NONE ctermbg=233 guifg=NONE guibg=#121212
autocmd InsertEnter * highlight CursorLine cterm=NONE ctermfg=NONE ctermbg=234 guifg=NONE guibg=#1c1c1c
autocmd InsertLeave * highlight CursorLine cterm=NONE ctermfg=NONE ctermbg=233 guifg=NONE guibg=#121212
set termguicolors
let &t_8f = "\e[38;2;%lu;%lu;%lum"
let &t_8b = "\e[48;2;%lu;%lu;%lum"
set undofile
set undodir=~/.vim/.undodir
let g:rainbow_active = 1
" ------- deoplete
let g:deoplete#enable_at_startup = 1
" -------- end deoplete
" ------- lightline (archived)
let g:lightline = {
\ "colorscheme": 'wombat',
\ }
let g:lightline.component_expand = {
\ 'linter_checking': 'lightline#ale#checking',
\ 'linter_warnings': 'lightline#ale#warnings',
\ 'linter_errors': 'lightline#ale#errors',
\ 'linter_ok': 'lightline#ale#ok',
\ }
let g:lightline.component_type = {
\ 'linter_checking': 'left',
\ 'linter_warnings': 'waomnifuncrning',
\ 'linter_errors': 'error',
\ 'linter_ok': 'left',
\ }
let g:lightline.active = { 'right': [
\ [ 'linter_checking', 'linter_errors', 'linter_warnings', 'linter_ok' ],
\ ['lineinfo' ], [ 'percent' ],
\ [ 'fileformat', 'fileencoding', 'filetype', 'charvaluehex' ]
\ ] }
let g:lightline#ale#indicator_checking = "\uf110 "
let g:lightline#ale#indicator_warnings = "\uf071 "
let g:lightline#ale#indicator_errors = "\uf05e "
let g:lightline#ale#indicator_ok = "\uf00c "
" ------- lightline
" -------- ALE
let g:ale_linters = { 'javascript': ['eslint'] }
let g:ale_fixers = { 'javascript': ['eslint'] }
let g:ale_python_flake8_executable = 'python3'
let g:ale_python_flake8_options = '-m flake8 --select=E9'
let g:ale_python_pylint_executable = 'python3'
let g:ale_hover_cursor = 1
let g:ale_floating_preview = 1
" --------- END ALE
let NERDSpaceDelims = 1
let g:NERDCustomDelimiters = {
\ 'c': { 'left': '//', 'right': '' },
\ }
map ,l :so ~/.vimrc<CR>
map ,t :NERDTreeToggle<CR>
map ,f :ALEFix<CR>
map ,d :ALEGoToDefinition<CR>
map ,s :ALESymbolSearch
map ,r :ALEFindReferences<CR>
map ,e :ALEDetail<CR>
map ,i :ALEImport<CR>
map ,n :ALERename<CR>
map ,w :w<CR>
map ,q :wqa<CR>
map ,c <plug>NERDCommenterToggle
" select recently paste content
nnoremap <expr> gb '`[' . strpart(getregtype(), 0, 1) . '`]'
" --------------- ARCHIVED
"command SW w !sudo tee "%" > /dev/null
" nnoremap <F5> :GundoToggle<CR>
" --------------- END OF ARCHIVED
and when I hover I have a balloon (be it hover with lsp info or to describe an error reported by the linter) not a floating window despite ale_floating_preview set to 1
I tested with a basic a.c file
This is ALEInfo :
Current Filetype: c
Available Linters: ['cc', 'ccls', 'clangd', 'clangtidy', 'cppcheck', 'cpplint', 'cquery', 'cspell', 'flawfinder']
Linter Aliases:
'cc' -> ['gcc', 'clang']
Enabled Linters: ['cc', 'ccls', 'clangd', 'clangtidy', 'cppcheck', 'cpplint', 'cquery', 'cspell', 'flawfinder']
Ignored Linters: []
Suggested Fixers:
'astyle' - Fix C/C++ with astyle.
'clang-format' - Fix C/C++ and cuda files with clang-format.
'clangtidy' - Fix C/C++ and ObjectiveC files with clang-tidy.
'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.
'uncrustify' - Fix C, C++, C#, ObjectiveC, ObjectiveC++, D, Java, Pawn, and VALA files with uncrustify.
Linter Variables:
let g:ale_c_always_make = 1
let g:ale_c_build_dir = ''
let g:ale_c_build_dir_names = ['build', 'bin']
let g:ale_c_cc_executable = '<auto>'
let g:ale_c_cc_options = '-std=c11 -Wall'
let g:ale_c_ccls_executable = 'ccls'
let g:ale_c_ccls_init_options = {}
let g:ale_c_clangd_executable = 'clangd'
let g:ale_c_clangd_options = ''
let g:ale_c_clangtidy_checks = []
let g:ale_c_clangtidy_executable = 'clang-tidy'
let g:ale_c_clangtidy_extra_options = ''
let g:ale_c_clangtidy_options = ''
let g:ale_c_cppcheck_executable = 'cppcheck'
let g:ale_c_cppcheck_options = '--enable=style'
let g:ale_c_cpplint_executable = 'cpplint'
let g:ale_c_cpplint_options = ''
let g:ale_c_cquery_cache_directory = '/home/ilan/.cache/cquery'
-- INSERT ---- INSERT --
No matching autocommands: User ALEWantResults
No matching autocommands: User ALELintPre
33 fewer lines; before #1 2 seconds ago
33 fewer lines; before #1 2 seconds ago
use of undeclared id...ang-diagnostic-error]
use of undeclared identifier 'uurrent'
No matching autocommands: User ALEWantResults
No matching autocommands: User ALELintPre
use of undeclared identifier 'uint8_t'
This is vim version :
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Feb 24 2022 18:41:57) Included patches: 1-4464 Compiled by Arch Linux Huge version with GTK3 GUI. Features included (+) or not (-): +acl +job +signs +arabic +jumplist +smartindent +autocmd +keymap -sodium +autochdir +lambda +sound -autoservername +langmap +spell +balloon_eval +libcall +startuptime +balloon_eval_term +linebreak +statusline -- INSERT ---- INSERT --
@ilan-schemoul ballon is a floating window
Really I thought this ALEDetail was floating window and this was popup Sorry for the confusion then I thought the discrepancies of the UI came from that. Especially that a quick search on google with "vim balloon" matched the first image and "vim floating windows" matched the second. I'm wondering why the configuration use two different terms then ? And why the UI is different between hover and ALEDetail I like ALEDetail's UI a lot more
@w0rp ping
Balloons, popups, floating windows, preview window are all separate things and they all have different capabilities and uses. I agree that current state is confusing and could be improved a lot but unfortunatelly this won't be an easy task. If interested I recommend you read the help on balloons (Vim only), popups (Vim 8+ only), floating windows (NeoVim 0.5+ only), and preview window.
Hi, @hsanson. I am actually just pointing out a bug. The problem is that I set a configuration value, but ale
doesn't seem to recognize it.
These values in configuration
let g:ale_floating_preview = 1
let g:ale_floating_window_border = []
let g:ale_hover_to_floating_preview = 1
let g:ale_detail_to_floating_preview = 1
Are not recognized by ale
. But checking them inside commandline in running vim, shows that they're set
I see, I do not use floating windows to display errors reported by ALE but from the docs it seems ALE can show errors in the preview window or in balloons by setting g:ale_cursor_detail
and g:ale_set_balloons
. Since you set g:ale_detail_to_floating_window_preview
then instead of the preview window it should use a floating window instead.
Check the help on these options to see if you get it to work. If not I may find some time next weekend to see if there is really a bug there.
@hsanson , thanks these options move diagnostics to the ballon, but I still can see them in commandline. How do I disable it?
From ALE documentation:
ALE will report problems with your code in the following ways, listed with
their relevant options.
* By updating loclist. (On by default) - g:ale_set_loclist
* By updating quickfix. (Off by default) - g:ale_set_quickfix
* By setting error highlights. - g:ale_set_highlights
* By creating signs in the sign column. - g:ale_set_signs
* By echoing messages based on your cursor. - g:ale_echo_cursor
* By inline text based on your cursor. - g:ale_virtualtext_cursor
* By displaying the preview based on your cursor. - g:ale_cursor_detail
* By showing balloons for your mouse cursor - g:ale_set_balloons
Please consult the documentation for each option, which can reveal some other
ways of tweaking the behavior of each way of displaying problems. You can
disable or enable whichever options you prefer.
What you want is to disable g:ale_echo_cursor
Information
VIM version
Operating System:
NixOS
The problem
subj
Configuration
My
coc-settings.json
My
init.vim
:Plugins are installed via
home-manager
moduleReproducing the bug
coc.nvim
andale
installed:ALEInfo