copilot
This commit is contained in:
parent
723f43a7f4
commit
05dcadd82d
|
@ -1,3 +1,3 @@
|
|||
vim.opt.tabstop = 2
|
||||
vim.opt.softtabstop = 2
|
||||
vim.opt.shiftwidth = 2
|
||||
vim.opt.tabstop = 4
|
||||
vim.opt.softtabstop = 4
|
||||
vim.opt.shiftwidth = 4
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
vim.opt.tabstop = 2
|
||||
vim.opt.softtabstop = 2
|
||||
vim.opt.shiftwidth = 2
|
||||
vim.opt.tabstop = 4
|
||||
vim.opt.softtabstop = 4
|
||||
vim.opt.shiftwidth = 4
|
||||
|
|
7
init.lua
7
init.lua
|
@ -533,8 +533,9 @@ require('lazy').setup({
|
|||
local servers = {
|
||||
-- clangd = {},
|
||||
-- gopls = {},
|
||||
-- pyright = {},
|
||||
pyright = {},
|
||||
-- rust_analyzer = {},
|
||||
-- java_language_server = {},
|
||||
-- ... 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:
|
||||
|
@ -684,7 +685,7 @@ require('lazy').setup({
|
|||
-- No, but seriously. Please read `:help ins-completion`, it is really good!
|
||||
mapping = cmp.mapping.preset.insert {
|
||||
-- Select the [n]ext item
|
||||
['<C-n>'] = cmp.mapping.select_next_item(),
|
||||
['<S-CR>'] = cmp.mapping.select_next_item(),
|
||||
-- Select the [p]revious item
|
||||
['<C-p>'] = cmp.mapping.select_prev_item(),
|
||||
|
||||
|
@ -695,7 +696,7 @@ require('lazy').setup({
|
|||
-- Accept ([y]es) the completion.
|
||||
-- This will auto-import if your LSP supports it.
|
||||
-- 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,
|
||||
-- you can uncomment the following lines
|
||||
|
|
|
@ -3,6 +3,14 @@ return {
|
|||
cmd = 'Copilot',
|
||||
event = 'InsertEnter',
|
||||
config = function()
|
||||
require('copilot').setup {}
|
||||
require('copilot').setup {
|
||||
suggestion = {
|
||||
keymap = {
|
||||
accept = '<Tab>',
|
||||
next = '<S-Tab>',
|
||||
},
|
||||
},
|
||||
}
|
||||
require('copilot.suggestion').toggle_auto_trigger()
|
||||
end,
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue