-
-
Notifications
You must be signed in to change notification settings - Fork 295
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
174 additions
and
137 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,38 @@ | ||
# ============================================================================ | ||
# FILE: dp_main.py | ||
# AUTHOR: Shougo Matsushita <Shougo.Matsu at gmail.com> | ||
# License: MIT license | ||
# ============================================================================ | ||
|
||
def main(): | ||
print('foo') | ||
import sys | ||
from neovim import attach | ||
|
||
|
||
def attach_vim(serveraddr): | ||
if len(serveraddr.split(':')) == 2: | ||
serveraddr, port = serveraddr.split(':') | ||
port = int(port) | ||
vim = attach('tcp', address=serveraddr, port=port) | ||
else: | ||
vim = attach('socket', path=serveraddr) | ||
|
||
# sync path | ||
for path in vim.call( | ||
'globpath', vim.options['runtimepath'], | ||
'rplugin/python3', 1).split('\n'): | ||
sys.path.append(path) | ||
# Remove current path | ||
del sys.path[0] | ||
|
||
return vim | ||
|
||
|
||
def main(serveraddr): | ||
vim = attach_vim(serveraddr) | ||
from deoplete.util import error | ||
error(vim, 'hoge') | ||
return | ||
|
||
|
||
if __name__ == '__main__': | ||
main() | ||
main(sys.argv[1]) |
Oops, something went wrong.