This commit is contained in:
newbie 2023-12-18 23:42:55 +08:00
parent a1c9ef545c
commit adb1e88397
2 changed files with 8 additions and 3 deletions

View File

@ -0,0 +1,3 @@
return{
}

View File

@ -35,6 +35,7 @@ local feedkey = function(key, mode)
vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes(key, true, true, true), mode, true)
end
return {
{
-- lsp的config
@ -42,7 +43,7 @@ return {
config = function()
require 'lspconfig'.lua_ls.setup(require('lsp.lua'))
require 'lspconfig'.clangd.setup(require('lsp.c'))
-- require'lspconfig'.bash_ls.setup(require('lsp.bash'))
require'lspconfig'.bash_ls.setup(require('lsp.bash'))
require 'lspconfig'.pyright.setup(require('lsp.pyright'))
G.map({
{ 'n', '<leader>rn', '<cmd>lua vim.lsp.buf.rename()<CR>' },
@ -166,7 +167,7 @@ return {
{ name = 'cmdline' },
}),
mapping = cmp.mapping.preset.insert({
['<CR>'] = cmp.mapping.confirm({ select = true }),
['<CR>'] = cmp.mapping.confirm({ select = false }),
["<c-n>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
@ -201,6 +202,7 @@ return {
scrollbar = true,
},
},
fomatting = {
fields = { "kind", "abbr", "menu" },
format = function(entry, vim_item)
@ -234,7 +236,7 @@ return {
{ name = 'buffer' },
}),
mapping = cmp.mapping.preset.insert({
['<CR>'] = cmp.mapping.confirm({ select = true }),
['<CR>'] = cmp.mapping.confirm({ select = false }),
["<c-n>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()