fix(vim): set complete
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
function! myspacevim#before() abort
|
function! myspacevim#before() abort
|
||||||
autocmd VimEnter * nnoremap gd :lua vim.lsp.buf.definition()<CR>
|
autocmd VimEnter * nnoremap gd :lua vim.lsp.buf.definition()<CR>
|
||||||
|
call deoplete#custom#option('auto_complete', v:false)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
lua << EOF
|
lua << EOF
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
# set spacevim theme. by default colorscheme layer is not loaded,
|
# set spacevim theme. by default colorscheme layer is not loaded,
|
||||||
# if you want to use more colorscheme, please load the colorscheme
|
# if you want to use more colorscheme, please load the colorscheme
|
||||||
# layer
|
# layer
|
||||||
|
auto_complete = false
|
||||||
colorscheme = "NeoSolarized"
|
colorscheme = "NeoSolarized"
|
||||||
background = "dark"
|
background = "dark"
|
||||||
# Disable guicolors in basic mode, many terminal do not support 24bit
|
# Disable guicolors in basic mode, many terminal do not support 24bit
|
||||||
@@ -21,13 +22,14 @@
|
|||||||
statusline_separator = "arrow"
|
statusline_separator = "arrow"
|
||||||
statusline_inactive_separator = "arrow"
|
statusline_inactive_separator = "arrow"
|
||||||
buffer_index_type = 4
|
buffer_index_type = 4
|
||||||
autocomplete_method = 'deoplete'
|
#autocomplete_method = 'deoplete'
|
||||||
enable_tabline_filetype_icon = true
|
enable_tabline_filetype_icon = true
|
||||||
enable_statusline_display_mode = false
|
enable_statusline_display_mode = false
|
||||||
vim_help_language = "cn"
|
vim_help_language = "cn"
|
||||||
default_indent = 4
|
default_indent = 4
|
||||||
bootstrap_before= "myspacevim#before"
|
bootstrap_before= "myspacevim#before"
|
||||||
bootstrap_after= "myspacevim#after"
|
bootstrap_after= "myspacevim#after"
|
||||||
|
disabled_plugins = ["auto_complete"]
|
||||||
|
|
||||||
# Enable autocomplete layer
|
# Enable autocomplete layer
|
||||||
#[[layers]]
|
#[[layers]]
|
||||||
@@ -76,6 +78,10 @@ name = "VersionControl"
|
|||||||
[[layers]]
|
[[layers]]
|
||||||
name = "tmux"
|
name = "tmux"
|
||||||
|
|
||||||
|
[[layers]]
|
||||||
|
name = 'autocomplete'
|
||||||
|
enable = false
|
||||||
|
|
||||||
[[custom_plugins]]
|
[[custom_plugins]]
|
||||||
name = "terryma/vim-multiple-cursors"
|
name = "terryma/vim-multiple-cursors"
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ function add_plugin()
|
|||||||
paq{'savq/paq-nvim', opt = true}
|
paq{'savq/paq-nvim', opt = true}
|
||||||
paq{'neovim/nvim-lspconfig'}
|
paq{'neovim/nvim-lspconfig'}
|
||||||
paq{'nvim-treesitter/nvim-treesitter'}
|
paq{'nvim-treesitter/nvim-treesitter'}
|
||||||
|
paq{'nvim-lua/completion-nvim'}
|
||||||
end
|
end
|
||||||
|
|
||||||
function llsp()
|
function llsp()
|
||||||
@@ -29,9 +30,13 @@ function lcustom.init()
|
|||||||
vim.api.nvim_set_keymap('n','<Space>kl','<Cmd> lua llsp()<CR>',{ noremap = true, silent = true })
|
vim.api.nvim_set_keymap('n','<Space>kl','<Cmd> lua llsp()<CR>',{ noremap = true, silent = true })
|
||||||
add_plugin()
|
add_plugin()
|
||||||
llsp()
|
llsp()
|
||||||
g['deoplete#enable_at_startup'] = 1 -- enable deoplete at startup
|
-- g['deoplete#enable_at_startup'] = 1 -- enable deoplete at startup
|
||||||
-- spc_key_bind('nore',{'g','d'}, 'test key bind', ':lua custom.echo()<CR>',1)
|
-- spc_key_bind('nore',{'g','d'}, 'test key bind', ':lua custom.echo()<CR>',1)
|
||||||
-- vim.api.nvim_command('autocmd VimEnter * nnoremap gd :lua vim.lsp.buf.definition()<CR>')
|
-- vim.api.nvim_command('autocmd VimEnter * nnoremap gd :lua vim.lsp.buf.definition()<CR>')
|
||||||
|
print('init llsp')
|
||||||
|
-- vim.api.nvim_buf_set_option(0, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
|
||||||
|
--
|
||||||
|
vim.o['completeopt']='menuone,noinsert,noselect'
|
||||||
|
|
||||||
treesitter()
|
treesitter()
|
||||||
print('init finished')
|
print('init finished')
|
||||||
@@ -55,9 +60,9 @@ function simple_key_map(keys, cmd)
|
|||||||
vim.api.nvim_set_keymap('n',keys,cmd,{ noremap = true, silent = true })
|
vim.api.nvim_set_keymap('n',keys,cmd,{ noremap = true, silent = true })
|
||||||
end
|
end
|
||||||
|
|
||||||
local custom_attach = function(client)
|
custom_attach = function(client, bufnr)
|
||||||
print("LSP started.");
|
print("LSP started.");
|
||||||
-- require'completion'.on_attach(client)
|
require'completion'.on_attach(client, bufnr)
|
||||||
-- require'diagnostic'.on_attach(client)
|
-- require'diagnostic'.on_attach(client)
|
||||||
|
|
||||||
map('n','gD','<cmd>lua vim.lsp.buf.declaration()<CR>')
|
map('n','gD','<cmd>lua vim.lsp.buf.declaration()<CR>')
|
||||||
|
|||||||
Reference in New Issue
Block a user