plugins: set autopairs, vim-surround

Co-Authored-by: iGor milhit <igor@milhit.ch>
iGor milhit 2023-06-06 07:14:41 +02:00
parent a6a823e0d3
commit 6f316190e5
Signed by: igor
GPG Key ID: 692D97C3D0228A99
2 changed files with 23 additions and 0 deletions

View File

@ -72,6 +72,9 @@ require('lazy').setup({
-- Detect tabstop and shiftwidth automatically
'tpope/vim-sleuth',
-- Improve surroundings management
'tpope/vim-surround',
-- NOTE: This is where your plugins related to LSP can be installed.
-- The configuration is done below. Search for lspconfig to find it below.
{
@ -227,8 +230,11 @@ vim.wo.number = true
-- Set the maximum width of a line
vim.opt.textwidth = 79
-- Display the cusor column at 79+1 column
vim.opt.colorcolumn:append('+1')
-- Set text formatting options
-- 'a' is for autoformat
-- vim.opt.formatoptions:append('a')
-- Enable mouse mode

View File

@ -0,0 +1,17 @@
-- File: lua/custom/plugins/autopairs.lua
return {
"windwp/nvim-autopairs",
-- Optional dependency
dependencies = { 'hrsh7th/nvim-cmp' },
config = function()
require("nvim-autopairs").setup {}
-- If you want to automatically add `(` after selecting a function or method
local cmp_autopairs = require('nvim-autopairs.completion.cmp')
local cmp = require('cmp')
cmp.event:on(
'confirm_done',
cmp_autopairs.on_confirm_done()
)
end,
}