Comments (4)
Similar issue.
autozimu/LanguageClient-neovim#15
from asyncomplete.vim.
Additional report.
Duplicate "$"
completion for JavaScript
file.
Screenshot
type
selection
Duplicate "$".
Preparation
mkdir -p vuesample
cd vuesample
npm install vue
tsc --init
example.js
vim -N -u minimal.vimrc example.js
|
is cursor.
import Vue from 'vue';
var data = { a: 1 };
var vm = new Vue({
el: '#example',
data: data
});
vm.$e|
Minimal vimrc (minimal.vimrc)
" plugin (use vim-plug) {{{
call plug#begin('~/.vim/plugged')
Plug 'prabirshrestha/async.vim'
Plug 'prabirshrestha/asyncomplete.vim'
Plug 'prabirshrestha/vim-lsp'
Plug 'prabirshrestha/asyncomplete-lsp.vim'
call plug#end()
" }}}
" log
let g:asyncomplete_log_file = expand('/tmp/asyncomplete.log')
"
" [LSP]
" TypeScirpt JavaScript JSX
"
" [install]
" npm i -g typescript-language-server
"
" [command]
" typescript-language-server --stdio
"
if executable('typescript-language-server')
augroup LspTypeScriptJavaScriptAndJsx
au!
au User lsp_setup call lsp#register_server({
\ 'name': 'typescript-language-server',
\ 'cmd': { server_info->[&shell, &shellcmdflag, 'typescript-language-server --stdio']},
\ 'root_uri':{server_info->lsp#utils#path_to_uri(lsp#utils#find_nearest_parent_file_directory(lsp#utils#get_buffer_path(), 'tsconfig.json'))},
\ 'whitelist': ['typescript', 'javascript', 'javascript.jsx']
\ })
" omnifunc
autocmd FileType typescript,javascript,javascript.jsx setlocal omnifunc=lsp#complete
" map
au FileType typescript,javascript,javascript.jsx nnoremap <buffer><silent> gd :<C-u>LspDefinition<CR>
au FileType typescript,javascript,javascript.jsx nnoremap <buffer><silent> gD :<C-u>LspReferences<CR>
au FileType typescript,javascript,javascript.jsx nnoremap <buffer><silent> gs :<C-u>LspDocumentSymbol<CR>
au FileType typescript,javascript,javascript.jsx nnoremap <buffer><silent> gS :<C-u>LspWorkspaceSymbol<CR>
au FileType typescript,javascript,javascript.jsx nnoremap <buffer><silent> gQ :<C-u>LspDocumentFormat<CR>
au FileType typescript,javascript,javascript.jsx vnoremap <buffer><silent> gQ :LspDocumentRangeFormat<CR>
au FileType typescript,javascript,javascript.jsx nnoremap <buffer><silent> K :<C-u>LspHover<CR>
au FileType typescript,javascript,javascript.jsx nnoremap <buffer><silent> <F1> :<C-u>LspImplementation<CR>
au FileType typescript,javascript,javascript.jsx nnoremap <buffer><silent> <F2> :<C-u>LspRename<CR>
augroup end
endif
from asyncomplete.vim.
Can you give v2 branch a try. It is stil lat an early phase so not all the features have been ported yet.
from asyncomplete.vim.
v2 is now merged in master. Please update to latest and give it a try again.
from asyncomplete.vim.
Related Issues (20)
- Completion of buffer/workspace content HOT 3
- Auto-select the first candidate in the popup HOT 4
- Unable to list all the matching candidates if struct having a lot of methods for Go HOT 1
- Enter a new line ONLY when nothing is selected?
- Popup doesn't show for eclipse-jdt-ls HOT 6
- Avoid crlf line endings HOT 13
- [help] Is it possible to limit completion to one level instead of searching recursively? HOT 1
- [Question] How to auto popup struct field or class memer in C/C++ when you type dot or -> HOT 4
- Vim9Script HOT 1
- Add smart-case sensitive completion HOT 1
- How to disable arguments hinting window ? HOT 1
- [feature-request] Use a customizable popup window instead of vim native completion popup ? HOT 1
- Completion menu is opening/closing rapidly HOT 1
- asyncomplete should popup only snippets
- Dependency Dashboard HOT 1
- Strange behaviour with vim-lsp+clangd+asyncomplete-lsp HOT 1
- different complete behavier when open a file directly and enter nvim then use `e` command. HOT 1
- asyncomplete lags during gdscript completion (godot lsp) HOT 2
- Omni-completion is causing some issue with autocomplete, and doesn't work most of the time HOT 1
- nextword auto complete not working
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 asyncomplete.vim.