diff --git a/home/lambda/config-files/nvim/cmp/snippet.lua b/home/lambda/config-files/nvim/cmp/snippet.lua new file mode 100644 index 0000000..b71f2d2 --- /dev/null +++ b/home/lambda/config-files/nvim/cmp/snippet.lua @@ -0,0 +1,6 @@ +local luasnip = require('luasnip') +snippet = { + expand = function(args) + luasnip.lsp_expand(args.body) + end, +}, diff --git a/home/lambda/config-files/nvim/keybinds.lua b/home/lambda/config-files/nvim/init.lua similarity index 99% rename from home/lambda/config-files/nvim/keybinds.lua rename to home/lambda/config-files/nvim/init.lua index b94d799..5b7d53e 100644 --- a/home/lambda/config-files/nvim/keybinds.lua +++ b/home/lambda/config-files/nvim/init.lua @@ -42,3 +42,4 @@ if vim.g.neovide then end end) end + diff --git a/home/lambda/default.nix b/home/lambda/default.nix index 03e214b..332d698 100644 --- a/home/lambda/default.nix +++ b/home/lambda/default.nix @@ -45,7 +45,7 @@ programs.nixvim = { enable = true; globals.mapleader = " "; - extraConfigLua = builtins.readFile ./config-files/nvim/keybinds.lua; + extraConfigLua = builtins.readFile ./config-files/nvim/init.lua; options = { number = true; # Show line numbers @@ -89,19 +89,20 @@ {name = "luasnip";} ]; + snippet.expand = "luasnip"; + mapping = { "" = "cmp.mapping.confirm({ select = true })"; "" = { action = '' function(fallback) + local luasnip = require 'luasnip' if cmp.visible() then cmp.select_next_item() elseif luasnip.expandable() then luasnip.expand() elseif luasnip.expand_or_jumpable() then luasnip.expand_or_jump() - elseif check_backspace() then - fallback() else fallback() end @@ -113,6 +114,7 @@ }; telescope.enable = true; cmp-nvim-lsp.enable = true; + cmp-nvim-lua.enable = true; noice.enable = true; notify.enable = true; luasnip.enable = true; @@ -193,6 +195,7 @@ signal-desktop vesktop telegram-desktop + webex #schildichat-desktop neovide