summaryrefslogtreecommitdiff
path: root/dot_config/nvim
diff options
context:
space:
mode:
authorIbrahim Muftee <ibrahim@muftee.net>2024-08-08 12:59:22 -0500
committerIbrahim Muftee <ibrahim@muftee.net>2026-07-01 00:23:31 -0400
commit15e4a73ff96aba9aa9a9df4f90df7c61139e49c5 (patch)
tree761033a3ce352fd3373379ba7e4351964086d3ae /dot_config/nvim
parent0a76ecb3cfa3dbfaaefb7ef46783b9f6ce4ac13f (diff)
fix(nvim): untemplating nvim-cmp to remove copilot
Diffstat (limited to 'dot_config/nvim')
-rw-r--r--dot_config/nvim/lua/plugins/nvim-cmp.lua (renamed from dot_config/nvim/lua/plugins/nvim-cmp.lua.tmpl)60
1 files changed, 0 insertions, 60 deletions
diff --git a/dot_config/nvim/lua/plugins/nvim-cmp.lua.tmpl b/dot_config/nvim/lua/plugins/nvim-cmp.lua
index d7b6661..151e67b 100644
--- a/dot_config/nvim/lua/plugins/nvim-cmp.lua.tmpl
+++ b/dot_config/nvim/lua/plugins/nvim-cmp.lua
@@ -1,27 +1,3 @@
--- {{/*
--- vim:ft=lua
--- This file supports Go's text/template language.
---
--- My work role allows me to use an enterprise subscription to GitHub
--- Copilot, but I don't pay to use this personally.
---
--- Since copilot.lua is integrated tightly into nvim-cmp, using a
--- Chezmoi template is the easiest way to manage this machine-specific
--- difference.
---
--- Unfortunately, it's tough to get an editor to treat this as both
--- a Go template and as a Lua file. I compromise by calling it a Lua
--- file and wrapping template directives in Lua comments. This has the
--- side effect of adding a few extra random dash characters to the
--- rendered file, but I don't mind.
---
--- */}}
-
--- Optional features:
--- * GitHub Copilot: {{ .enable_nvim_copilot }}
---
--- To adjust optional features, see the Chezmoi config at {{ .chezmoi.configFile }}
-
return {
"hrsh7th/nvim-cmp",
version = false, -- last release is way too old
@@ -37,12 +13,6 @@ return {
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-path",
"saadparwaiz1/cmp_luasnip",
-
- -- {{ if eq .enable_nvim_copilot true -}}
- -- GitHub Copilot
- "zbirenbaum/copilot.lua",
- "zbirenbaum/copilot-cmp",
- -- {{- end }}
},
config = function()
local cmp = require("cmp")
@@ -51,15 +21,6 @@ return {
-- Load any VSCode-style snippets from other installed plugins
require("luasnip.loaders.from_vscode").lazy_load()
- -- {{ if eq .enable_nvim_copilot true -}}
- -- Init Copilot
- require("copilot").setup({
- suggestion = { enabled = false },
- panel = { enabled = false },
- })
- require("copilot_cmp").setup()
- -- {{ end }}
-
cmp.setup({
completion = {
-- See :help completeopt
@@ -112,11 +73,6 @@ return {
comparators = {
cmp.config.compare.exact,
- -- {{ if eq .enable_nvim_copilot true -}}
- -- Custom comparitor from copilot_cmp
- require("copilot_cmp.comparators").prioritize,
- -- {{ end -}}
-
-- Mostly default sort order from cmp
cmp.config.compare.offset,
-- cmp.config.compare.scopes, --this is commented in nvim-cmp too
@@ -135,20 +91,9 @@ return {
{ name = "nvim_lsp_signature_help", group_index = 2 },
{ name = "luasnip", group_index = 2 },
- -- {{ if eq .enable_nvim_copilot true }}
- { name = "copilot", group_index = 2 },
- -- {{ end }}
{ name = "path", group_index = 2 },
{ name = "buffer", group_index = 2, keyword_length = 5 },
},
- -- sources = cmp.config.sources({
- -- { name = "nvim_lsp_signature_help" },
- -- { name = "nvim_lsp" },
- -- { name = "luasnip" },
- -- }, {
- -- { name = "path" },
- -- { name = "buffer", keyword_length = 5 },
- -- }),
formatting = {
format = require("lspkind").cmp_format({
mode = "symbol_text",
@@ -158,11 +103,6 @@ return {
end,
ellipsis_char = "...",
show_labelDetails = true,
- symbol_map = {
- -- {{ if eq .enable_nvim_copilot true }}
- Copilot = " ",
- -- {{ end }}
- },
}),
},
experimental = {