Compare commits
No commits in common. "a5706b6e73716feaf9215ed2e6f77c7a9c5a9738" and "467933a14eaba9c2c964cf5bfe7491a6d917fd84" have entirely different histories.
a5706b6e73
...
467933a14e
@ -1,50 +0,0 @@
|
|||||||
set completeopt=menu,menuone,noselect
|
|
||||||
|
|
||||||
lua <<EOF
|
|
||||||
-- Setup nvim-cmp.
|
|
||||||
local cmp = require'cmp'
|
|
||||||
|
|
||||||
cmp.setup({
|
|
||||||
snippet = {
|
|
||||||
expand = function(args)
|
|
||||||
-- For `vsnip` user.
|
|
||||||
vim.fn["vsnip#anonymous"](args.body)
|
|
||||||
|
|
||||||
-- For `luasnip` user.
|
|
||||||
-- require('luasnip').lsp_expand(args.body)
|
|
||||||
|
|
||||||
-- For `ultisnips` user.
|
|
||||||
-- vim.fn["UltiSnips#Anon"](args.body)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
mapping = {
|
|
||||||
['<C-n>'] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }),
|
|
||||||
['<C-p>'] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }),
|
|
||||||
['<Down>'] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Select }),
|
|
||||||
['<Up>'] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Select }),
|
|
||||||
['<C-d>'] = cmp.mapping.scroll_docs(-4),
|
|
||||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
|
||||||
['<C-Space>'] = cmp.mapping.complete(),
|
|
||||||
['<C-e>'] = cmp.mapping.close(),
|
|
||||||
['<Tab>'] = cmp.mapping(cmp.mapping.select_next_item(), { 'i', 's' }),
|
|
||||||
['<CR>'] = cmp.mapping.confirm({
|
|
||||||
behavior = cmp.ConfirmBehavior.Replace,
|
|
||||||
select = true,
|
|
||||||
})
|
|
||||||
},
|
|
||||||
sources = {
|
|
||||||
{ name = 'nvim_lsp' },
|
|
||||||
|
|
||||||
-- For vsnip user.
|
|
||||||
{ name = 'vsnip' },
|
|
||||||
|
|
||||||
-- For luasnip user.
|
|
||||||
-- { name = 'luasnip' },
|
|
||||||
|
|
||||||
-- For ultisnips user.
|
|
||||||
-- { name = 'ultisnips' },
|
|
||||||
|
|
||||||
{ name = 'buffer' },
|
|
||||||
}
|
|
||||||
})
|
|
||||||
EOF
|
|
@ -5,6 +5,7 @@ Plug 'jiangmiao/auto-pairs'
|
|||||||
Plug 'leafgarland/typescript-vim', { 'for': 'typescript' }
|
Plug 'leafgarland/typescript-vim', { 'for': 'typescript' }
|
||||||
Plug 'leafoftree/vim-svelte-plugin', { 'for': 'svelte' }
|
Plug 'leafoftree/vim-svelte-plugin', { 'for': 'svelte' }
|
||||||
Plug 'lukas-reineke/indent-blankline.nvim'
|
Plug 'lukas-reineke/indent-blankline.nvim'
|
||||||
|
Plug 'neovim/nvim-lspconfig'
|
||||||
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
|
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
|
||||||
Plug 'posva/vim-vue', { 'for': 'vue' }
|
Plug 'posva/vim-vue', { 'for': 'vue' }
|
||||||
Plug 'ron-rs/ron.vim', { 'for': 'ron' }
|
Plug 'ron-rs/ron.vim', { 'for': 'ron' }
|
||||||
@ -17,14 +18,6 @@ Plug 'tpope/vim-surround'
|
|||||||
Plug 'vim-test/vim-test'
|
Plug 'vim-test/vim-test'
|
||||||
Plug 'wakatime/vim-wakatime'
|
Plug 'wakatime/vim-wakatime'
|
||||||
|
|
||||||
" LSP and autocomplete
|
|
||||||
Plug 'neovim/nvim-lspconfig' |
|
|
||||||
\ Plug 'hrsh7th/cmp-nvim-lsp' |
|
|
||||||
\ Plug 'hrsh7th/cmp-buffer' |
|
|
||||||
\ Plug 'hrsh7th/nvim-cmp' |
|
|
||||||
\ Plug 'hrsh7th/cmp-vsnip' |
|
|
||||||
\ Plug 'hrsh7th/vim-vsnip'
|
|
||||||
|
|
||||||
" Lightline
|
" Lightline
|
||||||
Plug 'itchyny/lightline.vim' |
|
Plug 'itchyny/lightline.vim' |
|
||||||
\ Plug 'albertomontesg/lightline-asyncrun' |
|
\ Plug 'albertomontesg/lightline-asyncrun' |
|
||||||
|
6
vimrc
6
vimrc
@ -68,12 +68,6 @@ if filereadable(expand("~/.config/nvim/plugins.vimrc"))
|
|||||||
endif
|
endif
|
||||||
call plug#end()
|
call plug#end()
|
||||||
|
|
||||||
" Autocomplete
|
|
||||||
if filereadable(expand("~/.config/nvim/nvim-cmp.vimrc"))
|
|
||||||
source ~/.config/nvim/nvim-cmp.vimrc
|
|
||||||
endif
|
|
||||||
|
|
||||||
" LSP
|
|
||||||
if filereadable(expand("~/.config/nvim/lspconfig.vimrc"))
|
if filereadable(expand("~/.config/nvim/lspconfig.vimrc"))
|
||||||
source ~/.config/nvim/lspconfig.vimrc
|
source ~/.config/nvim/lspconfig.vimrc
|
||||||
endif
|
endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user