mirror of
https://git.gay/xqtc/nixos-config
synced 2024-11-25 20:03:54 +01:00
further nixvim config
This commit is contained in:
parent
e7c426cd85
commit
4524e2894b
6
home/lambda/config-files/nvim/cmp/snippet.lua
Normal file
6
home/lambda/config-files/nvim/cmp/snippet.lua
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
local luasnip = require('luasnip')
|
||||||
|
snippet = {
|
||||||
|
expand = function(args)
|
||||||
|
luasnip.lsp_expand(args.body)
|
||||||
|
end,
|
||||||
|
},
|
|
@ -42,3 +42,4 @@ if vim.g.neovide then
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
programs.nixvim = {
|
programs.nixvim = {
|
||||||
enable = true;
|
enable = true;
|
||||||
globals.mapleader = " ";
|
globals.mapleader = " ";
|
||||||
extraConfigLua = builtins.readFile ./config-files/nvim/keybinds.lua;
|
extraConfigLua = builtins.readFile ./config-files/nvim/init.lua;
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
number = true; # Show line numbers
|
number = true; # Show line numbers
|
||||||
|
@ -89,19 +89,20 @@
|
||||||
{name = "luasnip";}
|
{name = "luasnip";}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
snippet.expand = "luasnip";
|
||||||
|
|
||||||
mapping = {
|
mapping = {
|
||||||
"<CR>" = "cmp.mapping.confirm({ select = true })";
|
"<CR>" = "cmp.mapping.confirm({ select = true })";
|
||||||
"<Tab>" = {
|
"<Tab>" = {
|
||||||
action = ''
|
action = ''
|
||||||
function(fallback)
|
function(fallback)
|
||||||
|
local luasnip = require 'luasnip'
|
||||||
if cmp.visible() then
|
if cmp.visible() then
|
||||||
cmp.select_next_item()
|
cmp.select_next_item()
|
||||||
elseif luasnip.expandable() then
|
elseif luasnip.expandable() then
|
||||||
luasnip.expand()
|
luasnip.expand()
|
||||||
elseif luasnip.expand_or_jumpable() then
|
elseif luasnip.expand_or_jumpable() then
|
||||||
luasnip.expand_or_jump()
|
luasnip.expand_or_jump()
|
||||||
elseif check_backspace() then
|
|
||||||
fallback()
|
|
||||||
else
|
else
|
||||||
fallback()
|
fallback()
|
||||||
end
|
end
|
||||||
|
@ -113,6 +114,7 @@
|
||||||
};
|
};
|
||||||
telescope.enable = true;
|
telescope.enable = true;
|
||||||
cmp-nvim-lsp.enable = true;
|
cmp-nvim-lsp.enable = true;
|
||||||
|
cmp-nvim-lua.enable = true;
|
||||||
noice.enable = true;
|
noice.enable = true;
|
||||||
notify.enable = true;
|
notify.enable = true;
|
||||||
luasnip.enable = true;
|
luasnip.enable = true;
|
||||||
|
@ -193,6 +195,7 @@
|
||||||
signal-desktop
|
signal-desktop
|
||||||
vesktop
|
vesktop
|
||||||
telegram-desktop
|
telegram-desktop
|
||||||
|
webex
|
||||||
#schildichat-desktop
|
#schildichat-desktop
|
||||||
|
|
||||||
neovide
|
neovide
|
||||||
|
|
Loading…
Reference in a new issue