neovim plugins

This commit is contained in:
root 2024-02-19 23:18:13 +01:00
parent eff7b60f4b
commit 3035a76f43
5 changed files with 49 additions and 8 deletions

View file

@ -7,6 +7,7 @@
[
./hardware-configuration.nix
./home_manager.nix
(import <home-manager/nixos>)
];
boot.tmp.useTmpfs = true;
@ -106,14 +107,18 @@
enableSSHSupport = true;
};
programs.neovim = {
enable = true;
vimAlias = true;
viAlias = true;
defaultEditor = true;
configure = {
customRC = builtins.readFile ./nvim/cfg.vim;
};
# programs.neovim = {
# enable = true;
# vimAlias = true;
# viAlias = true;
# defaultEditor = true;
# configure = {
# customRC = builtins.readFile ./nvim/cfg.vim;
# };
# };
home-manager.users.root = {
home.stateVersion = "23.11";
imports = [ ./neovim ];
};
services.syncthing = {

View file

@ -6,6 +6,8 @@
home-manager.users.catvayor = {
home.stateVersion = "23.11";
imports = [ ./neovim ];
xdg.configFile."sway/config".onChange = lib.mkForce "";
home.sessionVariables = {

28
neovim/default.nix Normal file
View file

@ -0,0 +1,28 @@
{ pkgs, config, lib, ... }:
{
programs.neovim = {
enable = true;
defaultEditor = true;
plugins = with pkgs.vimPlugins; [
(nvim-treesitter.withPlugins (_: pkgs.tree-sitter.allGrammars))
nvim-treesitter.withAllGrammars
vim-nix
telescope-nvim
todo-comments-nvim
fugitive
gitsigns-nvim
];
extraPackages = with pkgs; [
git
ripgrep
fd
gcc
];
extraConfig = builtins.readFile ./nvimrc;
extraLuaConfig = builtins.readFile ./nvim.lua;
vimAlias = true;
viAlias = true;
};
}

2
neovim/nvim.lua Normal file
View file

@ -0,0 +1,2 @@
local telescope = require('telescope')
telescope.setup {}

View file

@ -81,6 +81,10 @@ set expandtab
syntax enable
nnoremap ff <cmd>Telescope find_files<cr>
nnoremap fg <cmd>Telescope live_grep<cr>
nnoremap fb <cmd>Telescope buffers<cr>
" let g:coqtail_nomap = 1
"
" function Coqfun(count, cmd)