plugins: set autopairs, vim-surround
Co-Authored-by: iGor milhit <igor@milhit.ch>
parent
a6a823e0d3
commit
6f316190e5
6
init.lua
6
init.lua
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
}
|
Loading…
Reference in New Issue