using nvim-autopairs instead of autoclose

This commit is contained in:
Daniel Weber 2024-06-21 10:40:59 -04:00
parent 03b5fffc72
commit ab433893d1
3 changed files with 15 additions and 8 deletions

View File

@ -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()
)

View File

@ -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 = {

View File

@ -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'},