diff --git a/init.lua b/init.lua index 6647f56..378d37c 100644 --- a/init.lua +++ b/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 diff --git a/lua/custom/plugins/autopairs.lua b/lua/custom/plugins/autopairs.lua new file mode 100644 index 0000000..3f3d978 --- /dev/null +++ b/lua/custom/plugins/autopairs.lua @@ -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, +}