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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add g:denops#deno_dir to set deno cache directory #295

Merged
merged 2 commits into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions autoload/denops.vim
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ endfunction
" Configuration
call denops#_internal#conf#define('denops#disabled', 0)
call denops#_internal#conf#define('denops#deno', 'deno')
call denops#_internal#conf#define('denops#deno_dir', v:null)
call denops#_internal#conf#define('denops#debug', 0)
call denops#_internal#conf#define('denops#trace', 0)
call denops#_internal#conf#define('denops#disable_deprecation_warning_message', 0)
Expand Down
12 changes: 8 additions & 4 deletions autoload/denops/_internal/server/proc.vim
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,17 @@ function! s:start(options) abort
\ '--identity',
\ '--port', '0',
\]
let l:env = {
\ 'NO_COLOR': 1,
\ 'DENO_NO_PROMPT': 1,
\ }
if g:denops#deno_dir isnot# v:null
let l:env['DENO_DIR'] = g:denops#deno_dir
endif
let l:store = {'prepared': 0}
let s:stopped_on_purpose = 0
let s:job = denops#_internal#job#start(l:args, {
\ 'env': {
\ 'NO_COLOR': 1,
\ 'DENO_NO_PROMPT': 1,
\ },
\ 'env': l:env,
\ 'on_stdout': { _job, data, _event -> s:on_stdout(l:store, data) },
\ 'on_stderr': { _job, data, _event -> s:on_stderr(data) },
\ 'on_exit': { _job, status, _event -> s:on_exit(a:options, status) },
Expand Down
6 changes: 6 additions & 0 deletions doc/denops.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@ VARIABLE *denops-variable*
Deno if 'deno' is not in PATH.
Default: 'deno'

*g:denops#deno_dir*
Cache directory of Deno. If unspecified, the cache directory is
determined by the DENO_DIR environment variable or internally by
'deno'.
Default: |v:null|

*g:denops#debug*
Set 1 to enable debug mode. In debug mode, the additional debug
messages of denops itself will be shown.
Expand Down