init again

This commit is contained in:
alvin.tan 2024-01-10 21:17:15 +08:00
parent c4055a2212
commit e75cd5beb3
1 changed files with 19 additions and 15 deletions

View File

@ -266,7 +266,7 @@ require('lazy').setup({
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going. -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
-- --
-- For additional information see: https://github.com/folke/lazy.nvim#-structuring-your-plugins -- For additional information see: https://github.com/folke/lazy.nvim#-structuring-your-plugins
-- { import = 'custom.plugins' }, { import = 'custom.plugins' },
}, {}) }, {})
-- [[ Setting options ]] -- [[ Setting options ]]
@ -285,7 +285,7 @@ vim.o.mouse = 'a'
-- Sync clipboard between OS and Neovim. -- Sync clipboard between OS and Neovim.
-- Remove this option if you want your OS clipboard to remain independent. -- Remove this option if you want your OS clipboard to remain independent.
-- See `:help 'clipboard'` -- See `:help 'clipboard'`
vim.o.clipboard = 'unnamedplus' -- vim.o.clipboard = 'unnamedplus'
-- Enable break indent -- Enable break indent
vim.o.breakindent = true vim.o.breakindent = true
@ -563,12 +563,12 @@ require('mason-lspconfig').setup()
-- If you want to override the default filetypes that your language server will attach to you can -- If you want to override the default filetypes that your language server will attach to you can
-- define the property 'filetypes' to the map in question. -- define the property 'filetypes' to the map in question.
local servers = { local servers = {
-- clangd = {}, clangd = {},
-- gopls = {}, gopls = {},
-- pyright = {}, pyright = {},
-- rust_analyzer = {}, rust_analyzer = {},
-- tsserver = {}, tsserver = {},
-- html = { filetypes = { 'html', 'twig', 'hbs'} }, html = { filetypes = { 'html', 'twig', 'hbs' } },
lua_ls = { lua_ls = {
Lua = { Lua = {
@ -627,15 +627,19 @@ cmp.setup {
['<C-b>'] = cmp.mapping.scroll_docs(-4), ['<C-b>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4), ['<C-f>'] = cmp.mapping.scroll_docs(4),
['<C-Space>'] = cmp.mapping.complete {}, ['<C-Space>'] = cmp.mapping.complete {},
['<CR>'] = cmp.mapping.confirm { -- ['<CR>'] = cmp.mapping.confirm {
behavior = cmp.ConfirmBehavior.Replace, -- behavior = cmp.ConfirmBehavior.Replace,
select = true, -- select = true,
}, -- },
['<Tab>'] = cmp.mapping(function(fallback) ['<Tab>'] = cmp.mapping(function(fallback)
if cmp.visible() then if cmp.visible() then
cmp.select_next_item() cmp.confirm {
select = true,
}
elseif luasnip.expand_or_locally_jumpable() then elseif luasnip.expand_or_locally_jumpable() then
luasnip.expand_or_jump() luasnip.expand_or_jump()
elseif require("copilot.suggestion").is_visible() then
require("copilot.suggestion").accept()
else else
fallback() fallback()
end end