fix(vim): vim.api

This commit is contained in:
2021-03-15 21:32:06 +08:00
parent 12bed8d697
commit fe0aab84af
2 changed files with 4 additions and 3 deletions
+1
View File
@@ -30,6 +30,7 @@
bootstrap_before= "myspacevim#before"
bootstrap_after= "myspacevim#after"
disabled_plugins = ["auto_complete"]
enable_neomake = false
# Enable autocomplete layer
#[[layers]]
+3 -3
View File
@@ -1,6 +1,6 @@
lcustom = {}
local cmd = vim.cmd -- to execute Vim commands e.g. cmd('pwd')
local fn = vim.fn -- to call Vim functions e.g. fn.bufnr()
local fn = vim.api -- to call Vim functions e.g. fn.bufnr()
local g = vim.g -- a table to access global variables
function lcustom.echo()
@@ -83,11 +83,11 @@ custom_attach = function(client, bufnr)
map('n','<leader>ao','<cmd>lua vim.lsp.buf.outgoing_calls()<CR>')
end
local map = function(type, key, value)
map = function(type, key, value)
-- autocmd VimEnter * nnoremap <Leader>[ :tabprev<CR>
-- local cmd = [[vim.fn.nvim_buf_set_keymap(0,type,key,value,{noremap = true, silent = true})]]
-- vim.api.nvim_command('autocmd VimEnter * nnoremap '..key..' '..value)
vim.fn.nvim_buf_set_keymap(0,type,key,value,{noremap = true, silent = true});
vim.api.nvim_buf_set_keymap(0,type,key,value,{noremap = true, silent = true});
end
function _G.dump(...)