mirror of
https://github.com/nvim-lua/kickstart.nvim.git
synced 2025-06-24 14:18:36 +02:00
Add files via upload
This commit is contained in:
parent
b98a370a30
commit
af21c78d94
4 changed files with 36 additions and 26 deletions
|
@ -11,3 +11,13 @@ vim.api.nvim_create_autocmd('TextYankPost', {
|
|||
vim.highlight.on_yank()
|
||||
end,
|
||||
})
|
||||
vim.api.nvim_create_user_command('FormatDisable', function()
|
||||
vim.g.disable_autoformat = true
|
||||
end, {
|
||||
desc = 'Disable autoformat-on-save',
|
||||
})
|
||||
vim.api.nvim_create_user_command('FormatEnable', function()
|
||||
vim.g.disable_autoformat = false
|
||||
end, {
|
||||
desc = 'Re-enable autoformat-on-save',
|
||||
})
|
||||
|
|
|
@ -12,6 +12,9 @@ vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float, { desc = 'Show diagn
|
|||
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' })
|
||||
vim.keymap.set('n', '<leader>z', require('telescope').extensions.zoxide.list, { desc = '[Z]oxide to different dir' })
|
||||
vim.keymap.set('n', '<leader>jl', require('telescope.builtin').jumplist, { desc = '[J]ump [L]ist' })
|
||||
vim.keymap.set('n', '<leader>ft', function()
|
||||
vim.g.disable_format = not vim.g.disable_autoformat
|
||||
end, { desc = 'Auto[F]ormat [T]oggle ' })
|
||||
-- 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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue