-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make JavaScript in VimBox Awesome For Once. #36
Comments
In other computer I have installed YouCompleteMe that uses TernJS which has quiet nice autocomplete. But I'm quite sure with some configurations FlowType or TypeScript can provide a better autocomplete |
Yes, it would be nice to support either TS, or Flow. I could never get YouCompleteMe to behave like all the other modern IDEs' autocomplete (where you can hit enter to accept a result). Maybe they've added that feature? I should check again. |
After some messing around I managed to get JS liniting up and running, but the linter didn't underline exact area of the error, just the first character which is really hard to spot. |
What plugins/technologies do you use? It would be great to be able to use typescript or flow. |
asyncomplete.vim is an asynchronous autocomplete plugin written in pure vimscript and works on vim8 and neovim in mac, linux and windows and is very easy to setup. There is already a source for Flow https://github.com/prabirshrestha/asyncomplete-flow.vim and TypeScript https://github.com/prabirshrestha/asyncomplete-tscompletejob.vim. I have been using TypeScript autocomplete for couple of months now at work. |
Very interesting, thanks for reporting. How does it work with Ultisnips, and repeat |
Ultisnips is supported by https://github.com/prabirshrestha/asyncomplete-ultisnips.vim and neosnippet is supported by https://github.com/prabirshrestha/asyncomplete-neosnippet.vim If you are using tab to select completion you can set Could you give an example of how you want to use
Caching and popup logic is actually very similar to how VsCode shows autocomplete. More details at prabirshrestha/asyncomplete.vim#3 and algorithm is mentioned at roxma/nvim-completion-manager#30 (comment) if you want to dig deeper. Currently the biggest feature |
Thanks! This is helpful information. I'll have to try this, it might make a good choice for VimBox. Unfortunately, VimBox isn't set up for me to easily try stuff on my (currently) hacked / forked setup of VimBox (trying out some new window management for a while before upstreaming). I would love it if someone could make VimBox load from arbitrary forks/local-clones of VimBox instead of having a setup that redirects your symlinks. I'm sure this is possible. I will definitely check this out though. |
FYI: asyncomplete.vim now supports the Language Server Protocol. It is still work in progress (hence in dev branch) but you should be able to use it for completion as well as go to definition, finding workspaces and document symbols. It is fully async and works in both vim8 and neovim as well as on Max, Linux and Windows. Plug 'prabirshrestha/async.vim'
Plug 'prabirshrestha/vim-lsp', { 'branch': 'dev' }
Plug 'prabirshrestha/asyncomplete.vim'
Plug 'prabirshrestha/asyncomplete-lsp.vim'
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
if executable('rls')
" https://github.com/rust-lang-nursery/rls#setup
au User lsp_setup call lsp#register_server({
\ 'name': 'rls',
\ 'cmd': {server_info->['rustup', 'run', 'nightly', 'rls']},
\ 'whitelist': ['rust'],
\ })
endif
if executable('flow-language-server')
" https://github.com/flowtype/flow-language-server#building-an-editor-integration
au User lsp_setup call lsp#register_server({
\ 'name': 'flow-language-server',
\ 'cmd': {server_info->['flow-language-server', '--stdio']},
\ 'whitelist': ['javsacript'],
\ })
endif For javascript, one could try flow-language-server but I faced with some bugs on windows. facebookarchive/flow-language-server#48. |
VimBox should come with the most common integrations out of the box, such that all the plugins(syntastic) work well together. I'd really appreciate if someone would share/test what you know to work well, and include it in VimBox so others can benefit.
The text was updated successfully, but these errors were encountered: