dense-analysis / dense-analysis/ale

ale_virtualtext, ale_sign and highlight color shows abnormal in nvim

Open
#4,706 1 comment 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**

```bash
$ command vim --version | head -2
VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Dec 14 2023 13:53:53)
macOS version - x86_64
```

**NVIM version**
```bash
$ command nvim --version | head -2
NVIM v0.9.5
Build type: Release
```

Operating System:
```bash
$ sw_vers
ProductName: macOS
ProductVersion: 14.2.1
BuildVersion: 23C71
```

## What went wrong

I'm using exact same vimrc for both vim and nvim, and ale_virtualtext, ale_sign and highlight color shows abnormal in nvim ( works in vim ) as below:

- vim
![vim-ale](https://github.com/dense-analysis/ale/assets/5822057/1335eb0d-b674-4c5a-9dd8-6e9176eb4d7a)

- nvim
![nvim-ale](https://github.com/dense-analysis/ale/assets/5822057/3a6250d6-d68d-4a59-b28b-30f86eeb81e2)

probably related with
- https://github.com/dense-analysis/ale/issues/4657
- https://github.com/dense-analysis/ale/pull/4704

To verify my assumption, I've tried to manually added the diff ( [4704.patch](https://github.com/dense-analysis/ale/files/13899509/4704.patch) ) into HEAD of commit `a3183e2f7b9120c2f1d49f0156519663f355d35d`, but still no help

## Reproducing the bug

here is the source code of shell script:

```bash
#!/usr/bin/env bash

echo $#
echo ${1:-.}
echo ${2:--10}
```

### :ALEInfo

click here to expand ...

 Current Filetype: sh

Available Linters: ['bashate', 'cspell', 'language_server', 'shell', 'shellcheck']
Enabled Linters: ['bashate', 'cspell', 'language_server', 'shell', 'shellcheck']
Ignored Linters: []
Suggested Fixers:
'remove_trailing_lines' - Remove all blank lines at the end of a file.
'shfmt' - Fix sh files with shfmt.
'trim_whitespace' - Remove all trailing whitespace characters at the end of every line.

Linter Variables:
" Press Space to read :help for a setting
let g:ale_sh_bashate_executable = 'bashate'
let g:ale_sh_bashate_options = ''
let g:ale_sh_language_server_executable = 'bash-language-server'
let g:ale_sh_language_server_use_global = 0
let g:ale_sh_shell_default_shell = 'bash'
let g:ale_sh_shellcheck_change_directory = 1
let g:ale_sh_shellcheck_dialect = 'auto'
let g:ale_sh_shellcheck_exclusions = ''
let g:ale_sh_shellcheck_executable = 'shellcheck'
let g:ale_sh_shellcheck_options = ''

Global Variables:
" Press Space to read :help for a setting
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 = 'auto'
let g:ale_echo_cursor = 1
let g:ale_echo_msg_error_str = '✘'
let g:ale_echo_msg_format = '[%linter%] %code%: %s [%severity%] '
let g:ale_echo_msg_info_str = 'Info'
let g:ale_echo_msg_warning_str = '⚠'
let g:ale_enabled = 1
let g:ale_fix_on_save = 0
let g:ale_fixers = {'groovy': ['checkstyle'], '*': ['remove_trailing_lines', 'trim_whitespace'], 'css': ['stylelint']}
let g:ale_history_enabled = 1
let g:ale_info_default_mode = 'preview'
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 = {}
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 = '[%linter%] %code%: %s [%severity%] '
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 = 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 = 1
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 = 1
let g:ale_sign_error = '💢'
let g:ale_sign_info = 'ᓆ'
let g:ale_sign_offset = v:null
let g:ale_sign_style_error = '⍥'
let g:ale_sign_style_warning = 'ᓍ'
let g:ale_sign_warning = 'ᑹ'
let g:ale_sign_highlight_linenrs = v:null
let g:ale_type_map = {}
let g:ale_use_neovim_diagnostics_api = 1
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

LSP Error Messages:

(Errors for language_server)
Failed to find project root, language server won't start.
Command History:

(executable check - success) bashate
(finished - exit code 0) ['/usr/local/bin/bash', '-c', '''bashate'' ''/var/folders/s3/mg_f3cv54nn7y758j_t46zt40000gn/T/nvim.marslo/bv1Zwl/0/ale-bug.sh''']

<<>>

(executable check - failure) cspell
(executable check - success) bash
(finished - exit code 0) ['/usr/local/bin/bash', '-c', 'bash -n ''/var/folders/s3/mg_f3cv54nn7y758j_t46zt40000gn/T/nvim.marslo/bv1Zwl/2/ale-bug.sh''']

<<>>

(executable check - success) shellcheck
(finished - exit code 0) ['/usr/local/bin/bash', '-c', 'cd ''/Users/marslo'' && ''shellcheck'' --version']

<<>>
ShellCheck - shell script analysis tool
version: 0.9.0
license: GNU General Public License, version 3
website: https://www.shellcheck.net
<<>>

(finished - exit code 1) ['/usr/local/bin/bash', '-c', 'cd ''/Users/marslo'' && ''shellcheck'' -s bash -x -f gcc - < ''/var/folders/s3/mg_f3cv54nn7y758j_t46zt40000gn/T/nvim.marslo/bv1Zwl/3/ale-bug.sh''']

<<>>
-:4:6: note: Double quote to prevent globbing and word splitting. [SC2086]
-:5:6: note: Double quote to prevent globbing and word splitting. [SC2086]
<<>>

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.