Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(vue): volar v1 support #4552

Merged
merged 2 commits into from
Jul 24, 2023
Merged

Conversation

creativenull
Copy link
Contributor

According to the discussion over on #4460 (reply in thread)

I've identified that volar v1 does have breaking changes.

Following the volar discussion (vuejs/language-tools#2279) I've adjusted the initialization options and added a warning message instructing the user to install typescript in the project in order for volar to work.

Copy link
Contributor

@hsanson hsanson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't use volar myself but changes look good and this is affecting many users. Merging so it can be further tested.

@hsanson hsanson merged commit 32e1417 into dense-analysis:master Jul 24, 2023
@theahura
Copy link

theahura commented Jul 24, 2023

Thanks for the quick turnaround on this!
Testing this merge on my machine, I get the following:


 Current Filetype: vue
Available Linters: ['cspell', 'vls', 'volar', 'cspell', 'deno', 'eslint', 'fecs', 'flow', 'flow-language-server', 'jscs', 'jshint', 'standard', 'tsserver', 'xo']
  Enabled Linters: ['volar']
  Ignored Linters: []
 Suggested Fixers: 
  '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_vue_volar_executable = 'vue-language-server'
let g:ale_vue_volar_init_options = {'typescript': {'tsdk': ''}}
let g:ale_vue_volar_use_global = 1
 Global Variables:

let g:ale_cache_executable_check_failures = v:null
let g:ale_change_sign_column_color = 0
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 = '%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 = {'vue': ['volar']}
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 = 'all'
let g:ale_warn_about_trailing_blank_lines = 1
let g:ale_warn_about_trailing_whitespace = 1
  Command History:

(executable check - failure) vue-language-server

Specifically at the bottom, getting an exec check failure for the vue-language-server. I already have installed typescript in the package I am running; are there other dependencies?

@creativenull
Copy link
Contributor Author

You need to have the vue-language-server installed globally with npm install -g @volar/vue-language-server or have it at v1.

@theahura
Copy link

Ah it had to be global. Thanks a ton!

mnikulin pushed a commit to mnikulin/ale that referenced this pull request Nov 12, 2023
* fix: volar v1 support

* fix: volar linter errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants