mirror of
https://github.com/mattn/vim-lsp-settings.git
synced 2025-12-12 20:35:54 +01:00
display warning if deno is disabled
This commit is contained in:
@@ -1,22 +1,25 @@
|
||||
function! lsp_settings#utils#msg(msg) abort
|
||||
function! lsp_settings#utils#msg(msg, ...) abort
|
||||
redraw
|
||||
echohl Comment
|
||||
echo a:msg
|
||||
echohl None
|
||||
return a:0 > 0 ? a:000[0] : v:null
|
||||
endfunction
|
||||
|
||||
function! lsp_settings#utils#warning(msg) abort
|
||||
function! lsp_settings#utils#warning(msg, ...) abort
|
||||
redraw
|
||||
echohl WarningMsg
|
||||
echomsg a:msg
|
||||
echohl None
|
||||
return a:0 > 0 ? a:000[0] : v:null
|
||||
endfunction
|
||||
|
||||
function! lsp_settings#utils#error(msg) abort
|
||||
function! lsp_settings#utils#error(msg, ...) abort
|
||||
redraw
|
||||
echohl Error
|
||||
echomsg a:msg
|
||||
echohl None
|
||||
return a:0 > 0 ? a:000[0] : v:null
|
||||
endfunction
|
||||
|
||||
function! lsp_settings#utils#valid_name(command) abort
|
||||
|
||||
@@ -15,7 +15,7 @@ augroup vim_lsp_settings_deno
|
||||
\ },
|
||||
\ }),
|
||||
\ 'allowlist': lsp_settings#get('deno', 'allowlist', ['typescript', 'javascript', 'typescriptreact', 'javascriptreact']),
|
||||
\ 'blocklist': lsp_settings#get('deno', 'blocklist', {c->empty(lsp#utils#find_nearest_parent_file_directory(lsp#utils#get_buffer_path(), 'node_modules/')) ? [] : ['typescript', 'javascript', 'typescriptreact', 'javascriptreact']}),
|
||||
\ 'blocklist': lsp_settings#get('deno', 'blocklist', {c->empty(lsp#utils#find_nearest_parent_file_directory(lsp#utils#get_buffer_path(), 'node_modules/')) ? [] : lsp_settings#utils#warning('server "deno" is disabled since "node_modules" is found', ['typescript', 'javascript', 'typescriptreact', 'javascriptreact'])}),
|
||||
\ 'config': lsp_settings#get('deno', 'config', lsp_settings#server_config('deno')),
|
||||
\ 'workspace_config': lsp_settings#get('deno', 'workspace_config', {}),
|
||||
\ 'semantic_highlight': lsp_settings#get('deno', 'semantic_highlight', {}),
|
||||
|
||||
Reference in New Issue
Block a user