jan30-122
This commit is contained in:
parent
28fef4cd6b
commit
d506e0460d
21
init.lua
21
init.lua
|
|
@ -176,6 +176,15 @@ vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
|
|||
-- Diagnostic keymaps
|
||||
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' })
|
||||
|
||||
-- Insert PHP doc block comment
|
||||
vim.keymap.set('n', '<leader>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 <C-\><C-n>, 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', '<leader>o', '<cmd>Outline<CR>', { 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',
|
||||
|
|
|
|||
Loading…
Reference in New Issue