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 refresh pattern to be customizable #550

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions autoload/lsp_settings.vim
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,11 @@ function! s:vim_lsp_load_or_suggest(ft) abort
if get(g:, 'lsp_loaded', 0)
for l:server in s:settings[a:ft]
let l:config = lsp_settings#server_config(l:server.command)
if has_key(g:, 'lsp_settings') &&
\ has_key(g:lsp_settings, l:server.command) &&
\ has_key(g:lsp_settings[l:server.command], 'config')
call extend(l:config, g:lsp_settings[l:server.command]['config'])
endif
Copy link
Owner

Choose a reason for hiding this comment

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

extend is destructive API. please override refresh_pattern simply. (not to use extend)

let l:refresh_pattern = get(l:config, 'refresh_pattern', '')
if !empty(l:refresh_pattern)
let b:asyncomplete_refresh_pattern = l:refresh_pattern
Expand Down