using nvim-autopairs instead of autoclose
This commit is contained in:
parent
03b5fffc72
commit
ab433893d1
@ -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()
|
||||
)
|
||||
|
||||
|
@ -18,7 +18,7 @@ vim.api.nvim_create_autocmd('LspAttach', {
|
||||
bufmap('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<cr>')
|
||||
-- Jumps to the definition of the type symbol
|
||||
bufmap('n', 'go', '<cmd>lua vim.lsp.buf.type_definition()<cr>')
|
||||
-- Lists all the references
|
||||
-- Lists all the references
|
||||
bufmap('n', 'gr', '<cmd>lua vim.lsp.buf.references()<cr>')
|
||||
-- Displays a function's signature information
|
||||
bufmap('n', '<C-k>', '<cmd>lua vim.lsp.buf.signature_help()<cr>')
|
||||
@ -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 = {
|
||||
|
@ -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'},
|
||||
|
Loading…
Reference in New Issue
Block a user