maralla / completor.vim Goto Github PK
View Code? Open in Web Editor NEWAsync completion framework made ease.
License: MIT License
Async completion framework made ease.
License: MIT License
would it be possible to make filename completion relative to file directory instead of current working directory? setting autochdir in vim breaks other things, so it isn't really an option.
thanks!
I tried to figure it out, but no luck.
Would you please kindly give me an example about php omni trigger?
Thanks.
Can I make it usable for java?
I have vim-go installed and pressing <C-x> <C-o>
opens autocompletion properly, otherwise nothing works.
I stopped gocode and ran it in debug mode and tested with both <C-x> <C-o>
and simply by pressing .
. When I press .
I get the following output from gocode
2017/04/26 21:14:27 Import path "github.com/stretchr/testify/assert" was not resolved
2017/04/26 21:14:27 Gocode's build context is:
2017/04/26 21:14:27 GOROOT: /usr/local/Cellar/go/1.8.1/libexec
2017/04/26 21:14:27 GOPATH: /Users/brett/go
2017/04/26 21:14:27 GOOS: darwin
2017/04/26 21:14:27 GOARCH: amd64
2017/04/26 21:14:27 BzlProjectRoot: ""
2017/04/26 21:14:27 GBProjectRoot: ""
2017/04/26 21:14:27 lib-path: ""
2017/04/26 21:14:27 extracted expression tokens: b
2017/04/26 21:14:27 Offset: 0
2017/04/26 21:14:27 Number of candidates found: 0
2017/04/26 21:14:27 Candidates are:
2017/04/26 21:14:27 =======================================================
Without changing anything I can press <C-x> <C-o>
and completion comes up and gocode prints the following
017/04/26 21:15:05 -------------------------------------------------------
2017/04/26 21:15:05 Found "testing" at "/usr/local/Cellar/go/1.8.1/libexec/pkg/darwin_amd64/testing.a"
2017/04/26 21:15:05 Found "github.com/stretchr/testify/assert" at "/Users/brett/go/pkg/darwin_amd64/github.com/blockloop/go-datastructures/vendor/github.com/stretchr/testify/assert.a"
2017/04/26 21:15:05 Error parsing input file (inner block):
2017/04/26 21:15:05 6:4: expected selector or type assertion, found ';'
2017/04/26 21:15:05 7:2: expected ';', found 'IDENT' assert
2017/04/26 21:15:05 8:2: expected ';', found 'EOF'
2017/04/26 21:15:05 8:2: expected '}', found 'EOF'
2017/04/26 21:15:05 extracted expression tokens: b
2017/04/26 21:15:05 Offset: 0
2017/04/26 21:15:05 Number of candidates found: 6
2017/04/26 21:15:05 Candidates are:
2017/04/26 21:15:05 func Size() int
2017/04/26 21:15:05 func findMin() *Node
2017/04/26 21:15:05 func insert(data int) *Node
2017/04/26 21:15:05 func search(data int) *Node
2017/04/26 21:15:05 var Root *Node
2017/04/26 21:15:05 var size int
2017/04/26 21:15:05 =======================================================
Is vim-go doing something different? Why is omnicomplete working, but the regular completion using .
or <tab>
not? The autocomplete is triggering, but gocode is reporting the vendor packages not resolving.
I have enabled tab completion as in the readme. This appears to be a problem with the command passed to gocode
. github.com/stretchr/testify/assert
is installed in vendor/.
When I use completor.vim, I got an error like this:
"main.cpp" 87L, 1927C
Error detected while processing function <SNR>109_complete[4]..completor#utils#get_completer:
line 1:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Users/svtter/.vim/plugged/completor.vim/pythonx/completor/api.py", line 14, in wrapper
return func(vim.bindeval('a:'))
File "/Users/svtter/.vim/plugged/completor.vim/pythonx/completor/api.py", line 22, in get_completer
return [c.format_cmd(), c.filetype, c.daemon, c.sync] if c else []
File "/Users/svtter/.vim/plugged/completor.vim/pythonx/completers/cpp.py", line 44, in format_cmd
'-I{}'.format(self.current_directory),
UnicodeEncodeError: 'ascii' codec can't encode characters in position 31-35: ordinal not in range(128)
line 2:
Traceback (most recent call last):
File "<string>", line 1, in <module>
NameError: name 'res' is not defined
E858: Eval did not return a valid python object
E471: Argument required
and here's my source file:
https://gist.github.com/Svtter/e5b338e448a0c843547d9e3dfb8dd81f
i setup completor and it work perfectly in everything except rust, when i try using rust with it i get an error
"Error detected while processing function 66_complete[7]..completor#do_complete[5]..completor#daemon#process[21]..267:
line 2:
E900: invalid job id"
i did all that the installation guide said, ie point it to my racer binary and install racer. racer works by itself in the command line ie typing in racer complete std::io:B and then getting a lot of output.
What is the proper way to toggle this plugin On/Off completely? I have been trying to get through your code but couldn't grasp it.
My use case is that I find autocompletion distracting 90% of the time and super useful 10% of the time. I am using completor only for Python with Jedi and don't need file or buffer completion.
Now for some reason completor doesn't seem to work when I set autocomplete on Tab as per README - which would be a solution. It works on Tab with buffers but with Jedi only when I have auto trigger set to 1.
let g:completor_auto_trigger = 1
Constant autocompletion is an overkill for me. I have been trying to move this option to ftplugin/python.vim but that has obvious side-effects of re-enabling completor in other buffers as well.
So I have created small function using completor#disable() and completor#enable()
let g:completor_toggle = 1
function! ToggleAutocomplete()
if g:completor_toggle == 1
let g:completor_toggle = 0
call completor#disable()
else
let g:completor_auto_toggle = 1
call completor#enable()
endif
endfunction
it seems to work but completor automagically re-enables itself after few keystrokes. I do not understand why and how.
It took me nearly 20mins to figure out why the JavaScript completion was not working at all when I realized that I set my JavaScript ft=javascript.jsx
& it seems that in order for it to work it ft
must be javascript
only. It will be nice to support other filetypes too.
I'd love to have a competer (or an option to the buffer completer) such that completions can come from all vim buffers.
I've done some work throwing together a typescript module for completor. I didn't want to submit a pull request because I didn't write unit-tests for it, and I'm not sure if what I did is the best way (or even a good way) to do it.
TSServer requires a file to be "opened" before doing completions on it, i.e. send the open command to TSServer with the filename. I don't know if completor has facilities for this in place, and I don't know enough vimscript to try that route, so I threw it in the request
function. That means the completions don't start until the second request.
TSServer also does much more than completions, but is painfully under-documented. I had enough after getting this working.
So feel free to use this as a starting point.
https://gist.github.com/sloat/6ef3a0cc582dc00208e8dde6cfc1d785
Right now completor tries to complete even if you write a single character. There should be an option to limit the input pattern. Example options from other plugins:
https://github.com/Shougo/deoplete.nvim/blob/master/doc/deoplete.txt#L648
https://github.com/Shougo/neocomplete.vim/blob/master/doc/neocomplete.txt#L290
https://github.com/Valloric/YouCompleteMe/blob/master/doc/youcompleteme.txt#L1861
Without this, it tries to complete everytime the user wants to write something, which is not performant.
Hi,
I have node and NPM installed. I installed the plugin via Vim-Plug
and ran make js
in plugin's directory (didn't get any errors), but when I try to use it with .js files I only get buffer's keywords as completion. I tested it on Mint 17.3 and WSL. I also tried c++ completion which works fine.
Btw, thank you for the plugin.
It would be a killer feature if one could have the ultisnips triggers shown at the completion popup, i think youcompleteme does that. But this is so lightweight i would rather use it here.
I mean, one could still use ultisnips w/o being shown the possible triggers, but i got so used to it being shown to me and i created a bunch of custom ones for different cases, which now makes it difficult for me to have it all in my head.
Well, i hope it can be integrated one day. Thanks for your already amazing plugin tho.
When i require built in node modules like: path
, http
, ... i get all possible completion items on them after hitting .
( |
is cursor position ):
var path = require('path');
path.| // <-- Here i get all possible items as soon as i hit DOT
But if i require a module like: lodash i get nothing!
var lodash = require('lodash');
lodash.| // <-- Here i get nothing after hitting DOT
// Also manually feed <C-x><C-u> echos 'pattern not found'
Even using modules just do completions First Time that i require them, and if i close vim and come back to edit same file i don't get completions anymore:
foo.js
module.exports = {
version: '0.1.0'
}
app.js
var foo = require('./foo');
foo.| // <-- Here i get *version* just first time if i directly come from foo and require it
// and if i close vim and come back i get: 'pattern not found' on hitting DOT
// or <C-x><C-u> manually.
The popup menu does not popup until I moved the mouse in GUI MacVim (mvim). But it works very well under terminal MacVim (vim)
I can't tell the problem is caused by Completor.vim, PhpComplete or MacVim it self.
Popup menu works both GUI and Terminal MacVim
set nocompatible
filetype off
execute 'source ~/.vim/bundle/vim-plug/plug.vim'
call plug#begin('~/.vim/bundle/')
Plug 'junegunn/vim-plug'
" Put your bundle below here
Plug 'maralla/completor.vim'
Plug 'shawncplus/phpcomplete.vim'
" Put your bundle above here
call plug#end()
syntax on
filetype plugin indent on
" Put your plugin settings below here
let g:completor_php_omni_trigger = '([$\w]+|use\s*|->[$\w]*|::[$\w]*|implements\s*|extends\s*|class\s+[$\w]+|new\s*)$'
" Put _our plugin settings above here
:e test.php
or set ft=php
<?php
$date = new DateTime(); // Popup will show here
$date-> // Popup will not show here, until you moved the mouse corsor
Terminal MacVim with completor.vim & phpcomplete.vim, you can see the popup menu show up automatically.
GUI MacVim with completor.vim & phpcomplete.vim, you can see the popup menu show up until I move the mouse cursor.
Hi I've been trying to bind the completion trigger to <C-Space>
but to no avail.
I'm quite the newb when it comes to bindings in vim, but after some Googling managed to come up with:
inoremap <expr> <C-@> pumvisible() ? "\<C-n>" : "\<C-x>\<C-u>\<C-p>"
Something still doesn't seem right however, I think my main problem is not fully understanding how the completions are triggered. If anyone could shed some light on this, it would be much appreciated.
Shipping completers in external repository would allow users to reuse the server piece and add more features such as go to definition, rename. Useful for completions provided by Language Server Protocol such as typescript server. This would also mean only one instance of the server is running to provide IDE like features.
I think only some of the completers such as buffer, files should ship by default similar to how depoplete does it.
So, when I tried to use completor with JavaComplete2, I experienced issue with cursor jumping to top of class when writing in insert mode. With completor disabled (or with wrong omni_trigger) when using just to trigger JavaComplete2 omnifunc, this issue is not present. Here is my current completor configuration:
let g:completor_auto_trigger = 0
let g:completor_min_chars = 1
let g:completor_java_omni_trigger = "\\w+$|[\\w\\)\\]\\}'\"]+\\.\\w*$"
I tried this also with auto_trigger enabled and min_chars at 3, nothing changed.
Example:
import
(with a trailing space). It'll show the list of all modulesa
. It'll show all modules starting with a
Using the following options:
let g:completor_python_omni_trigger = '.*'
let g:completor_min_chars = 1
<C-N>
to choose candidate, the characters before cursor will repeat.set nocompatible
filetype off
execute 'source ~/.vim/bundle/vim-plug/plug.vim'
call plug#begin('~/.vim/bundle/')
Plug 'junegunn/vim-plug'
" Put your bundle below here
Plug 'maralla/completor.vim'
Plug 'shawncplus/phpcomplete.vim'
Plug 'SirVer/ultisnips'
Plug 'honza/vim-snippets'
" Put your bundle above here
call plug#end()
syntax on
filetype plugin indent on
" Put your plugin settings below here
let g:completor_php_omni_trigger = '([$\w]+|use\s*|->[$\w]*|::[$\w]*|implements\s*|extends\s*|class\s+[$\w]+|new\s*)$'
let g:UltiSnipsUsePythonVersion = 2
let g:UltiSnipsExpandTrigger="<C-J>"
let g:UltiSnipsJumpForwardTrigger="<C-J>"
let g:UltiSnipsJumpBackwardTrigger="<C-K>"
" Put _our plugin settings above here
:e test.php
or set ft=php
<?
the popup menu will show up, and you can choose candidate by <C-N>
, you will see the characters repeat before the curosr.foreach
the popup menu will show up, and you can see it not end with [snip], choose it and hit <C-J>
to expand it, then you can't not use <C-J>
to jump next positionNot sure if this is worth implementing or not but might be useful
Rencently I start migrating some old plugin with the modern replacement.
Then I found completor.vim, it's very impressive.
But I meet an issue that c completion freeze on windows.
My environment is windows 10 + vim8 + python3.5
When I input some characters and the clang completion was triggered(no competion window showed up), vim will freeze until I press ctrl-c
I tried python completion it works fine.
And I can't reproduce this issue on linux and macos
Did anyone meet the same issue with me?
Thanks
There is no way to disable these fallback completers. It slows down Vim for large files because it tries to complete for every single word. We should make them optional or provide a setting to disable it.
Thanks for this plugin! Is it possible to customize the behavior of some keys? For example
Hi,
I've started getting this error today, not sure what caused it. I didn't update plugins for a while (using vim-plug). I did update brew packages, not sure if vim was on the list. Anyway, here's the error:
Error detected while processing /Users/predmijat/dotfiles/.vim/plugins/completor.vim/autoload/completor/utils.vim:
line 65:
E126: Missing :endfunction
Error detected while processing function <lambda>2[1]..<SNR>94_complete:
line 4:
E117: Unknown function: completor#utils#get_completer
E15: Invalid expression: completor#utils#get_completer(s:status.ft, s:status.input)
line 5:
E121: Undefined variable: info
E116: Invalid arguments for function empty(info) | return | endif
E15: Invalid expression: empty(info) | return | endif
line 6:
E121: Undefined variable: info
E15: Invalid expression: info
line 8:
E121: Undefined variable: is_sync
As far as I can tell, there's no endfuction missing, variable info is defined...
vim is installed via brew - brew install vim --with-luajit
, I've tried to remove it with brew uninstall --force vim
and reinstall it, error persists.
Thanks!
echo has("job") 0
echo has("timers") 1
echo has("lambda") 0
how can i get job and lambda work on windows?
i'm used gvim 8.0 on windows.
haven't gnu make. so i can't run make js
.
I'm too lazy to manually run the command cd path && npm install
.
but vim-plug have a post-install hook can do it.
there is a sample:
function! TernInstall(info)
if ( a:info.status ==# 'installed' || a:info.force ) && executable('npm')
call system('cd ./pythonx/completers/javascript && npm install')
endif
endfunction
Plug 'maralla/completor.vim', {
\ 'do': function('TernInstall')
\ }
then run PlugUpdate! completor.vim
for who need.
Is it possible to disable a semantic completer for a buffer / file mask / file type, and switch to a fallback one (i.e., to a buffer completer)?
The general issue appears to be if I type something and hit escape prior to the autocompletion buffer appearing, that my cursor jumps upwards. I have set g:completor_auto_trigger
to 1.
I can replicate this specifically with the below example in python.
If I have a module imported, and I type the module name, it tries to populate an autocompletion buffer with recommendations. Then when I type a period, it tries to populate an autocompletion buffer with recommendations from the module. But if I type the period before the first buffer appears, and then escape before the second buffer appears, then my cursor jumps up a seemingly arbitrary amount. I've been able to narrow this down to this plugin (all other plugins are disabled). This example triggers it for me:
import math
mat # Finish typing 'math.' then hit esc
If you complete typing the word math.
and escape before the autocompletion buffer pops up, your cursor should go up one line.
In some of my files my cursor will jump up ~20 lines with 100% reproducibility.
Is it possible to do something like
let g:completor_python_binary = `which python`
to ensure completor and jedi use the currently active virtualenv for completion?
[Sorry, I realize this is possibly a very simple vim question rather than a subtle completor question!]
When I type std::
and the namespace members list is loaded, I don't want to refresh it on every character I type, it's enough to just filter it. Is there a way to enable this behaviour?
To reproduce it open the command line window (:<c-f>
) and start typing a command.
When the autocomplete suggestions are found it opens a popup (this is fine) but when the popup closes it produces this error:
Error detected while processing CompleteDone Auto commands for "*":
E11: Invalid in command-line window; <CR> executes, CTRL-C quits: pclose | endif
This is very annoying because it steals the focus away from the text we're trying to type.
Traceback (most recent call last):
File "<string>", line 5, in <module>
File "/home/wodesuck/.vim/plugged/completor.vim/pythonx/completor/__init__.py", line 121, in get_completions
return self.parse(base)
File "/home/wodesuck/.vim/plugged/completor.vim/pythonx/completers/cpp.py", line 66, in parse
if not item.startswith('COMPLETION:'):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str
environment:
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Oct 24 2016 17:33:26)
Included patches: 1-46
Compiled by Arch Linux
It seems racer daemon
can not take quoted filename as an argument. When I drop the quote, racer
can successfully find the file and give out matches.
But another problem arises, that a filename containing spaces can't be found. Having tried to double quoted the filename or escape the spaces with \
, but no luck, It can be an issue on the racer
side.
I opened up a pull request #64 to partially fix this.
Hi, thanks for this plugin.
Could you also support a Neosnippet source ?
Currently autocompletion is enabled in all buffers. This is useful for coding, but not really necessary when you write prose, or use plugins like Unite.
There should be option to enable (or to disable) autocompletion only for some filetypes.
Good job here. :)
I'm not sure how this works behind the scenes, but vimtex has its own omni completion function (it completes bibliography entry names, source files to include and so on) and when using NeoComplete or YouCompleteMe you can set up custom triggers to call it, like this:
let g:neocomplete#sources#omni#input_patterns.tex =
\ '\v\\%('
\ . '\a*cite\a*%(\s*\[[^]]*\]){0,2}\s*\{[^}]*'
\ . '|\a*ref%(\s*\{[^}]*|range\s*\{[^,}]*%(}\{)?)'
\ . '|hyperref\s*\[[^]]*'
\ . '|includegraphics\*?%(\s*\[[^]]*\]){0,2}\s*\{[^}]*'
\ . '|%(include%(only)?|input)\s*\{[^}]*'
\ . '|\a*(gls|Gls|GLS)(pl)?\a*%(\s*\[[^]]*\]){0,2}\s*\{[^}]*'
\ . '|includepdf%(\s*\[[^]]*\])?\s*\{[^}]*'
\ . '|includestandalone%(\s*\[[^]]*\])?\s*\{[^}]*'
\ . ')'
(The full documentation is here.)
Is there a way to do something like that here?
Also those other plugins work with UltiSnips too, completing the snippet triggers. That would be great!
Is it possible to make buffer completion trigger also on non-Latin symbols? I use auto completion while writing some documentation, too, and that would be very helpful for me :).
Hi
When i want to populate a line from below using C-e
and the completion popup window is open it does not copy the text from below.
Thanks
If a buffer is not saved as a file, completor doesn't seen to work there... Is it an intended behaviour, or is there way to fix it?
I only get normal identifier completions + UltiSnips completions and the completions show up with slight delay. Some facts:
sudo pip3 install jedi
python3
shellpython3
shell print sys.executable
gives /usr/bin/python3
let g:completor_python_binary = "/usr/bin/python3"
in my .vimrcWhat am I missing and how could I debug this more?
SourceKittenDaemon works great on MacOS to provide what I believe is the necessary information to implement completion. It is done through a RESTish api. Details on the super simple protocol are as follows.
https://github.com/terhechte/SourceKittenDaemon/blob/master/Protocol.org
I am just not clear exactly on what the intended API is that you are providing to add support for other languages.
I am also not sure what the details of the sync and daemon options on the completor are really for.
I tried to look and see how to implement support for this. But, it wasn't super clear.
I know from just looking at the code I need to provide something like the following. However, the following causes vim to hang indefinitely when it triggers a completion. I can see the completion request show up in the SourceKittenDaemon logs. So, the request seems to be happening.
Anyways, any help you could provide would be great!!
import vim
from completor import Completor
class Swift(Completor):
filetype = 'swift'
trigger = r'(?:\w{2,}\w*|\.\w*)$'
def offset(self):
line, col = vim.current.window.cursor
line2byte = vim.Function('line2byte')
return line2byte(line) + col - 1
def format_cmd(self):
binary = self.get_option('completor_swiftsourcekittenclient_binary') or 'sourcekittenclient'
return [binary, '{}'.format(self.tempname), self.offset()]
def parse(self, items):
print("DREW")
print(items)
print("DREW END")
res = []
# for item in items:
# parts = item.split(b',,')
# res.append({
# 'word': parts[1],
# 'menu': parts[2]
# })
return res
sourcekittenclient
#!/usr/bin/env python
import sys
import urllib2
class SourceKittenDaemon(object):
def __init__(self, port):
self.__port = port
def complete(self, path, offset):
request = urllib2.Request("http://localhost:%d/complete" % self.__port)
request.add_header("X-Path", path)
request.add_header("X-Offset", offset)
response = urllib2.urlopen(request).read()
return response
s = SourceKittenDaemon(8081)
sys.stdout.write(s.complete(sys.argv[1], sys.argv[2]))
I guess it would also be helpful to know that I am running SourceKittenDaemon independently because I just want to see the thing work before I invest time getting the plugin to manage the life cycle of the SourceKittenDaemon and its configuration.
So I have noticed an interesting phenomena that seems to occur rather inconsistently. I've created a small video that shows the issue - essentially it appears that sometimes as I type out characters, the results flicker a bit, as if they go away and re-appear with updated results.
It would be nice if perhaps the results at least stuck around, even if they are not 100% accurate since I find the visual noise more annoying than anything.
Hi
I could not find an option to open the completion window only when i press a trigger like or <Ctrl-N/P>
Can you please add this to the document ?
I was using deoplete before and I rather miss the tmux completion (tmux-complete). Any chance of getting a tmux completer?
I have tried let g:completor_blacklist = ['tagbar', 'qf', 'netrw', 'unite']
and let g:completor_whitelist = ['vimwiki']
, but those doesn't enable completion of vimwiki
.
I tried those options individually and together.
I'd like to have omni-completion for references in a latex document. Vimtex provides results via an omnifunc (https://github.com/lervag/vimtex/blob/master/doc/vimtex.txt#L1487).
I have added following pattern to my vimrc based on lervag/vimtex#453 (comment):
let g:completor_tex_omni_trigger =
\ '\\(?:'
\ . '\w*cite\w*(?:\s*\[[^]]*\]){0,2}\s*{[^}]*'
\ . '|\w*ref(?:\s*\{[^}]*|range\s*\{[^,}]*(?:}{)?)'
\ . '|hyperref\s*\[[^]]*'
\ . '|includegraphics\*?(?:\s*\[[^]]*\]){0,2}\s*\{[^}]*'
\ . '|(?:include(?:only)?|input)\s*\{[^}]*'
\ .')'
First of all, this works.
\documentclass{article}
% This is the sample bib file
\begin{filecontents}{demo.bib}
@book{Saussure1995,
Author = {Ferdinand de Saussure},
Origyear = {1916},
Publisher = {Payot},
Title = {Cours de Linguistique G{\'e}n{\'e}rale},
Year = {1995}}
\end{filecontents}
\usepackage{natbib,bibentry}
\bibliographystyle{apalike}
\begin{document}
\bibliography{demo}
This is a complete citation in the middle of the text:
\bibentry{Saussure1995}
\cite{
\end{document}
You have to compile this file once to generate the file demo.bib
so that omni-completion can work (relies on the file specified in \bibliography{demo.bib}
.
The issue:
After entering \cite{
the waiting time for the reference is a little bit too long. I suspect this is due to a slow vimtex-omnifunc. But I would have hoped, that there would be a caching to speed things up. However, things do not change when I want to enter a second citation. Does completor caches omni-completion results for the next invocation?
BTW, I do not like that you fix cot=menuone
setting. I would prefer it if you would leave this to the user.
When python 3 is installed ( checked with has('python3')
and it returns 1 ), completor throws the following error and no omni-completion:
Error detected while processing function <SNR>90_complete[7]..completor#do_complete[2]..completor#trigger[6]..completor#utils#get_completions[1]..provider#python3#Call:
line 18:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Users/david/.vim/plugged/completor.vim/pythonx/completor/api.py", line 14, in wrapper
return func(vim.bindeval('a:'))
File "/Users/david/.vim/plugged/completor.vim/pythonx/completor/api.py", line 28, in get_completions
return c.get_completions(args['msg']) if c else []
File "/Users/david/.vim/plugged/completor.vim/pythonx/completor/__init__.py", line 141, in get_completions
return self.parse(base)
File "/Users/david/.vim/plugged/completor.vim/pythonx/completers/common/omni.py", line 61, in parse
return omnifunc(0, to_bytes(base, get_encoding())[codepoint:])
File "/Users/david/.vim/plugged/completor.vim/pythonx/completor/patch.py", line 30, in inner
return _bytes(ret)
File "/Users/david/.vim/plugged/completor.vim/pythonx/completor/patch.py", line 11, in _bytes
data[i] = _bytes(e)
File "/Users/david/.vim/plugged/completor.vim/pythonx/completor/patch.py", line 13, in _bytes
Error detected while processing function <SNR>90_complete[7]..completor#do_complete[2]..completor#trigger[6]..completor#utils#get_completions[1]..provider#python3#Call:
line 18:
for k, v
Whithout python3 everything works fine but if completions include non-ascii charachters it also throws encoding error with python2.
So there is two issues:
vimR :version
returns:
NVIM 0.2.0-dev
Build type: Release
Compilation:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-Wconversion
-U_FORTIFY_SOURCE
-D_FORTIFY_SOURCE=1
-O2
-DNDEBUG
-DDISABLE_LOG
-Wall
-Wextra
-pedantic
-Wno-unused-parameter
-Wstrict-prototypes
-std=gnu99
-Wvla
-fstack-protector-strong
-fdiagnostics-color=auto
-DINCLUDE_GENERATED_DECLARATIONS
-DHAVE_CONFIG_H
-I/Users/hat/.jenkins/workspace/vimr_build/neovim/build/config
-I/Users/hat/.jenkins/workspace/vimr_build/neovim/src
-I/Users/hat/.jenkins/workspace/vimr_build/neovim/.deps/usr/include
-I/Users/hat/.jenkins/workspace/vimr_build/neovim/.deps/usr/include
-I/Users/hat/.jenkins/workspace/vimr_build/neovim/.deps/usr/include
-I/Users/hat/.jenkins/workspace/vimr_build/neovim/.deps/usr/include
-I/usr/local/opt/gettext/include
-I/usr/include
-I/Users/hat/.jenkins/workspace/vimr_build/neovim/build/src/nvim/auto
-I/Users/hat/.jenkins/workspace/vimr_build/neovim/build/include
Compiled by [email protected]
Optional features included (+) or not (-): +acl +iconv +jemalloc -tui
For differences from Vim, see :help vim-differences
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/usr/local/share/nvim"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.