From b9ee8f57e0b931bb0388f587139df35e16eee249 Mon Sep 17 00:00:00 2001 From: Titus Moore Date: Mon, 3 Apr 2023 16:09:43 -0400 Subject: [PATCH] Re-alias copilot command --- init.lua | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/init.lua b/init.lua index 4255a836..c77b0dc8 100644 --- a/init.lua +++ b/init.lua @@ -36,7 +36,8 @@ require('lazy').setup({ -- NOTE: This is where your plugins related to LSP can be installed. -- The configuration is done below. Search for lspconfig to find it below. - { -- LSP Configuration & Plugins + { + -- LSP Configuration & Plugins 'neovim/nvim-lspconfig', dependencies = { -- Automatically install LSPs to stdpath for neovim @@ -52,14 +53,16 @@ require('lazy').setup({ }, }, - { -- Autocompletion + { + -- Autocompletion 'hrsh7th/nvim-cmp', dependencies = { 'hrsh7th/cmp-nvim-lsp', 'L3MON4D3/LuaSnip', 'saadparwaiz1/cmp_luasnip' }, }, -- Useful plugin to show you pending keybinds. - { 'folke/which-key.nvim', opts = {} }, - { -- Adds git releated signs to the gutter, as well as utilities for managing changes + { 'folke/which-key.nvim', opts = {} }, + { + -- Adds git releated signs to the gutter, as well as utilities for managing changes 'lewis6991/gitsigns.nvim', opts = { -- See `:help gitsigns.txt` @@ -73,7 +76,8 @@ require('lazy').setup({ }, }, - { -- Theme inspired by Atom + { + -- Theme inspired by Atom 'navarasu/onedark.nvim', priority = 1000, config = function() @@ -81,7 +85,8 @@ require('lazy').setup({ end, }, - { -- Set lualine as statusline + { + -- Set lualine as statusline 'nvim-lualine/lualine.nvim', -- See `:help lualine.txt` opts = { @@ -94,7 +99,8 @@ require('lazy').setup({ }, }, - { -- Add indentation guides even on blank lines + { + -- Add indentation guides even on blank lines 'lukas-reineke/indent-blankline.nvim', -- Enable `lukas-reineke/indent-blankline.nvim` -- See `:help indent_blankline.txt` @@ -105,7 +111,7 @@ require('lazy').setup({ }, -- "gc" to comment visual regions/lines - { 'numToStr/Comment.nvim', opts = {} }, + { 'numToStr/Comment.nvim', opts = {} }, -- Fuzzy Finder (files, lsp, etc) { 'nvim-telescope/telescope.nvim', version = '*', dependencies = { 'nvim-lua/plenary.nvim' } }, @@ -123,7 +129,8 @@ require('lazy').setup({ end, }, - { -- Highlight, edit, and navigate code + { + -- Highlight, edit, and navigate code 'nvim-treesitter/nvim-treesitter', dependencies = { 'nvim-treesitter/nvim-treesitter-textobjects', @@ -246,6 +253,11 @@ vim.keymap.set('n', 'sw', require('telescope.builtin').grep_string, { de vim.keymap.set('n', 'sg', require('telescope.builtin').live_grep, { desc = '[S]earch by [G]rep' }) vim.keymap.set('n', 'sd', require('telescope.builtin').diagnostics, { desc = '[S]earch [D]iagnostics' }) +-- Copilot Re-alias +vim.g.copilot_no_tab_map = true +vim.g.copilot_assumed_mapped = true +vim.keymap.set('i', '', 'copilot#Accept("")', { expr = true, silent = true }) + -- [[ Configure Treesitter ]] -- See `:help nvim-treesitter` require('nvim-treesitter.configs').setup { @@ -372,9 +384,8 @@ local servers = { -- clangd = {}, -- gopls = {}, -- pyright = {}, - -- rust_analyzer = {}, - -- tsserver = {}, - + rust_analyzer = {}, + tsserver = {}, lua_ls = { Lua = { workspace = { checkThirdParty = false },