mirror of
https://github.com/prurigro/darkcloud-vimconfig.git
synced 2024-11-21 22:42:31 -05:00
Replace neocomplete with deoplete
This commit is contained in:
parent
21ba96d480
commit
5343c44763
12 changed files with 61 additions and 64 deletions
15
.gitmodules
vendored
15
.gitmodules
vendored
|
@ -103,9 +103,6 @@
|
|||
[submodule "vim/bundle/ReplaceWithRegister"]
|
||||
path = vim/bundle/ReplaceWithRegister
|
||||
url = https://github.com/prurigro/ReplaceWithRegister.git
|
||||
[submodule "vim/bundle/neocomplete.vim"]
|
||||
path = vim/bundle/neocomplete.vim
|
||||
url = https://github.com/Shougo/neocomplete.vim
|
||||
[submodule "vim/bundle/FastFold"]
|
||||
path = vim/bundle/FastFold
|
||||
url = https://github.com/Konfekt/FastFold.git
|
||||
|
@ -124,3 +121,15 @@
|
|||
[submodule "vim/bundle/lightline-ale"]
|
||||
path = vim/bundle/lightline-ale
|
||||
url = https://github.com/maximbaz/lightline-ale
|
||||
[submodule "vim/bundle/deoplete.nvim"]
|
||||
path = vim/bundle/deoplete.nvim
|
||||
url = https://github.com/Shougo/deoplete.nvim
|
||||
[submodule "vim/bundle/nvim-yarp"]
|
||||
path = vim/bundle/nvim-yarp
|
||||
url = https://github.com/roxma/nvim-yarp
|
||||
[submodule "vim/bundle/vim-hug-neovim-rpc"]
|
||||
path = vim/bundle/vim-hug-neovim-rpc
|
||||
url = https://github.com/roxma/vim-hug-neovim-rpc
|
||||
[submodule "vim/bundle/neco-syntax"]
|
||||
path = vim/bundle/neco-syntax
|
||||
url = https://github.com/Shougo/neco-syntax.git
|
||||
|
|
10
README.md
10
README.md
|
@ -9,13 +9,13 @@ A theme, config and collection of plugins for Vim.
|
|||
* **Coreutils**: Required by the _update_ script.
|
||||
* **Git**: Required by the _update_ script and git-related plugins.
|
||||
* **Python**: Required by the _gundo.vim_ and _MatchTagAlways_ plugins.
|
||||
* **Lua**: Required by the _neocomplete.vim_ plugin.
|
||||
|
||||
## Optional Requirements ##
|
||||
|
||||
* **Compilers, Linters and Runtimes**: The ale plugin can use compilers, linters and runtimes to provide real-time syntax checking.
|
||||
* **CTags**: Required by the _tagbar_ and _neocomplete_ plugins as well as the _gentags_ script ([ctags website](http://ctags.sourceforge.net)).
|
||||
* **CTags**: Required by the _tagbar_ and _deoplete_ plugins as well as the _gentags_ script ([ctags website](http://ctags.sourceforge.net)).
|
||||
* **Powerline Fonts**: Required to enable the fancier looking status line ([powerline-fonts repo](https://github.com/Lokaltog/powerline-fonts)).
|
||||
* **Python 3 and Neovim Python Module**: Required for _deoplete_ autocompletion
|
||||
|
||||
## Distribution Features ##
|
||||
|
||||
|
@ -60,6 +60,7 @@ As usual, to have your system use `vimpager` in place of `less`, you'll need to
|
|||
* `g:autostartfiler`: **1** = Start the filer file manager when vim is run and the buffer is empty | **0** = Do nothing when vim is run and the buffer is empty (_default_: **1**)
|
||||
* `g:autostartchecker`: **1** = Check syntax once an appropriate file is loaded | **0** = Check syntax only after syntax checking is toggled on (_default_: **0**)
|
||||
* `g:autostarttagbar`: **1** = Have the tagbar load automatically when a compatible format is run | **0** = The tagbar will stay hidden until triggered on demand with its toggle (_default_: **0**)
|
||||
* `g:disablecompletion`: **1** = Disable _deoplete_ autocompletion | **0** = Enable _deoplete _autocompletion_ if the requirements are met (_default_: **0**)
|
||||
* `g:disableautotags`: **1** = Prevent tags from being automatically generated and highlighted | **0** = Automatically generate and highlight tags (_default_: **0**)
|
||||
* `g:disablelinebreaks`: **1** = Override filetype plugins so linebreaks never occur | **0** = Linebreaks are disabled by default, but filetype plugins can override this setting (_default_: **0**)
|
||||
* `g:powerlinefonts`: **1** = Render the statusline using characters available with powerline-patched fonts | **0** = Render the statusbar with less attractive but more compatible characters available in all fonts (_default_: **0**)
|
||||
|
@ -160,6 +161,10 @@ For a complete list of mappings specific to **darkcloud-vimconfig**, check the l
|
|||
* [ale](https://github.com/w0rp/ale): Asynchronous Lint Engine
|
||||
* [autoswap.vim](https://github.com/vim-scripts/autoswap.vim): Switch to open editor window instead of asking what to do with swapfile.
|
||||
* [cosco.vim](https://github.com/lfilho/cosco.vim): VIM colon and semicolon insertion bliss
|
||||
* [deoplete.nvim](https://github.com/Shougo/deoplete.nvim): Dark powered asynchronous completion framework for neovim/Vim8
|
||||
* [neco-syntax](https://github.com/Shougo/neco-syntax): Syntax source for neocomplete/deoplete/ncm
|
||||
* [nvim-yarp](https://github.com/roxma/nvim-yarp): Yet Another Remote Plugin Framework for Neovim
|
||||
* [vim-hug-neovim-rpc](https://github.com/roxma/vim-hug-neovim-rpc): A compatibility layer for neovim rpc client working on vim8
|
||||
* [editorconfig-vim](https://github.com/editorconfig/editorconfig-vim): EditorConfig plugin for Vim that auto-configures certain settings when a .editorconfig file is present
|
||||
* [emmet-vim](https://github.com/mattn/emmet-vim): Support for expanding abbreviations.
|
||||
* [webapi-vim](https://github.com/mattn/webapi-vim): A web library used by emmet to provide support for custom snippets.
|
||||
|
@ -169,7 +174,6 @@ For a complete list of mappings specific to **darkcloud-vimconfig**, check the l
|
|||
* [incsearch.vim](https://github.com/haya14busa/incsearch.vim): Improved incremental searching for Vim.
|
||||
* [lightline.vim](https://github.com/itchyny/lightline.vim): A light and configurable statusline/tabline for Vim.
|
||||
* [MatchTagAlways](https://github.com/Valloric/MatchTagAlways): A Vim plugin that always highlights the enclosing html/xml tags.
|
||||
* [neocomplete.vim](https://github.com/Shougo/neocomplete.vim): Next generation completion framework after neocomplcache.
|
||||
* [patchreview-vim](https://github.com/junkblocker/patchreview-vim): A Vim plugin for doing single, multi-patch or diff code reviews.
|
||||
* [rename.vim](https://github.com/danro/rename.vim): Rename the current file in the vim buffer + retain relative path.
|
||||
* [ReplaceWithRegister](https://github.com/vim-scripts/ReplaceWithRegister): Replace text with the contents of a register (for paste+replace without writing over the buffer).
|
||||
|
|
1
update
1
update
|
@ -121,6 +121,7 @@ printf '\n%s\n' "$cbg_black ~~~ DarkCloud Vimconfig Update Tool ~~~ $c_reset"
|
|||
printf '%s\n%s\n\n' '"Autostart Filer in empty buffers: (*1:filer loads in new empty buffers | 0:filer must be triggered)' '"let g:autostartfiler = 1'
|
||||
printf '%s\n%s\n\n' '"Autocheck syntax checking: (1:start toggled on | *0:start toggled off)' '"let g:autostartchecker = 0'
|
||||
printf '%s\n%s\n\n' '"Autoload Tagbar: (1:start open | *0:start closed)' '"let g:autostarttagbar = 0'
|
||||
printf '%s\n%s\n\n' '"Disable Completion: (1:disable completion | *0:enable completion if requirements are met)' '"let g:disablecompletion = 0'
|
||||
printf '%s\n%s\n\n' '"Disable automatic tag generation and highlighting: (1:force disabled tag generation and highlighting | *0:enable automatic tag generation and highlighting)' '"let g:disableautotags = 0'
|
||||
printf '%s\n%s\n\n' '"Disable automatic linebreaking: (1:force disabled globally | *0:let the filetype decide)' '"let g:disablelinebreaks = 0'
|
||||
printf '%s\n%s\n\n' '"Enable Powerline fonts: (1:expect powerline font | *0:expect regular font)' '"let g:powerlinefonts = 0 "(set powerline font for gvim and terminal when enabled)'
|
||||
|
|
1
vim/bundle/deoplete.nvim
Submodule
1
vim/bundle/deoplete.nvim
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit c3c9406bfb4207c057d6a366c88466256a6ea2bd
|
1
vim/bundle/neco-syntax
Submodule
1
vim/bundle/neco-syntax
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 98cba4a98a4f44dcff80216d0b4aa6f41c2ce3e3
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 1401a1c6ab56546c55804ba09e6c9fe87654e954
|
1
vim/bundle/nvim-yarp
Submodule
1
vim/bundle/nvim-yarp
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit b222af8dbbfb35c6d833fd76a940f6ca2fe322fa
|
1
vim/bundle/vim-hug-neovim-rpc
Submodule
1
vim/bundle/vim-hug-neovim-rpc
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit e8af9b262bfcae1b2f5c755a099cba9687c33a0a
|
|
@ -171,12 +171,6 @@
|
|||
" <Ctrl-D> | (I) -> cut line before cursor during input
|
||||
" <Ctrl-Y> | (I) -> paste what's been cut during input
|
||||
"
|
||||
" (autocompletion)
|
||||
" <Enter> | (I) -> (neocomplete) close the popup and <Enter>
|
||||
" <Tab> | (I) -> (neocomplete) select/cycle popup completion
|
||||
" <Backspace> | (I) -> (neocomplete) close the popup and <Backspace>
|
||||
" <Ctrl-u> | (I) -> (neocomplete) undo the most recent completion
|
||||
"
|
||||
" (fixing-and-formatting)
|
||||
" <Leader>J | (N) -> split document into lines of tw or 80
|
||||
" <Leader>J | (V) -> split selection into lines of tw or 80
|
||||
|
@ -684,25 +678,6 @@
|
|||
inoremap <C-w> <C-g>u<C-w>
|
||||
"}
|
||||
|
||||
"AUTOCOMPLETION:{
|
||||
if !has('nvim') && has('lua')
|
||||
"neocomplete close popup and save indent
|
||||
inoremap <silent> <CR> <C-r>=<SID>neocache_cr()<CR>
|
||||
function! s:neocache_cr()
|
||||
return pumvisible() ? "\<C-y>" : "\<CR>"
|
||||
endfunction
|
||||
|
||||
"neocomplete tab completion
|
||||
inoremap <expr><Tab> pumvisible() ? "\<C-n>" : "\<TAB>"
|
||||
|
||||
"neocomplete close popup
|
||||
inoremap <expr><Backspace> neocomplete#smart_close_popup()."\<C-h>"
|
||||
|
||||
"neocomplete undo completion
|
||||
inoremap <expr><C-u> neocomplete#undo_completion()
|
||||
endif
|
||||
"}
|
||||
|
||||
"FIXING AND FORMATTING:{
|
||||
"format width to text width (or 80 chars if text width is 0)
|
||||
nnoremap <silent><expr> <Leader>J ':let b:tw=&textwidth<CR>:if (b:tw == 0)<Bar>set tw=80<Bar>endif<CR>gg0vG$gq:if (b:tw == 0)<Bar>set tw=0<Bar>let b:tw=80<Bar>endif<CR>:echo "Document has been formatted to a width of ".b:tw." characters"<CR>'
|
||||
|
|
9
vim/config/plugins/deoplete.vim
Normal file
9
vim/config/plugins/deoplete.vim
Normal file
|
@ -0,0 +1,9 @@
|
|||
"disable completion (default: 0)
|
||||
if !exists("g:disablecompletion")
|
||||
let g:disablecompletion = 0
|
||||
endif
|
||||
|
||||
if !g:disablecompletion && g:python_neovim
|
||||
let g:deoplete#enable_at_startup = 1
|
||||
let deoplete#tag#cache_limit_size = 5000000
|
||||
endif
|
|
@ -1,28 +0,0 @@
|
|||
let g:neocomplete#enable_at_startup=1
|
||||
let g:neocomplete#enable_smart_case=1
|
||||
let g:neocomplete#sources#syntax#min_keyword_length=3
|
||||
|
||||
if !exists('g:neocomplete#sources#omni#input_patterns')
|
||||
let g:neocomplete#sources#omni#input_patterns = {}
|
||||
endif
|
||||
|
||||
let g:neocomplete#sources#omni#input_patterns.c='[^.[:digit:] *\t]\%(\.\|->\)\%(\h\w*\)\?'
|
||||
let g:neocomplete#sources#omni#input_patterns.cpp='[^.[:digit:] *\t]\%(\.\|->\)\%(\h\w*\)\?\|\h\w*::\%(\h\w*\)\?'
|
||||
let g:neocomplete#sources#omni#input_patterns.xml='<[^>]*'
|
||||
let g:neocomplete#sources#omni#input_patterns.html='<[^>]*'
|
||||
let g:neocomplete#sources#omni#input_patterns.xhtml='<[^>]*'
|
||||
let g:neocomplete#sources#omni#input_patterns.markdown='<[^>]*'
|
||||
let g:neocomplete#sources#omni#input_patterns.css='^\s\+\w+\|\w+[):;]?\s\+\|[@!]'
|
||||
let g:neocomplete#sources#omni#input_patterns.less='^\s\+\w+\|\w+[):;]?\s\+\|[@!]'
|
||||
let g:neocomplete#sources#omni#input_patterns.javascript='[^. \t]\.\%(\h\w*\)\?'
|
||||
let g:neocomplete#sources#omni#input_patterns.json='[^. \t]\.\%(\h\w*\)\?'
|
||||
let g:neocomplete#sources#omni#input_patterns.python='[^. *\t]\.\h\w*\|\h\w*::'
|
||||
let g:neocomplete#sources#omni#input_patterns.ruby='[^. *\t]\.\w*\|\h\w*::'
|
||||
let g:neocomplete#sources#omni#input_patterns.php='[^. \t]->\%(\h\w*\)\?\|\h\w*::\%(\h\w*\)\?'
|
||||
let g:neocomplete#sources#omni#input_patterns.actionscript='[^. \t][.:]\h\w*'
|
||||
let g:neocomplete#sources#omni#input_patterns.python3='[^. *\t]\.\h\w*\|\h\w*::'
|
||||
let g:neocomplete#sources#omni#input_patterns.go='\h\w*\%.'
|
||||
let g:neocomplete#sources#omni#input_patterns.perl='\h\w*->\h\w*\|\h\w*::'
|
||||
let g:neocomplete#sources#omni#input_patterns.java='\%(\h\w*\|)\)\.'
|
||||
let g:neocomplete#sources#omni#input_patterns.objc='\h\w\+\|\h\w*\%(\.\|->\)\h\w*'
|
||||
let g:neocomplete#sources#omni#input_patterns.objj='[\[ \.]\w\+$\|:\w*$'
|
32
vimrc
32
vimrc
|
@ -35,10 +35,27 @@
|
|||
"Load Settings:
|
||||
runtime config/settings.vim
|
||||
|
||||
"Init Plugin Loader:
|
||||
"Initialize Plugins:
|
||||
let pathogen_disabled = []
|
||||
|
||||
" disable incompatible plugins
|
||||
" configure pythonx and the python_neovim variable to determine whether deoplete should be loaded
|
||||
if has('python3')
|
||||
set pyxversion=3
|
||||
|
||||
redir => python_neovim_check
|
||||
silent pythonx exec("import pkgutil\nneovim = pkgutil.find_loader('neovim')\nfound = neovim is not None\nprint(found)")
|
||||
redir END
|
||||
|
||||
if substitute(python_neovim_check, '^\n*\([^\n]*\)\n*$', '\1', '') == 'True'
|
||||
let g:python_neovim = 1
|
||||
else
|
||||
let g:python_neovim = 0
|
||||
endif
|
||||
else
|
||||
let g:python_neovim = 0
|
||||
endif
|
||||
|
||||
" disable incompatible/unnecessary plugins
|
||||
if has('nvim')
|
||||
call add(pathogen_disabled, 'vim-fixkey')
|
||||
endif
|
||||
|
@ -48,10 +65,17 @@
|
|||
call add(pathogen_disabled, 'MatchTagAlways')
|
||||
endif
|
||||
|
||||
if !has('lua')
|
||||
call add(pathogen_disabled, 'neocomplete.vim')
|
||||
if !g:python_neovim
|
||||
call add(pathogen_disabled, 'deoplete.nvim')
|
||||
call add(pathogen_disabled, 'neco-syntax')
|
||||
call add(pathogen_disabled, 'nvim-yarp')
|
||||
call add(pathogen_disabled, 'vim-hug-neovim-rpc')
|
||||
elseif has('nvim')
|
||||
call add(pathogen_disabled, 'nvim-yarp')
|
||||
call add(pathogen_disabled, 'vim-hug-neovim-rpc')
|
||||
endif
|
||||
|
||||
" use pathogen to load plugins that haven't been disabled
|
||||
runtime bundle/vim-pathogen/autoload/pathogen.vim
|
||||
|
||||
"Load Keymappings:
|
||||
|
|
Loading…
Reference in a new issue