aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/nvim
diff options
context:
space:
mode:
authorToby Vincent <tobyv@tobyvin.dev>2024-04-05 16:34:19 -0500
committerToby Vincent <tobyv@tobyvin.dev>2024-04-05 16:36:57 -0500
commit9e529c1b7f393a4976614319992abc8c10a018bd (patch)
tree5216bad194e10fb9f0b8cc19d194473782337436 /nvim
parentcd3944d3a69bd0ecf11f3dd676a7d41609fa2c40 (diff)
feat(nvim): replace nvim-cmp with epo
Diffstat (limited to 'nvim')
-rw-r--r--nvim/.config/nvim/lazy-lock.json7
-rw-r--r--nvim/.config/nvim/lua/plugins/cmp.lua90
-rw-r--r--nvim/.config/nvim/lua/plugins/epo.lua19
3 files changed, 20 insertions, 96 deletions
diff --git a/nvim/.config/nvim/lazy-lock.json b/nvim/.config/nvim/lazy-lock.json
index 5994209..b4103de 100644
--- a/nvim/.config/nvim/lazy-lock.json
+++ b/nvim/.config/nvim/lazy-lock.json
@@ -3,13 +3,9 @@
"LuaSnip": { "branch": "master", "commit": "8ae1dedd988eb56441b7858bd1e8554dfadaa46d" },
"SchemaStore.nvim": { "branch": "main", "commit": "b788bde023f9fbc2eb86e89d32c0bf98a60ae406" },
"cellular-automaton.nvim": { "branch": "main", "commit": "b7d056dab963b5d3f2c560d92937cb51db61cb5b" },
- "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
- "cmp-cmdline": { "branch": "main", "commit": "8ee981b4a91f536f52add291594e89fb6645e451" },
- "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
- "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
- "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
"conform.nvim": { "branch": "master", "commit": "4c01323a67f1636d73803aad4e8e735bad7a9561" },
"dressing.nvim": { "branch": "master", "commit": "6f212262061a2120e42da0d1e87326e8a41c0478" },
+ "epo.nvim": { "branch": "main", "commit": "78765df88e62f817f4ce934bc07b76c97ba2c75b" },
"ferris.nvim": { "branch": "main", "commit": "52e39c017f511e8cf9a024022d48164bfbfe52ee" },
"fidget.nvim": { "branch": "main", "commit": "4e854f3299e21d1c18279add340428a97520fc44" },
"gitsigns.nvim": { "branch": "main", "commit": "6ef8c54fb526bf3a0bc4efb0b2fe8e6d9a7daed2" },
@@ -24,7 +20,6 @@
"neotest-plenary": { "branch": "master", "commit": "dcaf5ed67a9e28a246e9783319e5aa6c9ea1c584" },
"neotest-python": { "branch": "master", "commit": "2e83d2bc00acbcc1fd529dbf0a0e677cabfe6b50" },
"neotest-rust": { "branch": "main", "commit": "9e9df68064bd6fa3b5e40b32fcb7c52af130cdbf" },
- "nvim-cmp": { "branch": "main", "commit": "04e0ca376d6abdbfc8b52180f8ea236cbfddf782" },
"nvim-colorizer.lua": { "branch": "master", "commit": "85855b38011114929f4058efc97af1059ab3e41d" },
"nvim-dap": { "branch": "master", "commit": "fc880e82059eb21c0fa896be60146e5f17680648" },
"nvim-dap-go": { "branch": "main", "commit": "64f73400761e2d19459e664a52ea478f3a4420e7" },
diff --git a/nvim/.config/nvim/lua/plugins/cmp.lua b/nvim/.config/nvim/lua/plugins/cmp.lua
deleted file mode 100644
index bdf6ea2..0000000
--- a/nvim/.config/nvim/lua/plugins/cmp.lua
+++ /dev/null
@@ -1,90 +0,0 @@
----@type LazyPluginSpec
-local M = {
- "hrsh7th/nvim-cmp",
- event = { "InsertEnter", "CmdlineEnter" },
- dependencies = {
- "hrsh7th/cmp-buffer",
- "hrsh7th/cmp-path",
- "hrsh7th/cmp-nvim-lsp",
- "hrsh7th/cmp-cmdline",
- {
- "saadparwaiz1/cmp_luasnip",
- dependencies = {
- {
- "L3MON4D3/LuaSnip",
- version = "*",
- build = "make install_jsregexp",
- },
- },
- },
- },
-}
-
-function M:config()
- local cmp = require("cmp")
-
- local default = require("cmp.config.default")()
- local context = require("cmp.config.context")
-
- local in_comment = function()
- return vim.api.nvim_get_mode()["mode"] ~= "c"
- and context.in_treesitter_capture("comment")
- and context.in_syntax_group("Comment")
- end
-
- cmp.setup.global({
- enabled = function()
- return default.enabled() and not in_comment()
- end,
- snippet = {
- expand = function(args)
- require("luasnip").lsp_expand(args.body)
- end,
- },
- window = {
- completion = cmp.config.window.bordered({
- border = "single",
- scrolloff = 1,
- }),
- documentation = cmp.config.window.bordered({
- border = "single",
- }),
- },
- ---@diagnostic disable-next-line: missing-fields
- formatting = {
- format = function(_, vim_item)
- vim_item.menu = nil
- return vim_item
- end,
- },
- mapping = cmp.mapping.preset.insert({
- ["<Tab>"] = { i = cmp.mapping.select_next_item() },
- ["<S-Tab>"] = { i = cmp.mapping.select_prev_item() },
- ["<C-d>"] = { i = cmp.mapping.scroll_docs(4) },
- ["<C-u>"] = { i = cmp.mapping.scroll_docs(-4) },
- ["<C-Space>"] = { i = cmp.mapping.complete({}) },
- ["<CR>"] = { i = cmp.mapping.confirm() },
- }),
- sources = {
- { name = "nvim_lsp" },
- { name = "luasnip" },
- { name = "path" },
- },
- })
-
- cmp.setup.cmdline(":", {
- mapping = cmp.mapping.preset.cmdline(),
- sources = {
- { name = "cmdline" },
- },
- })
-
- cmp.setup.cmdline({ "/", "?", "@" }, {
- mapping = cmp.mapping.preset.cmdline(),
- sources = {
- { name = "buffer", keyword_length = 3 },
- },
- })
-end
-
-return M
diff --git a/nvim/.config/nvim/lua/plugins/epo.lua b/nvim/.config/nvim/lua/plugins/epo.lua
new file mode 100644
index 0000000..e43edc8
--- /dev/null
+++ b/nvim/.config/nvim/lua/plugins/epo.lua
@@ -0,0 +1,19 @@
+local M = {
+ "nvimdev/epo.nvim",
+ event = { "InsertEnter", "CmdlineEnter" },
+ opts = {
+ signature = true,
+ signature_border = "single",
+ kind_format = function(k)
+ return k
+ end,
+ },
+}
+
+function M:config(opts)
+ local completeopt = vim.opt.completeopt:get()
+ require("epo").setup(opts)
+ vim.opt.completeopt = completeopt
+end
+
+return M