diff --git a/after/plugin/autoclose.lua b/after/plugin/autoclose.lua index bc90ab8..353b2b0 100644 --- a/after/plugin/autoclose.lua +++ b/after/plugin/autoclose.lua @@ -1,5 +1,8 @@ -require("autoclose").setup({ - keys = { - [">"] = { escape = false, close = false, pair = "<>", disabled_filetypes = {} }, - }, -}) +-- If you want insert `(` after select function or method item +local cmp_autopairs = require('nvim-autopairs.completion.cmp') +local cmp = require('cmp') +cmp.event:on( + 'confirm_done', + cmp_autopairs.on_confirm_done() +) + diff --git a/after/plugin/lsp.lua b/after/plugin/lsp.lua index f8150f7..a70a9aa 100644 --- a/after/plugin/lsp.lua +++ b/after/plugin/lsp.lua @@ -18,7 +18,7 @@ vim.api.nvim_create_autocmd('LspAttach', { bufmap('n', 'gi', 'lua vim.lsp.buf.implementation()') -- Jumps to the definition of the type symbol bufmap('n', 'go', 'lua vim.lsp.buf.type_definition()') - -- Lists all the references + -- Lists all the references bufmap('n', 'gr', 'lua vim.lsp.buf.references()') -- Displays a function's signature information bufmap('n', '', 'lua vim.lsp.buf.signature_help()') @@ -35,7 +35,7 @@ local capabilities = require('cmp_nvim_lsp').default_capabilities() require('mason').setup({}) require('mason-lspconfig').setup({ - ensure_installed = {'lua_ls', 'jedi_language_server', 'rust_analyzer', 'clangd' }, + ensure_installed = {'lua_ls', 'pyright', 'rust_analyzer', 'clangd' }, handlers = { require('lspconfig').clangd.setup({ filetypes = { "c", "cpp", "objc", "objcpp", "cuda", "proto","hpp"}, @@ -48,9 +48,12 @@ require('mason-lspconfig').setup({ } }), - require('lspconfig').jedi_language_server.setup{ + require('lspconfig').pyright.setup{ capabilities = capabilities, }, + -- require('lspconfig').jedi_language_server.setup{ + -- capabilities = capabilities, + -- }, require('lspconfig').lua_ls.setup{ capabilities = capabilities, -- settings = { diff --git a/lua/pippy/lazy.lua b/lua/pippy/lazy.lua index 154ff0a..1f15e87 100644 --- a/lua/pippy/lazy.lua +++ b/lua/pippy/lazy.lua @@ -45,6 +45,7 @@ require("lazy").setup({ 'rafamadriz/friendly-snippets', 'saadparwaiz1/cmp_luasnip', }}, + {'windwp/nvim-autopairs', event = "InsertEnter", config = true}, 'm4xshen/autoclose.nvim', 'lewis6991/gitsigns.nvim', {'xiyaowong/transparent.nvim'},