diff --git a/programs/neovim/default.nix b/programs/neovim/default.nix index d5bbbda..542c32b 100644 --- a/programs/neovim/default.nix +++ b/programs/neovim/default.nix @@ -1,10 +1,19 @@ {pkgs, ...}: { - environment.systemPackages = with pkgs; [ - (lua5_1.withPackages (ps: with ps; [luarocks])) - ]; - hm.programs.neovim = { enable = true; extraLuaConfig = builtins.readFile ./init.lua; + + extraPackages = with pkgs; [ + (lua5_1.withPackages (ps: with ps; [luarocks])) + tree-sitter + ]; + + plugins = with pkgs.vimPlugins; [ + barbar-nvim + catppuccin-nvim + lualine-nvim + nvim-treesitter.withAllGrammars + nvim-web-devicons # for lualine + ]; }; } diff --git a/programs/neovim/init.lua b/programs/neovim/init.lua index 282c08d..bc1b2be 100644 --- a/programs/neovim/init.lua +++ b/programs/neovim/init.lua @@ -38,7 +38,7 @@ vim.opt.cursorline = true -- sync os clipboard and neovim vim.schedule(function() - vim.opt.clipboard = 'unnamedplus' + vim.opt.clipboard = 'unnamedplus' end) @@ -48,10 +48,10 @@ vim.keymap.set('n', '', 'nohlsearch') -- disable arrow keys in normal mode -vim.keymap.set('n', '', 'echo "Use h to move!!"') -vim.keymap.set('n', '', 'echo "Use l to move!!"') -vim.keymap.set('n', '', 'echo "Use k to move!!"') -vim.keymap.set('n', '', 'echo "Use j to move!!"') +-- vim.keymap.set('n', '', 'echo "Use h to move!!"') +-- vim.keymap.set('n', '', 'echo "Use l to move!!"') +-- vim.keymap.set('n', '', 'echo "Use k to move!!"') +-- vim.keymap.set('n', '', 'echo "Use j to move!!"') -- Keybinds to make split navigation easier. -- Use CTRL+ to switch between windows @@ -61,3 +61,23 @@ vim.keymap.set('n', '', '', { desc = 'Move focus to the left wind vim.keymap.set('n', '', '', { desc = 'Move focus to the right window' }) vim.keymap.set('n', '', '', { desc = 'Move focus to the lower window' }) vim.keymap.set('n', '', '', { desc = 'Move focus to the upper window' }) + + +-- [[ plugin configuration ]] +require("nvim-treesitter.configs").setup({ + highlight = { + enable = true, + use_languagetree = true, + }, + + indent = { enable = true }, +}) + +vim.cmd.colorscheme("catppuccin-macchiato") + +require("lualine").setup({ + options = { + theme = "catppuccin", + }, + extensions = { "trouble" }, +})