diff --git a/home/lambda/config-files/nvim/keybinds.lua b/home/lambda/config-files/nvim/keybinds.lua index 2d81ce8..b94d799 100644 --- a/home/lambda/config-files/nvim/keybinds.lua +++ b/home/lambda/config-files/nvim/keybinds.lua @@ -10,3 +10,35 @@ vim.keymap.set('t', '', '') -- move selection linewise vim.keymap.set('v', 'J', ":m '>+1gv=gv") vim.keymap.set('v', 'K', ":m '<-2gv=gv") + +-- Neovide +if vim.g.neovide then + vim.g.neovide_cursor_vfx_mode = "ripple" + + vim.g.neovide_cursor_vfx_particle_density = 30.0 + vim.g.neovide_transparency = 1.0 + + local font_name = "Hack Nerd Font Mono:h" + local font_size = 20 + vim.o.guifont = font_name .. tostring(font_size) + vim.g.neovide_profiler = false + vim.g.neovide_hide_mouse_when_typing = true + -- Fullscreen keymapping + vim.keymap.set("n", "FF", function() + if vim.g.neovide_fullscreen then + vim.g.neovide_fullscreen = false + else + vim.g.neovide_fullscreen = true + end + end) + vim.keymap.set("n", "", function() + font_size = font_size + 1 + vim.o.guifont = font_name .. tostring(font_size) + end) + vim.keymap.set("n", "", function() + if font_size >= 1 then + font_size = font_size - 1 + vim.o.guifont = font_name .. tostring(font_size) + end + end) +end diff --git a/home/lambda/default.nix b/home/lambda/default.nix index 9425a82..03e214b 100644 --- a/home/lambda/default.nix +++ b/home/lambda/default.nix @@ -71,13 +71,55 @@ gitsigns.enable = true; fugitive.enable = true; treesitter.enable = true; - nvim-cmp.enable = true; + #nvim-cmp = { + # enable = true; + # sources = [ + # {name = "nvim_lsp";} + # {name = "path";} + # {name = "buffer";} + # ]; + #}; + nvim-cmp = { + enable = true; + autoEnableSources = true; + sources = [ + {name = "nvim_lsp";} + {name = "path";} + {name = "buffer";} + {name = "luasnip";} + ]; + + mapping = { + "" = "cmp.mapping.confirm({ select = true })"; + "" = { + action = '' + function(fallback) + 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 + end + ''; + modes = [ "i" "s" ]; + }; + }; + }; telescope.enable = true; cmp-nvim-lsp.enable = true; noice.enable = true; + notify.enable = true; + luasnip.enable = true; neo-tree.enable = true; presence-nvim.enable = true; crates-nvim.enable = true; + fidget.enable = true; alpha = { enable = true; };