From d506e0460dbe727453e8d373deb2c64c071025fe Mon Sep 17 00:00:00 2001 From: Ye Thi Ha Htwe Date: Fri, 30 Jan 2026 01:22:36 +0700 Subject: [PATCH] jan30-122 --- init.lua | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/init.lua b/init.lua index 174bfa19..725edbfc 100644 --- a/init.lua +++ b/init.lua @@ -176,6 +176,15 @@ vim.keymap.set('n', '', 'nohlsearch') -- Diagnostic keymaps vim.keymap.set('n', 'q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' }) +-- Insert PHP doc block comment +vim.keymap.set('n', 'cd', function() + local line = vim.api.nvim_get_current_line() + if line:match '^%s*$' then -- if line is empty or whitespace + vim.api.nvim_put({ '/**', ' * ', ' */' }, 'l', true, true) + vim.api.nvim_command 'normal! k$' + end +end, { desc = '[C]omment [D]oc block' }) + -- Exit terminal mode in the builtin terminal with a shortcut that is a bit easier -- for people to discover. Otherwise, you normally need to press , which -- is not what someone will guess without a bit more experience. @@ -1027,6 +1036,7 @@ require('lazy').setup({ -- - sd' - [S]urround [D]elete [']quotes -- - sr)' - [S]urround [R]eplace [)] ['] require('mini.surround').setup() + require('mini.comment').setup() -- Simple and easy statusline. -- You could remove this setup call if you don't like it, @@ -1047,6 +1057,17 @@ require('lazy').setup({ -- Check out: https://github.com/echasnovski/mini.nvim end, }, + { -- outline view of symbols in current file + 'hedyhli/outline.nvim', + config = function() + -- Example mapping to toggle outline + vim.keymap.set('n', 'o', 'Outline', { desc = 'Toggle Outline' }) + + require('outline').setup { + -- Your setup opts here (leave empty to use defaults) + } + end, + }, { -- Highlight, edit, and navigate code 'nvim-treesitter/nvim-treesitter', build = ':TSUpdate',