fix(vim): set complete

This commit is contained in:
2021-03-15 21:13:26 +08:00
parent 7d928136bb
commit 12bed8d697
3 changed files with 16 additions and 4 deletions
+1
View File
@@ -1,5 +1,6 @@
function! myspacevim#before() abort
autocmd VimEnter * nnoremap gd :lua vim.lsp.buf.definition()<CR>
call deoplete#custom#option('auto_complete', v:false)
endfunction
lua << EOF
+7 -1
View File
@@ -11,6 +11,7 @@
# set spacevim theme. by default colorscheme layer is not loaded,
# if you want to use more colorscheme, please load the colorscheme
# layer
auto_complete = false
colorscheme = "NeoSolarized"
background = "dark"
# Disable guicolors in basic mode, many terminal do not support 24bit
@@ -21,13 +22,14 @@
statusline_separator = "arrow"
statusline_inactive_separator = "arrow"
buffer_index_type = 4
autocomplete_method = 'deoplete'
#autocomplete_method = 'deoplete'
enable_tabline_filetype_icon = true
enable_statusline_display_mode = false
vim_help_language = "cn"
default_indent = 4
bootstrap_before= "myspacevim#before"
bootstrap_after= "myspacevim#after"
disabled_plugins = ["auto_complete"]
# Enable autocomplete layer
#[[layers]]
@@ -76,6 +78,10 @@ name = "VersionControl"
[[layers]]
name = "tmux"
[[layers]]
name = 'autocomplete'
enable = false
[[custom_plugins]]
name = "terryma/vim-multiple-cursors"
+8 -3
View File
@@ -13,6 +13,7 @@ function add_plugin()
paq{'savq/paq-nvim', opt = true}
paq{'neovim/nvim-lspconfig'}
paq{'nvim-treesitter/nvim-treesitter'}
paq{'nvim-lua/completion-nvim'}
end
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 })
add_plugin()
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)
-- 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()
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 })
end
local custom_attach = function(client)
custom_attach = function(client, bufnr)
print("LSP started.");
-- require'completion'.on_attach(client)
require'completion'.on_attach(client, bufnr)
-- require'diagnostic'.on_attach(client)
map('n','gD','<cmd>lua vim.lsp.buf.declaration()<CR>')