From fe0e6818d1ac1d89465c94457a961b5d54436d67 Mon Sep 17 00:00:00 2001 From: Cody Hiar Date: Thu, 2 Mar 2023 12:44:24 -0700 Subject: testing copilot --- flake.nix | 3 ++- init.lua | 92 +++++++++++++++++++++++++++++++-------------------------------- 2 files changed, 48 insertions(+), 47 deletions(-) diff --git a/flake.nix b/flake.nix index cab6a93..3c7161c 100644 --- a/flake.nix +++ b/flake.nix @@ -68,7 +68,7 @@ # Autocompletes nvim-lspconfig nvim-cmp - cmp-nvim-lsp + /* cmp-nvim-lsp */ # File navigation lf-vim @@ -92,6 +92,7 @@ LanguageTool-nvim camelcasemotion vim-table-mode + copilot-vim ]; }; }; diff --git a/init.lua b/init.lua index b17b046..6b436e9 100644 --- a/init.lua +++ b/init.lua @@ -222,53 +222,53 @@ end -- local servers = { 'pyls', 'rust_analyzer', 'tsserver' } local servers = { 'jedi_language_server', 'bashls', 'terraformls' } -- Add additional capabilities supported by nvim-cmp -local capabilities = vim.lsp.protocol.make_client_capabilities() -capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities) --- Setup language servers -for _, lsp in ipairs(servers) do - nvim_lsp[lsp].setup { - on_attach = on_attach, - flags = { - debounce_text_changes = 150, - }, - capabilities = capabilities, - } -end --- Set completeopt to have a better completion experience -vim.o.completeopt = 'menuone,noselect' +-- local capabilities = vim.lsp.protocol.make_client_capabilities() +-- capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities) +-- -- Setup language servers +-- for _, lsp in ipairs(servers) do +-- nvim_lsp[lsp].setup { +-- on_attach = on_attach, +-- flags = { +-- debounce_text_changes = 150, +-- }, +-- capabilities = capabilities, +-- } +-- end +-- -- Set completeopt to have a better completion experience +-- vim.o.completeopt = 'menuone,noselect' -- nvim-cmp setup -local cmp = require 'cmp' -cmp.setup { - mapping = { - [''] = cmp.mapping.select_prev_item(), - [''] = cmp.mapping.select_next_item(), - [''] = cmp.mapping.scroll_docs(-4), - [''] = cmp.mapping.scroll_docs(4), - [''] = cmp.mapping.complete(), - [''] = cmp.mapping.close(), - [''] = cmp.mapping.confirm { - behavior = cmp.ConfirmBehavior.Replace, - select = true, - }, - [''] = function(fallback) - if cmp.visible() then - cmp.select_next_item() - else - fallback() - end - end, - [''] = function(fallback) - if cmp.visible() then - cmp.select_prev_item() - else - fallback() - end - end, - }, - sources = { - { name = 'nvim_lsp' }, - }, -} +-- local cmp = require 'cmp' +-- cmp.setup { +-- mapping = { +-- [''] = cmp.mapping.select_prev_item(), +-- [''] = cmp.mapping.select_next_item(), +-- [''] = cmp.mapping.scroll_docs(-4), +-- [''] = cmp.mapping.scroll_docs(4), +-- [''] = cmp.mapping.complete(), +-- [''] = cmp.mapping.close(), +-- [''] = cmp.mapping.confirm { +-- behavior = cmp.ConfirmBehavior.Replace, +-- select = true, +-- }, +-- [''] = function(fallback) +-- if cmp.visible() then +-- cmp.select_next_item() +-- else +-- fallback() +-- end +-- end, +-- [''] = function(fallback) +-- if cmp.visible() then +-- cmp.select_prev_item() +-- else +-- fallback() +-- end +-- end, +-- }, +-- sources = { +-- { name = 'nvim_lsp' }, +-- }, +-- } -- nvim-fzf vim.api.nvim_set_keymap('n', 'ff', "Files", { noremap = true }) -- cgit v1.2.3