diff --git a/init.lua b/init.lua index 7e68de67..e9a9b95c 100644 --- a/init.lua +++ b/init.lua @@ -88,7 +88,7 @@ require('lazy').setup({ -- Useful status updates for LSP -- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})` - { 'j-hui/fidget.nvim', opts = {} }, + { 'j-hui/fidget.nvim', opts = {} }, -- Additional lua configuration, makes nvim stuff amazing! 'folke/neodev.nvim', @@ -113,7 +113,7 @@ require('lazy').setup({ }, -- Useful plugin to show you pending keybinds. - { 'folke/which-key.nvim', opts = {} }, + { 'folke/which-key.nvim', opts = {} }, { -- Adds git related signs to the gutter, as well as utilities for managing changes 'lewis6991/gitsigns.nvim', @@ -266,7 +266,7 @@ require('lazy').setup({ -- 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 - -- { import = 'custom.plugins' }, + { import = 'custom.plugins' }, }, {}) -- [[ Setting options ]] @@ -285,7 +285,7 @@ vim.o.mouse = 'a' -- Sync clipboard between OS and Neovim. -- Remove this option if you want your OS clipboard to remain independent. -- See `:help 'clipboard'` -vim.o.clipboard = 'unnamedplus' +-- vim.o.clipboard = 'unnamedplus' -- Enable break indent 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 -- define the property 'filetypes' to the map in question. local servers = { - -- clangd = {}, - -- gopls = {}, - -- pyright = {}, - -- rust_analyzer = {}, - -- tsserver = {}, - -- html = { filetypes = { 'html', 'twig', 'hbs'} }, + clangd = {}, + gopls = {}, + pyright = {}, + rust_analyzer = {}, + tsserver = {}, + html = { filetypes = { 'html', 'twig', 'hbs' } }, lua_ls = { Lua = { @@ -627,15 +627,19 @@ cmp.setup { [''] = cmp.mapping.scroll_docs(-4), [''] = cmp.mapping.scroll_docs(4), [''] = cmp.mapping.complete {}, - [''] = cmp.mapping.confirm { - behavior = cmp.ConfirmBehavior.Replace, - select = true, - }, + -- [''] = cmp.mapping.confirm { + -- behavior = cmp.ConfirmBehavior.Replace, + -- select = true, + -- }, [''] = cmp.mapping(function(fallback) if cmp.visible() then - cmp.select_next_item() + cmp.confirm { + select = true, + } elseif luasnip.expand_or_locally_jumpable() then luasnip.expand_or_jump() + elseif require("copilot.suggestion").is_visible() then + require("copilot.suggestion").accept() else fallback() end