From b9db67d9ea7f6d67698a1da43765ccba57d11b55 Mon Sep 17 00:00:00 2001 From: Takayuki Kamiyama Date: Mon, 19 Apr 2021 15:36:22 +0900 Subject: [PATCH] Update, try. --- .idea/totolot.iml | 4 ++-- rplugin/python3/deoplete/sources/totolot.py | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.idea/totolot.iml b/.idea/totolot.iml index 9ffcfca..4937476 100644 --- a/.idea/totolot.iml +++ b/.idea/totolot.iml @@ -2,7 +2,7 @@ - + @@ -11,6 +11,6 @@ - + \ No newline at end of file diff --git a/rplugin/python3/deoplete/sources/totolot.py b/rplugin/python3/deoplete/sources/totolot.py index 3d32027..7fc9ca9 100644 --- a/rplugin/python3/deoplete/sources/totolot.py +++ b/rplugin/python3/deoplete/sources/totolot.py @@ -22,17 +22,17 @@ def get_complete_position(self, context): return m.start() if m else -1 def gather_candidates(self, context): - rel_path = "repos/github.com/takkii/ruby-dictionary3/" + try: + rel_path = "repos/github.com/takkii/ruby-dictionary3/" - paths = [os.path.expanduser(os.path.join(p, rel_path)) for p in [ - "~/.cache/dein/", - "~/.local/share/dein/", - "~/.config/nvim/.cache/dein/", - "~/.config/nvim/", - "~/.vim/bundles" - ]] + paths = [os.path.expanduser(os.path.join(p, rel_path)) for p in [ + "~/.cache/dein/", + "~/.local/share/dein/", + "~/.config/nvim/.cache/dein/", + "~/.config/nvim/", + "~/.vim/bundles" + ]] - try: path = next(p for p in paths if os.path.exists(p)) ruby_method = open(os.path.join(path, "autoload/source/ruby_method_deoplete"))