feat(neovim): add some plugins!

This commit is contained in:
uku 2024-11-26 15:28:09 +01:00
parent c99cc49b97
commit 22d3010e99
Signed by: uku
SSH key fingerprint: SHA256:4P0aN6M8ajKukNi6aPOaX0LacanGYtlfjmN+m/sHY/o
2 changed files with 38 additions and 9 deletions

View file

@ -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
];
};
}

View file

@ -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', '<Esc>', '<cmd>nohlsearch<CR>')
-- disable arrow keys in normal mode
vim.keymap.set('n', '<left>', '<cmd>echo "Use h to move!!"<CR>')
vim.keymap.set('n', '<right>', '<cmd>echo "Use l to move!!"<CR>')
vim.keymap.set('n', '<up>', '<cmd>echo "Use k to move!!"<CR>')
vim.keymap.set('n', '<down>', '<cmd>echo "Use j to move!!"<CR>')
-- vim.keymap.set('n', '<left>', '<cmd>echo "Use h to move!!"<CR>')
-- vim.keymap.set('n', '<right>', '<cmd>echo "Use l to move!!"<CR>')
-- vim.keymap.set('n', '<up>', '<cmd>echo "Use k to move!!"<CR>')
-- vim.keymap.set('n', '<down>', '<cmd>echo "Use j to move!!"<CR>')
-- Keybinds to make split navigation easier.
-- Use CTRL+<hjkl> to switch between windows
@ -61,3 +61,23 @@ vim.keymap.set('n', '<C-h>', '<C-w><C-h>', { desc = 'Move focus to the left wind
vim.keymap.set('n', '<C-l>', '<C-w><C-l>', { desc = 'Move focus to the right window' })
vim.keymap.set('n', '<C-j>', '<C-w><C-j>', { desc = 'Move focus to the lower window' })
vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { 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" },
})