work on neovim configuration
This commit is contained in:
parent
5e89baa6c4
commit
87673019ab
3 changed files with 60 additions and 1 deletions
|
@ -84,7 +84,7 @@
|
||||||
./nixos/gaming.nix
|
./nixos/gaming.nix
|
||||||
./nixos/gui-pkgs.nix
|
./nixos/gui-pkgs.nix
|
||||||
./nixos/nvidia.nix
|
./nixos/nvidia.nix
|
||||||
./nixos/nvim.nix
|
./nixos/nvim/nvim.nix
|
||||||
./nixos/ollama.nix
|
./nixos/ollama.nix
|
||||||
./nixos/pkg.nix
|
./nixos/pkg.nix
|
||||||
./nixos/shell.nix
|
./nixos/shell.nix
|
||||||
|
|
54
nixos/nvim/nnn.nix
Normal file
54
nixos/nvim/nnn.nix
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [ tmux ];
|
||||||
|
environment.variables = {
|
||||||
|
NNN_FIFO = "$XDG_RUNTIME_DIR/nnn.fifo";
|
||||||
|
NNN_ICONLOOKUP = 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.nixvim = {
|
||||||
|
extraPlugins = [
|
||||||
|
(pkgs.vimUtils.buildVimPlugin {
|
||||||
|
# https://github.com/luukvbaal/nnn.nvim
|
||||||
|
name = "nnn.nvim";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "luukvbaal";
|
||||||
|
repo = "nnn.nvim";
|
||||||
|
rev = "662034c73718885ee599ad9fb193ab1ede70fbcb";
|
||||||
|
sha256 = "sha256-8+ax8n1fA4jgJugvWtRXkad4YM7TmAAsAopzalmGu/4=";
|
||||||
|
};
|
||||||
|
})
|
||||||
|
];
|
||||||
|
extraConfigLua = ''
|
||||||
|
local builtin = require("nnn").builtin
|
||||||
|
require("nnn").setup({
|
||||||
|
explorer = {
|
||||||
|
cmd = "nnn -G -Pp",
|
||||||
|
},
|
||||||
|
picker = {
|
||||||
|
cmd = "tmux new-session nnn -G -Pp",
|
||||||
|
style = { border = "rounded" },
|
||||||
|
session = "shared",
|
||||||
|
},
|
||||||
|
auto_open = {
|
||||||
|
setup = "explorer",
|
||||||
|
tabpage = "explorer",
|
||||||
|
ft_ignore = {
|
||||||
|
"gitcommit",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
replace_netrw = "picker",
|
||||||
|
offset = true,
|
||||||
|
mappings = {
|
||||||
|
{ "<C-t>", builtin.open_in_tab }, -- open file(s) in tab
|
||||||
|
{ "<C-s>", builtin.open_in_split }, -- open file(s) in split
|
||||||
|
{ "<C-v>", builtin.open_in_vsplit }, -- open file(s) in vertical split
|
||||||
|
{ "<C-p>", builtin.open_in_preview }, -- open file in preview split keeping nnn focused
|
||||||
|
{ "<C-y>", builtin.copy_to_clipboard }, -- copy file(s) to clipboard
|
||||||
|
{ "<C-w>", builtin.cd_to_path }, -- cd to file directory
|
||||||
|
{ "<C-e>", builtin.populate_cmdline }, -- populate cmdline (:) with file(s)
|
||||||
|
},
|
||||||
|
})
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,5 +1,9 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
|
imports = [
|
||||||
|
./nnn.nix
|
||||||
|
];
|
||||||
|
|
||||||
programs.nixvim = {
|
programs.nixvim = {
|
||||||
extraPackages = with pkgs; [ fd ];
|
extraPackages = with pkgs; [ fd ];
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -14,6 +18,7 @@
|
||||||
cmp.enable = true;
|
cmp.enable = true;
|
||||||
cmp-nvim-lsp.enable = true;
|
cmp-nvim-lsp.enable = true;
|
||||||
lsp.enable = true;
|
lsp.enable = true;
|
||||||
|
bufferline.enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue