Change autocomplete shortcuts, added shorcut for Lazy
This commit is contained in:
parent
5ff2a9d6e4
commit
8d7439522a
29
init.lua
29
init.lua
|
@ -1,5 +1,5 @@
|
||||||
--[[
|
--[[
|
||||||
Lua 15 mins guide - https://learnxinyminutes.com/docs/lua/
|
- Lua 15 mins guide - https://learnxinyminutes.com/docs/lua/
|
||||||
- :help lua-guide
|
- :help lua-guide
|
||||||
|
|
||||||
If you experience any errors while trying to install kickstart, run `:checkhealth` for more info.
|
If you experience any errors while trying to install kickstart, run `:checkhealth` for more info.
|
||||||
|
@ -257,6 +257,7 @@ require('lazy').setup({
|
||||||
{ '<leader>w', group = '[W]orkspace' },
|
{ '<leader>w', group = '[W]orkspace' },
|
||||||
{ '<leader>t', group = '[T]oggle' },
|
{ '<leader>t', group = '[T]oggle' },
|
||||||
{ '<leader>h', group = 'Git [H]unk', mode = { 'n', 'v' } },
|
{ '<leader>h', group = 'Git [H]unk', mode = { 'n', 'v' } },
|
||||||
|
{ '<leader>m', group = '[M]isc' },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -792,24 +793,28 @@ require('lazy').setup({
|
||||||
-- No, but seriously. Please read `:help ins-completion`, it is really good!
|
-- No, but seriously. Please read `:help ins-completion`, it is really good!
|
||||||
mapping = cmp.mapping.preset.insert {
|
mapping = cmp.mapping.preset.insert {
|
||||||
-- Select the [n]ext item
|
-- Select the [n]ext item
|
||||||
['<C-n>'] = cmp.mapping.select_next_item(),
|
['<C-j>'] = cmp.mapping.select_next_item(),
|
||||||
-- Select the [p]revious item
|
-- Select the [p]revious item
|
||||||
['<C-p>'] = cmp.mapping.select_prev_item(),
|
['<C-k>'] = cmp.mapping.select_prev_item(),
|
||||||
|
--['<Tab>'] = cmp.mapping.select_next_item(),
|
||||||
|
--['<S-Tab>'] = cmp.mapping.select_prev_item(),
|
||||||
|
|
||||||
-- Scroll the documentation window [b]ack / [f]orward
|
-- Scroll the documentation window [b]ack / [f]orward
|
||||||
['<C-b>'] = cmp.mapping.scroll_docs(-4),
|
['<C-d>'] = cmp.mapping.scroll_docs(-4),
|
||||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
['<C-u>'] = cmp.mapping.scroll_docs(4),
|
||||||
|
-- ['<C-b>'] = cmp.mapping.scroll_docs(-4),
|
||||||
|
-- ['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||||
|
|
||||||
-- Accept ([y]es) the completion.
|
-- Accept ([y]es) the completion.
|
||||||
-- This will auto-import if your LSP supports it.
|
-- This will auto-import if your LSP supports it.
|
||||||
-- This will expand snippets if the LSP sent a snippet.
|
-- This will expand snippets if the LSP sent a snippet.
|
||||||
['<C-y>'] = cmp.mapping.confirm { select = true },
|
-- ['<C-y>'] = cmp.mapping.confirm { select = true },
|
||||||
|
['<CR>'] = cmp.mapping.confirm {
|
||||||
|
behavior = cmp.ConfirmBehavior.Insert,
|
||||||
|
select = true,
|
||||||
|
},
|
||||||
|
|
||||||
-- If you prefer more traditional completion keymaps,
|
['<C-e>'] = cmp.mapping.close(),
|
||||||
-- you can uncomment the following lines
|
|
||||||
--['<CR>'] = cmp.mapping.confirm { select = true },
|
|
||||||
--['<Tab>'] = cmp.mapping.select_next_item(),
|
|
||||||
--['<S-Tab>'] = cmp.mapping.select_prev_item(),
|
|
||||||
|
|
||||||
-- Manually trigger a completion from nvim-cmp.
|
-- Manually trigger a completion from nvim-cmp.
|
||||||
-- Generally you don't need this, because nvim-cmp will display
|
-- Generally you don't need this, because nvim-cmp will display
|
||||||
|
@ -976,6 +981,8 @@ require('lazy').setup({
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
vim.keymap.set('n', '<leader>hl', '<cmd>Lazy<cr>', { desc = 'Lazy' }),
|
||||||
|
|
||||||
-- The following comments only work if you have downloaded the kickstart repo, not just copy pasted the
|
-- The following comments only work if you have downloaded the kickstart repo, not just copy pasted the
|
||||||
-- init.lua. If you want these files, they are in the repository, so you can just download them and
|
-- init.lua. If you want these files, they are in the repository, so you can just download them and
|
||||||
-- place them in the correct locations.
|
-- place them in the correct locations.
|
||||||
|
|
Loading…
Reference in New Issue