diff --git a/lua/options.lua b/lua/options.lua index 7c442f9..b4566c7 100644 --- a/lua/options.lua +++ b/lua/options.lua @@ -39,8 +39,14 @@ vim.opt.smartcase = true -- preview commands vim.opt.inccommand = "split" --- enable cursorline -vim.opt.cursorline = true +-- set cursorline in active window +vim.cmd([[ + augroup CursorLine + autocmd! + autocmd VimEnter,WinEnter,BufWinEnter * setlocal cursorline + autocmd WinLeave * setlocal nocursorline + augroup END +]]) -- coq.nvim vim.g.coq_settings = { auto_start = "shut-up" } diff --git a/lua/plugins.lua b/lua/plugins.lua index 2f550a0..524c7ec 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -133,6 +133,14 @@ return require('packer').startup(function(use) end, }) + -- auto-close brackets + use({ + "windwp/nvim-autopairs", + config = function () + require("nvim-autopairs").setup({}) + end, + }) + if packer_bootstrap then require('packer').sync() end