@@ -196,19 +196,28 @@ vim.keymap.set('n', '<C-l>', '<C-w><C-l>', { desc = 'Move focus to the right win
196196vim .keymap .set (' n' , ' <C-j>' , ' <C-w><C-j>' , { desc = ' Move focus to the lower window' })
197197vim .keymap .set (' n' , ' <C-k>' , ' <C-w><C-k>' , { desc = ' Move focus to the upper window' })
198198
199- -- [[ Basic Autocommands ]]
200- -- See `:help lua-guide-autocommands`
201-
202- -- Highlight when yanking (copying) text
203- -- Try it with `yap` in normal mode
204- -- See `:help vim.highlight.on_yank()`
205- vim .api .nvim_create_autocmd (' TextYankPost' , {
206- desc = ' Highlight when yanking (copying) text' ,
207- group = vim .api .nvim_create_augroup (' kickstart-highlight-yank' , { clear = true }),
208- callback = function ()
209- vim .highlight .on_yank ()
199+ -- markdown keybinds
200+ on_attach =
201+ function (bufnr )
202+ local map = vim .keymap .set
203+ local opts = { buffer = bufnr }
204+ map ({ ' n' , ' i' }, ' <M-l><M-o>' , ' <Cmd>MDListItemBelow<CR>' , opts )
205+ map ({ ' n' , ' i' }, ' <M-L><M-O>' , ' <Cmd>MDListItemAbove<CR>' , opts )
206+ map (' n' , ' <M-c>' , ' <Cmd>MDTaskToggle<CR>' , opts )
207+ map (' x' , ' <M-c>' , ' :MDTaskToggle<CR>' , opts )
210208 end ,
211- })
209+ -- [[ Basic Autocommands ]]
210+ -- See `:help lua-guide-autocommands`
211+ -- Highlight when yanking (copying) text
212+ -- Try it with `yap` in normal mode
213+ -- See `:help vim.highlight.on_yank()`
214+ vim .api .nvim_create_autocmd (' TextYankPost' , {
215+ desc = ' Highlight when yanking (copying) text' ,
216+ group = vim .api .nvim_create_augroup (' kickstart-highlight-yank' , { clear = true }),
217+ callback = function ()
218+ vim .highlight .on_yank ()
219+ end ,
220+ })
212221
213222-- [[ Install `lazy.nvim` plugin manager ]]
214223-- See `:help lazy.nvim.txt` or https://github.com/folke/lazy.nvim for more info
@@ -486,6 +495,12 @@ require('lazy').setup({
486495 ' hrsh7th/cmp-nvim-lsp' ,
487496 },
488497 config = function ()
498+ -- personal setup for bracket autocompletion
499+
500+ local cmp_autopairs = require ' nvim-autopairs.completion.cmp'
501+ local cmp = require ' cmp'
502+ cmp .event :on (' confirm_done' , cmp_autopairs .on_confirm_done ())
503+
489504 -- Brief aside: **What is LSP?**
490505 --
491506 -- LSP is an initialism you've probably heard, but might not understand what it is.
@@ -561,6 +576,9 @@ require('lazy').setup({
561576 -- or a suggestion from your LSP for this to activate.
562577 map (' <leader>ca' , vim .lsp .buf .code_action , ' [C]ode [A]ction' , { ' n' , ' x' })
563578
579+ -- open explorer
580+ map (' <leader>E' , ' :NvimTreeOpen<CR>' , ' [E]xplorer' )
581+
564582 -- WARN: This is not Goto Definition, this is Goto Declaration.
565583 -- For example, in C this would take you to the header.
566584 map (' gD' , vim .lsp .buf .declaration , ' [G]oto [D]eclaration' )
@@ -841,7 +859,7 @@ require('lazy').setup({
841859 -- Accept ([y]es) the completion.
842860 -- This will auto-import if your LSP supports it.
843861 -- This will expand snippets if the LSP sent a snippet.
844- [' <C-y >' ] = cmp .mapping .confirm { select = true },
862+ [' <Tab >' ] = cmp .mapping .confirm { select = true },
845863
846864 -- If you prefer more traditional completion keymaps,
847865 -- you can uncomment the following lines
0 commit comments