further nixvim config

This commit is contained in:
xqtc161 2024-01-29 13:36:54 +01:00
parent e7c426cd85
commit 4524e2894b
3 changed files with 13 additions and 3 deletions

View file

@ -0,0 +1,6 @@
local luasnip = require('luasnip')
snippet = {
expand = function(args)
luasnip.lsp_expand(args.body)
end,
},

View file

@ -42,3 +42,4 @@ if vim.g.neovide then
end
end)
end

View file

@ -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 = {
"<CR>" = "cmp.mapping.confirm({ select = true })";
"<Tab>" = {
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