diff options
| author | Alec Goncharow <algo@cloudflare.com> | 2023-02-24 23:20:34 -0600 |
|---|---|---|
| committer | Alec Goncharow <algo@cloudflare.com> | 2023-02-24 23:20:34 -0600 |
| commit | 0c446121ba1f1653a0d984068209429e8cc453fb (patch) | |
| tree | bc04e8bb2a985e5cb4f7b15c1e4d8962b2c4b000 /.config/nvim/lua/autocomplete.lua | |
| parent | d3aeb8f7d8d9b4352e7b827a361d1da11cb6cf04 (diff) | |
out of the frying pan
into the fire
Diffstat (limited to '.config/nvim/lua/autocomplete.lua')
| -rw-r--r-- | .config/nvim/lua/autocomplete.lua | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/.config/nvim/lua/autocomplete.lua b/.config/nvim/lua/autocomplete.lua new file mode 100644 index 0000000..5213258 --- /dev/null +++ b/.config/nvim/lua/autocomplete.lua @@ -0,0 +1,22 @@ +local cmp = require("cmp") + +cmp.setup({ + mapping = cmp.mapping.preset.insert({ -- Preset: ^n, ^p, ^y, ^e, you know the drill.. + ["<C-d>"] = cmp.mapping.scroll_docs(-4), + ["<C-f>"] = cmp.mapping.scroll_docs(4), + }), + snippet = { + expand = function(args) + require("luasnip").lsp_expand(args.body) + end, + }, + sources = cmp.config.sources({ + { name = "nvim_lsp" }, + { name = "nvim_lsp_signature_help" }, + { name = "nvim_lua" }, + { name = "luasnip" }, + { name = "path" }, + }, { + { name = "buffer", keyword_length = 3 }, + }), +}) |
