summary refs log tree commit diff
path: root/.vim/lua/internal/plugins/completion.lua
diff options
context:
space:
mode:
authorRobert Günzler <r@gnzler.io>2024-11-25 13:30:37 +0100
committerRobert Günzler <r@gnzler.io>2024-11-25 13:58:25 +0100
commit23de12baba9fbfc4ca24581b37c374aa5345cc25 (patch)
treee4b3c421bad572eb85a1089eaad44dc3059ab6e6 /.vim/lua/internal/plugins/completion.lua
parent18e3848110da0a59843058927ea04b496f5db2a5 (diff)
update nvim config
Signed-off-by: Robert Günzler <r@gnzler.io>
Diffstat (limited to '.vim/lua/internal/plugins/completion.lua')
-rw-r--r--.vim/lua/internal/plugins/completion.lua60
1 files changed, 60 insertions, 0 deletions
diff --git a/.vim/lua/internal/plugins/completion.lua b/.vim/lua/internal/plugins/completion.lua
new file mode 100644
index 0000000..db96085
--- /dev/null
+++ b/.vim/lua/internal/plugins/completion.lua
@@ -0,0 +1,60 @@
+return {
+  {
+    -- 'hrsh7th/nvim-cmp',
+    'iguanacucumber/magazine.nvim', -- perf improvements
+    name = 'nvim-cmp',
+
+    lazy = false,
+    -- event = {'InsertEnter', 'CmdlineEnter' },
+    priority = 100,
+    dependencies = {
+      'hrsh7th/cmp-buffer',
+      'hrsh7th/cmp-nvim-lsp',
+      'https://codeberg.org/FelipeLema/cmp-async-path',
+      -- 'hrsh7th/cmp-nvim-lua',
+      'hrsh7th/cmp-nvim-lsp-signature-help', -- used to provide function signature completion
+      'hrsh7th/cmp-cmdline',
+      'dmitmel/cmp-cmdline-history',
+      'hrsh7th/cmp-nvim-lsp-document-symbol', -- used by cmdline completion
+      -- 'f3fora/cmp-spell',
+
+      { 'L3MON4D3/LuaSnip', run = 'make install_jsregexp' },
+      'saadparwaiz1/cmp_luasnip',
+
+      'onsails/lspkind.nvim',
+    },
+    config = function()
+      require('internal.snippets')
+      require('internal.completion')
+    end,
+  },
+
+  -- { -- TODO: try when it doesnt require nightly rust, i dont want binary blobs
+  --
+  --   'saghen/blink.cmp',
+  --   lazy = false,
+  --   -- use a release tag to download pre-built binaries
+  --   -- version = 'v0.*',
+  --   -- OR build from source, requires nightly: https://rust-lang.github.io/rustup/concepts/channels.html#working-with-nightly-rust
+  --   build = 'cargo build --release',
+  --
+  --   opts = {
+  --     highlight = {
+  --       -- sets the fallback highlight groups to nvim-cmp's highlight groups
+  --       -- useful for when your theme doesn't support blink.cmp
+  --       -- will be removed in a future release, assuming themes add support
+  --       use_nvim_cmp_as_default = true,
+  --     },
+  --
+  --     -- set to 'mono' for 'Nerd Font Mono' or 'normal' for 'Nerd Font'
+  --     -- adjusts spacing to ensure icons are aligned
+  --     nerd_font_variant = 'normal',
+  --
+  --     -- experimental auto-brackets support
+  --     -- accept = { auto_brackets = { enabled = true } }
+  --
+  --     -- experimental signature help support
+  --     -- trigger = { signature_help = { enabled = true } }
+  --   },
+  -- },
+}