mirror of
https://git.gay/xqtc/nixos-config
synced 2024-11-22 02:00:32 +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
|
||||
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue