diff options
author | Shougo Matsushita <Shougo.Matsu@gmail.com> | 2016-06-20 20:17:01 +0900 |
---|---|---|
committer | Shougo Matsushita <Shougo.Matsu@gmail.com> | 2016-06-20 20:17:01 +0900 |
commit | 204cec983c037fab2d4a12882c796898c6d7c76f (patch) | |
tree | df0f47c4e2259b904c3b11eab83ed8c05d339e5a | |
parent | 233f2282f41398491d073c23be4fc5bc359289fe (diff) | |
download | deoplete.nvim-204cec983c037fab2d4a12882c796898c6d7c76f.zip |
Remove g:deoplete#enable_debug variable
-rw-r--r-- | autoload/deoplete/init.vim | 2 | ||||
-rw-r--r-- | doc/deoplete.txt | 12 | ||||
-rw-r--r-- | rplugin/python3/deoplete/logger.py | 3 | ||||
-rw-r--r-- | rplugin/python3/deoplete/util.py | 14 |
4 files changed, 10 insertions, 21 deletions
diff --git a/autoload/deoplete/init.vim b/autoload/deoplete/init.vim index f20a0f7..7c89525 100644 --- a/autoload/deoplete/init.vim +++ b/autoload/deoplete/init.vim @@ -105,8 +105,6 @@ function! deoplete#init#_variables() abort "{{{ call deoplete#util#set_default( \ 'g:deoplete#max_list', 100) call deoplete#util#set_default( - \ 'g:deoplete#enable_debug', 0) - call deoplete#util#set_default( \ 'g:deoplete#enable_profile', 0) call deoplete#util#set_default( \ 'g:deoplete#auto_complete_delay', 0) diff --git a/doc/deoplete.txt b/doc/deoplete.txt index d6d02bf..a78d8b3 100644 --- a/doc/deoplete.txt +++ b/doc/deoplete.txt @@ -134,14 +134,6 @@ g:deoplete#disable_auto_complete b:deoplete_disable_auto_complete Buffer local variable of |g:deoplete#disable_auto_complete|. - *g:deoplete#enable_debug* -g:deoplete#enable_debug - It enables deoplete debug mode. The debug print feature is - enabled. - Note: You must enable - |deoplete-source-attribute-debug_enabled| to debug the - sources. - *g:deoplete#enable_profile* g:deoplete#enable_profile It enables deoplete profile mode. @@ -415,6 +407,10 @@ deoplete#enable_logging({level}, {logfile}) {logfile} is the file where log messages are written. Messages are appended to this file. Each log session will start with "--- Deoplete Log Start ---". + Note: You must enable + |deoplete-source-attribute-debug_enabled| to debug the + sources. + ------------------------------------------------------------------------------ KEY MAPPINGS *deoplete-key-mappings* diff --git a/rplugin/python3/deoplete/logger.py b/rplugin/python3/deoplete/logger.py index 125ecd0..1254a78 100644 --- a/rplugin/python3/deoplete/logger.py +++ b/rplugin/python3/deoplete/logger.py @@ -63,8 +63,7 @@ def setup(vim, level, output_file=None): def logmethod(func): """Decorator for setting up the logger in LoggingMixin subclasses. - This does not guarantee that log messages will be generated. It is - contingent on g:deoplete#enable_debug being set by the user. If + This does not guarantee that log messages will be generated. If `LoggingMixin.debug_enabled` is True, it will be propagated up to the root 'deoplete' logger. """ diff --git a/rplugin/python3/deoplete/util.py b/rplugin/python3/deoplete/util.py index 9f4be0b..5e24659 100644 --- a/rplugin/python3/deoplete/util.py +++ b/rplugin/python3/deoplete/util.py @@ -52,16 +52,12 @@ def globruntime(runtimepath, path): def debug(vim, expr): - if vim.vars['deoplete#enable_debug']: - try: - json_data = json.dumps(str(expr).strip()) - except Exception: - vim.command('echomsg string(\'' + str(expr).strip() + '\')') - else: - vim.command('echomsg string(\'' + escape(json_data) + '\')') - + try: + json_data = json.dumps(str(expr).strip()) + except Exception: + vim.command('echomsg string(\'' + str(expr).strip() + '\')') else: - error(vim, "not in debug mode, but debug called") + vim.command('echomsg string(\'' + escape(json_data) + '\')') def error(vim, msg): |