dense-analysis / ale

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

fix(json): update vscode json lsp name #4601

Closed pbnj closed 1 year ago

pbnj commented 1 year ago

Fixes #4600

pbnj commented 1 year ago

:ALEInfo

Expand ``` Current Filetype: json Available Linters: ['cspell', 'eslint', 'jq', 'jsonlint', 'spectral', 'vscodejson'] Enabled Linters: ['jsonlint', 'spectral', 'vscodejson'] Ignored Linters: [] Suggested Fixers: 'clang-format' - Fix C, C++, C#, CUDA, Java, JavaScript, JSON, ObjectiveC and Protobuf files with clang-format. 'dprint' - Pluggable and configurable code formatting platform 'fixjson' - Fix JSON files with fixjson. 'jq' - Fix JSON files with jq. 'prettier' - Apply prettier to a file. '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: let g:ale_json_jsonlint_executable = 'jsonlint' let g:ale_json_jsonlint_use_global = 0 let g:ale_json_spectral_executable = 'spectral' let g:ale_json_spectral_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 = 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 = 1 let g:ale_fixers = {'*': ['remove_trailing_lines', 'trim_whitespace']} let b:ale_fixers = ['jq'] 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_neovim_diagnostics_api = 0 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) vscode-json-languageserver (started) ['/opt/homebrew/bin/bash', '-c', '''vscode-json-languageserver'' --stdio'] ```
pbnj commented 1 year ago

I'm probably doing something wrong in the test because I cannot seem to get it to pass locally.

Keep getting:

Starting Vader: 1 suite(s), 2 case(s)
  Starting Vader: /Users/peter.benjamin/Projects/github.com/pbnj/ale/test/linter/test_json_vscodejson.vader
    (1/2) [EXECUTE] The default executable name should be correct
    (1/2) [EXECUTE] (X) Unequal Lists      ['vscode-json-language-server', ['''vscode-json-language-server'' --stdio']] should be equal to      ['vscode-json-languageserver', ['''vscode-json-languageserver''--stdio']]
    (2/2) [EXECUTE] Executable name should be configurable
    (2/2) [EXECUTE] (X) Unequal Lists      ['vscode-json-language-server', ['''vscode-json-language-server'' --stdio']] should be equal to      ['foo', ['''foo''--stdio']]
  Success/Total: 0/2
Success/Total: 0/2 (assertions: 0/2)
Elapsed time: 0.06 sec.
pbnj commented 1 year ago

Thank you for helping me get it over the finish line and for sharing the info/knowledge around these changes.