[fix] Fix the copilot issue on not LspAttach-ed files

This commit is contained in:
Uttarayan Mondal
2023-04-12 15:51:46 +05:30
parent 20cd46b6fb
commit 9681e59013
3 changed files with 9 additions and 8 deletions

View File

@@ -91,6 +91,7 @@ vim.g.coq_settings = {
} }
-- vim.g.rooter_manual_only = 1 -- vim.g.rooter_manual_only = 1
vim.g.copilot_node_command = "~/.local/share/nvm/v16.18.1/bin/node" vim.g.copilot_node_command = "~/.local/share/nvm/v16.18.1/bin/node"
vim.g.copilot_no_tab_map = true
require('keymaps') require('keymaps')
require('plugins') require('plugins')

View File

@@ -87,8 +87,8 @@ local normal_mode_maps = {
local insert_mode_maps = { local insert_mode_maps = {
{ key = '<C-j>', map = '<ESC>' }, { key = '<C-j>', map = '<ESC>' },
{ key = "<C-l>", map = 'copilot#Accept("<CR>")', options = { silent = true, expr = true } }, -- { key = "<C-l>", map = 'copilot#Accept("<CR>")', options = { silent = true, expr = true } },
{ key = "<C-m>", map = 'copilot#Accept("<CR>")', options = { silent = true, expr = true } }, -- { key = "<C-m>", map = 'copilot#Accept("<CR>")', options = { silent = true, expr = true } },
{ key = '<C-c>', map = [[<cmd>Telescope commands<cr>]] }, { key = '<C-c>', map = [[<cmd>Telescope commands<cr>]] },
} }

View File

@@ -28,10 +28,10 @@ return require('lazy').setup({
{ 'tpope/vim-fugitive', cmd = { "Git", "Gdiffsplit", "Gvdiffsplit", "Gedit", "Gread", "Gwrite", "Ggrep", "Gbrowse", "GMove", "GDelete" } }, { 'tpope/vim-fugitive', cmd = { "Git", "Gdiffsplit", "Gvdiffsplit", "Gedit", "Gread", "Gwrite", "Ggrep", "Gbrowse", "GMove", "GDelete" } },
'tpope/vim-repeat', 'tpope/vim-repeat',
'tpope/vim-speeddating', 'tpope/vim-speeddating',
'tpope/vim-surround', { 'tpope/vim-surround', lazy = false },
'tpope/vim-vinegar', 'tpope/vim-vinegar',
'tpope/vim-abolish', 'tpope/vim-abolish',
{ 'yuttie/comfortable-motion.vim', lazy = "BufEnter" }, { 'yuttie/comfortable-motion.vim', event = "BufEnter" },
-- 'ruanyl/vim-gh-line', -- 'ruanyl/vim-gh-line',
{ 'rest-nvim/rest.nvim', event = "BufEnter" }, { 'rest-nvim/rest.nvim', event = "BufEnter" },
-- 'b0o/SchemaStore.nvim', -- 'b0o/SchemaStore.nvim',
@@ -166,11 +166,11 @@ return require('lazy').setup({
end, end,
}, },
{ 'neovim/nvim-lspconfig', { 'neovim/nvim-lspconfig',
ft = { "rust", "toml", "lua" }, ft = { "rust", "toml", "lua", "c", "cpp", "markdown" },
config = function() config = function()
require( require("lsp")
"lsp") end
end, }, },
{ {
'nvim-lua/lsp-status.nvim', 'nvim-lua/lsp-status.nvim',
event = "LspAttach" event = "LspAttach"