diff options
| author | seth <[email protected]> | 2024-10-29 22:37:49 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-10-30 02:37:49 +0000 |
| commit | 310fdf8de53d98ddd3a56936c131186e25814f0f (patch) | |
| tree | f4265ab11de2262bacb2498cdc4661420a2df278 /plugin/cmp.lua | |
| parent | 7ed0a2b87684eb32009944bd9eb8d7eaa9af0462 (diff) | |
use lz.n (#69)
* remove bufferline & some cmp sources
* factor things out of after/ folder
This is bad practice or something
* make sure ftdetect plugins aren't loaded multiple times
* use lz.n
* mini.pairs -> mini.surround
* flake: cleanup checks
* ftplugin: enforce spaces in nix files
Diffstat (limited to 'plugin/cmp.lua')
| -rw-r--r-- | plugin/cmp.lua | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/plugin/cmp.lua b/plugin/cmp.lua deleted file mode 100644 index 10c750f..0000000 --- a/plugin/cmp.lua +++ /dev/null @@ -1,47 +0,0 @@ -if vim.g.did_load_cmp_plugin then - return -end -vim.g.did_load_cmp_plugin = true - -local cmp = require("cmp") - -cmp.setup({ - completion = { - compleopt = "menu,menuone,insert", - }, - - snippet = { - expand = function(args) - require("luasnip").lsp_expand(args.body) - end, - }, - - mapping = { - ["<C-n>"] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }), - ["<C-p>"] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }), - ["<C-b>"] = cmp.mapping.scroll_docs(-4), - ["<C-f>"] = cmp.mapping.scroll_docs(4), - ["<C-Space>"] = cmp.mapping.complete(), - ["<C-e>"] = cmp.mapping.abort(), - ["<CR>"] = cmp.mapping({ - i = function(fallback) - if cmp.visible() and cmp.get_active_entry() then - cmp.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = false }) - else - fallback() - end - end, - - s = cmp.mapping.confirm({ select = true }), - c = cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true }), - }), - }, - - sources = cmp.config.sources({ - { name = "nvim_lsp" }, - { name = "luasnip" }, - { name = "async_path" }, - { name = "buffer" }, - { name = "rg" }, - }), -}) |
