prabirshrestha / asyncomplete-ultisnips.vim Goto Github PK
View Code? Open in Web Editor NEWprovides ultisnips autocomplete for asyncomplete.vim
License: MIT License
provides ultisnips autocomplete for asyncomplete.vim
License: MIT License
hi, I have problem with expanding snippets inline.
object.inj
I have snippet called inj.
That's possible to exapnd it?
Based on your minimal.vimrc:
" install: curl https://raw.githubusercontent.com/prabirshrestha/vim-lsp/master/minimal.vimrc -o /tmp/minimal.vimrc
" uninstall: rm /tmp/plug.vim && rm -rf /tmp/plugged
" run vim/neovim with minimal.vimrc
" vim -u minimal.vimrc
" :PlugInstall
set nocompatible hidden laststatus=2
if !filereadable('/tmp/plug.vim')
silent !curl --insecure -fLo /tmp/plug.vim
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
endif
source /tmp/plug.vim
call plug#begin('/tmp/plugged')
Plug 'SirVer/ultisnips'
Plug 'honza/vim-snippets'
Plug 'prabirshrestha/asyncomplete.vim'
Plug 'prabirshrestha/async.vim'
Plug 'prabirshrestha/vim-lsp'
Plug 'prabirshrestha/asyncomplete-lsp.vim'
Plug 'prabirshrestha/asyncomplete-ultisnips.vim'
call plug#end()
imap <c-space> <Plug>(asyncomplete_force_refresh)
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
inoremap <expr> <cr> pumvisible() ? "\<C-y>\<cr>" : "\<cr>"
autocmd! CompleteDone * if pumvisible() == 0 | pclose | endif
if executable('pyls')
" pip install python-language-server
au User lsp_setup call lsp#register_server({
\ 'name': 'pyls',
\ 'cmd': {server_info->['pyls']},
\ 'whitelist': ['python'],
\ })
endif
let g:UltiSnipsExpandTrigger="<c-e>"
call asyncomplete#register_source(asyncomplete#sources#ultisnips#get_source_options({
\ 'name': 'ultisnips',
\ 'whitelist': ['*'],
\ 'completor': function('asyncomplete#sources#ultisnips#completor'),
\ }))
Without honza/vim-snippets
, completing after the period .
:
l = [1, 2, 3]
l.
triggers the opening of the completion window.
With honza/vim-snippets
, it does not open the completion window, instead, I get Pattern not found
in my (custom) status:
or just no completion using the minimal.vimrc
. Note that this screenshot is Rust code (using vim-lsp
, asyncomplete-lsp
, and Rusts rls
), so it's not only on Python.
Starting to type right after the .
or ::
starts completing again.
I've recently (last few days) started seeing the following on startup:
Error detected while processing /usr/.../dotfiles/vim/startup/plugins.vim:
line 84:
E117: Unknown function: asyncomplete#sources#ultisnips#get_source_options
E116: Invalid arguments for function asyncomplete#register_source
Press ENTER or type command to continue
I've already updated my config to support this commit. Is there something I'm missing from my config?
Can you add a LICENSE please? Asyncomplete uses MIT License.
When i register this as a completion source and try to select a snippet and hit <enter>,
nothing happens.
my .vimrc contains
let g:asyncomplete_auto_popup = 1
let g:asyncomplete_remove_duplicates = 1
let g:lsp_async_completion = 1
" Enable disagnostics
let g:lsp_signs_enabled = 1
let g:lsp_diagnostics_echo_cursor = 1
" [...] other language servers
if has('python3')
let g:UltiSnipsExpandTrigger="<c-l>"
"let g:UltiSnipsExpandTrigger="<c-y>"
call asyncomplete#register_source(asyncomplete#sources#ultisnips#get_source_options({
\ 'name': 'ultisnips',
\ 'whitelist': ['*'],
\ 'completor': function('asyncomplete#sources#ultisnips#completor'),
\ }))
endif
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
inoremap <expr> <cr> pumvisible() ? "\<C-y>" : "\<cr>"
nnoremap <buffer> ,n :LspNextError<CR>
nnoremap <buffer> ,p :LspPreviousError<CR>imap <m-r> <Plug>(asyncomplete_force_refresh)
set completeopt=menu,menuone,preview,noinsert
Is this plug-in deprecated?
The documentation for asyc.vim says to use this repository for snippets, and the documentation for vim-lsp.vim says to use thomasfaingnaert/vim-lsp-ultisnips.
From Installing, it looks like this plugin requires vim has +python3
feature. Is that true?
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.