0

when I open a file named i2c-dev.c in vi. Then I enter

:let g:ale_linters = {'c': ['clang-tidy']}

I am unable to use my installed linter "clang-tidy". I don't see any changes to the status bar, or the column on the left indicate lines that not complaint with the linter .

ALEInfo is pasted below.

 Current Filetype:
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 = v:null
let g:ale_command_wrapper = v:null
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 = v:null
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 = 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 = 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 = {'c': ['clang-tidy']}
let g:ale_linters_explicit = 0
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 = v:null
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

I have the identification issue with python and cpp. Without identifying the file type I am unable to run any linters. I have clang-tidy installed. Let me know if I missed something in setup, or if this is a configuration I missed, or a bug.

$uname -a
Linux MYmachine 5.12.7-arch1-1 #1 SMP PREEMPT Wed, 26 May 2021 22:03:57 +0000 x86_64 GNU/Linux
3
  • 2
    What does :filetype say?
    – D. Ben Knoble
    May 31, 2021 at 19:13
  • filetype detection:OFF plugin:OFF indent:OFF I added the line filetype on to my .vimrc and everything works well now. Thanks so much for the help.
    – John b
    Jun 1, 2021 at 6:00
  • Welcome to Vi and Vim!
    – filbranden
    Jun 2, 2021 at 12:15

1 Answer 1

2

You need at least filetype on for filetype detection.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.