Comments (15)
There's a daemon flag I missed to set for some of the threads.
I managed to fix this issue. It runs more smoothly now.
from nvim-completion-manager.
If the last two commands prints the wrong result, a workaround would be let g:python3_host_prog="python3"
from nvim-completion-manager.
two main causes:
- vim-hug-neovim-rpc uses multithread implementation. Vim has to wait for thread exit before shutdown, even if those are python daemon thread.
- The current version of NCM is using the classic multi-process architecture, it runs outside of vim process and it is started via the
job_start
function. However, thejob_start
method provided by vim8, unlike thejobstart
in neovim, has nodetach
option available, which means vim8 has to wait for NCM process exit before shutdown.
I'll leave this issue open, and document this as known issue.
from nvim-completion-manager.
@roxma Thanks for your effort! But I run into an error in Vim8. Can you take a look at it?
Here is nvim.log_py3_cm_core
from nvim-completion-manager.
Is there a minimal vimrc as bellow so that I can start with:
set nocompatible
syntax on
filetype plugin indent on
set encoding=utf-8 fileencodings=ucs-bom,utf-8,gbk,gb18030,latin1 termencoding=utf-8
call plug#begin(expand('<sfile>:h') . '/plugged/')
Plug 'roxma/nvim-completion-manager'
if !has('nvim')
Plug 'roxma/vim-hug-neovim-rpc'
endif
call plug#end()
Besides, It seems vim-hug-neovim-rpc is not working. In this case, use NVIM_PYTHON_LOG_FILE=nvim.log NVIM_PYTHON_LOG_LEVEL=DEBUG vim8
for starting vim8, to generate the log file nvim.log_py2_neovim_rpc_server
I've just fixed a python2 issue on vim-hug-neovim-rpc. Remember to update both plugin to the latest version before further testing.
from nvim-completion-manager.
The minimal vimrc:
set nocompatible
syntax on
filetype plugin indent on
set encoding=utf-8 fileencodings=ucs-bom,utf-8,gbk,gb18030,latin1 termencoding=utf-8
call plug#begin('/tmp/plugged')
Plug 'roxma/nvim-completion-manager'
if !has('nvim')
Plug 'roxma/vim-hug-neovim-rpc'
endif
call plug#end()
$ export NVIM_PYTHON_LOG_FILE=nvim.log NVIM_PYTHON_LOG_LEVEL=DEBUG vim8
$ vim -U NONE -u vimrc
There are three logs generated(see here):
- nvim.log_py3_cm_core
- nvim.log_py3_neovim_rpc_server
- nvim.log_py3_script
The error still persists in Vim8. NeoVim just works well.
from nvim-completion-manager.
I cannot reproduce it.
But notice that similar error could be triggered by tee | vim | tee
[roxma@roxma-pc ~]$ tee | /usr/bin/vim | tee
Vim: Warning: Output is not to a terminal
Vim: Warning: Input is not from a terminal
Maybe part of the plugin is trying to start vim.
In this case, try export NVIM_NCM_MULTI_THREAD=0
Enter vim8, wait for the error, do nothing, open another terminal, check the process tree with something like ps --forest
from nvim-completion-manager.
The issue doesn't show up by setting export NVIM_NCM_MULTI_THREAD=0
, in which case, NCM works fine in Vim8 and the previous delay problem goes away too.
Is the issue above only related to my local environment from your point of view? Does NVIM_NCM_MULTI_THREAD=0
make a difference to the user experience?
from nvim-completion-manager.
The issue doesn't show up by setting export NVIM_NCM_MULTI_THREAD=0
I think it's printing internally, but the message fails to forward to NCM core and than forward to vim.
You could try inspect the process tree anyway.
Is the issue above only related to my local environment from your point of view?
I think it is.
Does NVIM_NCM_MULTI_THREAD=0 make a difference to the user experience?
Generally peaking, a user cannot feel the difference.
NVIM_NCM_MULTI_THREAD=1
means each source is running as a thread, this mode consumes less memory
NVIM_NCM_MULTI_THREAD=0
means each source is running as a process, this mode is easier for debugging.
from nvim-completion-manager.
Sorry, @roxma . Just realized that my last feedback (works in Vim8 using NVIM_NCM_MULTI_THREAD=0
) was wrong π . I forgot to use the minimal vimrc :(. The right one should be as follows:
$ export NVIM_NCM_MULTI_THREAD=0
$ vim -U NONE -u vimrc
Any tips?
from nvim-completion-manager.
We're getting close, check the output of these commands
:python3 import sys
:python3 print(sys.executable)
:echo g:_cm_py3
from nvim-completion-manager.
:python3 import sys
:python3 print(sys.executable)
/usr/local/bin/vim
:echo g:_cm_py3
/usr/local/bin/vim
Not sure whether it's the wrong result, but Vim8 gets to work finally via let g:python3_host_prog="python3"
in the minimal vimrc π .
from nvim-completion-manager.
For Vim 8:
- roxma/vim-hug-neovim-rpc
g:python3_host_prog
orpython3
in your$PATH
I notice the requirement for Vim8 in README. I believe python3
has already been in $PATH
in my case, but I still have to set g:python3_host_prog
. So, may it's not complete to have only python3
in $PATH
, or we could have a better instruction?
from nvim-completion-manager.
The requirements are updated after this issue is figured out.
Have you updated both plugins to the latest version?
from nvim-completion-manager.
With the latest version and :echo has('python3')
not empty, there is no need to set g:python3_host_prog
! π
from nvim-completion-manager.
Related Issues (20)
- Quick question: Using tab to expand whatever is selected in popup menu
- Add support for .tex // Doesn't work for snippets in .tex files HOT 3
- does not autocomplete with some tags
- [Question] Is there somewhere a list of sources defined? HOT 8
- COBOL support HOT 1
- UltiSnips in VISUAL
- Don't show autocompletion popup after navigation keystrokes HOT 20
- how to directly autocompletion when I typed <cr> HOT 1
- Support βsmartβ filtering of autocomplete suggestons HOT 1
- Overwriting priority for a built-in completer HOT 2
- get βnvim-completion-manager core channel terminated.β everytime i edit a file in terminal env. HOT 7
- c key switches straight into insert mode HOT 3
- very high CPU rate HOT 3
- Disable a source when another is active HOT 2
- Completion not working anymore when using cquery
- Parameter expansion with ultisnips disables semantic clang completion
- How to customize python path for jedi complemention? HOT 1
- Completion shows part of the snippet HOT 1
- Word pattern for "Word from current buffer"
- Error in logger on startup HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nvim-completion-manager.