This commit is contained in:
jorgenwh 2024-06-04 19:19:49 +02:00
parent 723f43a7f4
commit 05dcadd82d
4 changed files with 19 additions and 10 deletions

View File

@ -1,3 +1,3 @@
vim.opt.tabstop = 2 vim.opt.tabstop = 4
vim.opt.softtabstop = 2 vim.opt.softtabstop = 4
vim.opt.shiftwidth = 2 vim.opt.shiftwidth = 4

View File

@ -1,3 +1,3 @@
vim.opt.tabstop = 2 vim.opt.tabstop = 4
vim.opt.softtabstop = 2 vim.opt.softtabstop = 4
vim.opt.shiftwidth = 2 vim.opt.shiftwidth = 4

View File

@ -533,8 +533,9 @@ require('lazy').setup({
local servers = { local servers = {
-- clangd = {}, -- clangd = {},
-- gopls = {}, -- gopls = {},
-- pyright = {}, pyright = {},
-- rust_analyzer = {}, -- rust_analyzer = {},
-- java_language_server = {},
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
-- --
-- Some languages (like typescript) have entire language plugins that can be useful: -- Some languages (like typescript) have entire language plugins that can be useful:
@ -684,7 +685,7 @@ 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(), ['<S-CR>'] = cmp.mapping.select_next_item(),
-- Select the [p]revious item -- Select the [p]revious item
['<C-p>'] = cmp.mapping.select_prev_item(), ['<C-p>'] = cmp.mapping.select_prev_item(),
@ -695,7 +696,7 @@ require('lazy').setup({
-- 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 }, ['<CR>'] = cmp.mapping.confirm { select = true },
-- If you prefer more traditional completion keymaps, -- If you prefer more traditional completion keymaps,
-- you can uncomment the following lines -- you can uncomment the following lines

View File

@ -3,6 +3,14 @@ return {
cmd = 'Copilot', cmd = 'Copilot',
event = 'InsertEnter', event = 'InsertEnter',
config = function() config = function()
require('copilot').setup {} require('copilot').setup {
suggestion = {
keymap = {
accept = '<Tab>',
next = '<S-Tab>',
},
},
}
require('copilot.suggestion').toggle_auto_trigger()
end, end,
} }