fix syntax error

This commit is contained in:
Charlotte 🦝 Delenk 2022-08-10 09:20:23 +01:00
parent fd3006ddcb
commit a2520d6e8c
Signed by: darkkirb
GPG key ID: AB2BD8DAF2E37122
20 changed files with 128 additions and 141 deletions

View file

@ -1,19 +1,19 @@
{ pkgs, lib, ... }:
{
pkgs,
lib,
...
}:
with lib;
with builtins;
let
getNixFiles = dir:
let
recu = n: k:
if k == "directory" then
getNixFiles "${dir}/${n}"
else if hasSuffix "nix" n then
[ "${dir}/${n}" ]
else
[ ];
in flatten (mapAttrsToList recu (readDir dir));
with builtins; let
getNixFiles = dir: let
recu = n: k:
if k == "directory"
then getNixFiles "${dir}/${n}"
else if hasSuffix "nix" n
then ["${dir}/${n}"]
else [];
in
flatten (mapAttrsToList recu (readDir dir));
in {
imports = getNixFiles ./modules;
@ -27,7 +27,7 @@ in {
output.path.style = "impure";
output.makeWrapper = "--set LUA_PATH '${./modules/lua}/?.lua;;'";
output.path.path = with pkgs; [ wl-clipboard ];
output.path.path = with pkgs; [wl-clipboard];
output.extraConfig = ''
" Keybindings
@ -36,6 +36,6 @@ in {
" TODO: Set clipboard tool with g:clipboard
'';
}
# TODO:
# https://idie.ru/posts/vim-modern-cpp

View file

@ -24,28 +24,28 @@
# Wildmode
wildmenu = true;
wildignorecase = true;
wildignore = [ "*.o" "*~" "*.out" ];
wildmode = [ "longest" "list" "full" ];
wildignore = ["*.o" "*~" "*.out"];
wildmode = ["longest" "list" "full"];
};
# Clipboard command
clipboard = {
name = "kitty";
copy = {
"+" = "${pkgs.kitty}/bin/kitty +kitten clipboard";
"*" = "${pkgs.kitty}/bin/kitty +kitten clipboard --use-primary";
};
paste = {
"+" = "${pkgs.kitty}/bin/kitty +kitten clipboard --get-clipboard";
"*" = "${pkgs.kitty}/bin/kitty +kitten clipboard --get-clipboard --use-primary";
};
# Clipboard command
vim.g.clipboard = {
name = "kitty";
copy = {
"+" = "${pkgs.kitty}/bin/kitty +kitten clipboard";
"*" = "${pkgs.kitty}/bin/kitty +kitten clipboard --use-primary";
};
paste = {
"+" = "${pkgs.kitty}/bin/kitty +kitten clipboard --get-clipboard";
"*" = "${pkgs.kitty}/bin/kitty +kitten clipboard --get-clipboard --use-primary";
};
};
vim.keybindings.keybindings-shortened = {
j = { command = "gj"; };
k = { command = "gk"; };
"0" = { command = "g0"; };
"$" = { command = "g$"; };
j = {command = "gj";};
k = {command = "gk";};
"0" = {command = "g0";};
"$" = {command = "g$";};
"Y" = {
command = "yy";
mode = "n";

View file

@ -1,11 +1,14 @@
{ pkgs, lib, config, ... }:
{
pkgs,
lib,
config,
...
}: {
vim.keybindings.keybindings-shortened."<leader>gg" = {
command = ":LazyGit<CR>";
label = "lazygit";
};
output.plugins = with pkgs.vimPlugins; [ lazygit-nvim ];
output.path.path = with pkgs; [ lazygit git ];
output.plugins = with pkgs.vimPlugins; [lazygit-nvim];
output.path.path = with pkgs; [lazygit git];
}

View file

@ -1,11 +1,9 @@
{ pkgs, ... }:
{pkgs, ...}: {
vim.g = {
NERDCreateDefaultMappings = 0;
NERDSpaceDelims = 1;
NERDTrimTrailingWhitespace = 1;
};
{
vim.g = {
NERDCreateDefaultMappings = 0;
NERDSpaceDelims = 1;
NERDTrimTrailingWhitespace = 1;
};
output.plugins = with pkgs.vimPlugins; [ nerdcommenter ];
}
output.plugins = with pkgs.vimPlugins; [nerdcommenter];
}

View file

@ -1,6 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
# TODO: Don't let the runner inherit nix-neovim's PATH
vim.g = {
@ -12,14 +10,29 @@
vim.keybindings.keybindings."<leader>" = {
# It's possible to also use vim-tmux-navigator's :TmuxNavigatePrevious
# Not too keen on it yet though
rr = { command = "<cmd>VimuxRunLastCommand<cr>"; label = "Rerun Command"; };
rp = { command = "<cmd>VimuxPromptCommand<cr>"; label = "Prompt Command"; };
rr = {
command = "<cmd>VimuxRunLastCommand<cr>";
label = "Rerun Command";
};
rp = {
command = "<cmd>VimuxPromptCommand<cr>";
label = "Prompt Command";
};
ro = { command = "<cmd>VimuxOpenRunner<cr>"; label = "Open Runner"; };
rq = { command = "<cmd>VimuxCloseRunner<cr>"; label = "Close Runner"; };
ro = {
command = "<cmd>VimuxOpenRunner<cr>";
label = "Open Runner";
};
rq = {
command = "<cmd>VimuxCloseRunner<cr>";
label = "Close Runner";
};
ry = { command = "<cmd>VimuxInspectRunner<cr>"; label = "Copy Mode"; };
ry = {
command = "<cmd>VimuxInspectRunner<cr>";
label = "Copy Mode";
};
};
output.plugins = with pkgs.vimPlugins; [ vimux ];
output.plugins = with pkgs.vimPlugins; [vimux];
}

View file

@ -5,7 +5,6 @@
# Documented keybindings accessible via SPC
keybindings."<leader>" = {
### LaTeX commands
l = {
# name = "LaTeX";
@ -32,7 +31,6 @@
};
};
### Git commands
v = {
# name = "git";
@ -80,11 +78,10 @@
# Quick and dirty general keybindings
keybindings-shortened = {
k = { command = "gk"; };
j = { command = "gj"; };
"0" = { command = "g0"; };
"$" = { command = "g$"; };
k = {command = "gk";};
j = {command = "gj";};
"0" = {command = "g0";};
"$" = {command = "g$";};
};
};
}

View file

@ -1,5 +1,3 @@
{ pkgs, ... }:
{
output.plugins = with pkgs.vimPlugins; [ vim-nix ];
{pkgs, ...}: {
output.plugins = with pkgs.vimPlugins; [vim-nix];
}

View file

@ -1,11 +1,9 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
vim.g = {
copilot_filetypes = {
"*" = true;
};
copilot_node_command = "${pkgs.nodejs-16_x}/bin/node";
};
output.plugins = with pkgs.vimPlugins; [ copilot-vim ];
output.plugins = with pkgs.vimPlugins; [copilot-vim];
}

View file

@ -4,11 +4,9 @@
...
}:
with builtins;
with lib;
let
jdtls-lua = replaceStrings ["@jdt-language-server@" "@openjdk@"] ["${pkgs.jdt-language-server}" "${pkgs.openjdk}" ] (readFile ../lua/jdtls.lua);
in
{
with lib; let
jdtls-lua = replaceStrings ["@jdt-language-server@" "@openjdk@"] ["${pkgs.jdt-language-server}" "${pkgs.openjdk}"] (readFile ../lua/jdtls.lua);
in {
output.config_file = ''
lua << EOF
${jdtls-lua}

View file

@ -1,6 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
output.plugins = with pkgs.vimPlugins; [
nvim-cmp
@ -18,12 +16,12 @@
# See :help cmp-mapping
sources = [
{ name = "path"; }
{ name = "calc"; }
{ name = "nvim_lsp"; }
{ name = "nvim_lua"; }
{ name = "latex_symbols"; }
{ name = "buffer"; }
{name = "path";}
{name = "calc";}
{name = "nvim_lsp";}
{name = "nvim_lua";}
{name = "latex_symbols";}
{name = "buffer";}
];
};
}

View file

@ -1,8 +1,10 @@
{ pkgs, lib, config, ... }:
with lib;
let
{
pkgs,
lib,
config,
...
}:
with lib; let
cfg = config.treesitter;
grammars = pkgs.tree-sitter.builtGrammars;
in {
@ -13,7 +15,6 @@ in {
highlight.enable = true;
};
output.plugins = with pkgs.vimPlugins;
[ (nvim-treesitter.withPlugins (_: pkgs.tree-sitter.allGrammars)) ];
output.plugins = with pkgs.vimPlugins; [(nvim-treesitter.withPlugins (_: pkgs.tree-sitter.allGrammars))];
};
}

View file

@ -1,6 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
output.extraConfig = ''
lua <<EOF
@ -18,6 +16,6 @@
EOF
'';
output.path.path = with pkgs; [ fd ripgrep ];
output.plugins = with pkgs.vimPlugins; [ telescope-nvim ];
output.path.path = with pkgs; [fd ripgrep];
output.plugins = with pkgs.vimPlugins; [telescope-nvim];
}

View file

@ -1,11 +1,9 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
vim.keybindings.which-key-nvim = true;
plugin.setup.which-key = {
# Only start which-key.nvim for these keys
# I was getting sick and tired of it opening on random operators...
triggers = [ "<leader>" "g" "z" "<C-w>" "\"" ];
triggers = ["<leader>" "g" "z" "<C-w>" "\""];
};
}

View file

@ -1,5 +1,3 @@
{ pkgs, ... }:
{
output.plugins = with pkgs.vimPlugins; [ vim-repeat ];
{pkgs, ...}: {
output.plugins = with pkgs.vimPlugins; [vim-repeat];
}

View file

@ -1,5 +1,3 @@
{ pkgs, ... }:
{
output.plugins = with pkgs.vimPlugins; [ vim-surround ];
{pkgs, ...}: {
output.plugins = with pkgs.vimPlugins; [vim-surround];
}

View file

@ -1,11 +1,10 @@
{ pkgs, ... }:
let scheme = "gruvbox";
{pkgs, ...}: let
scheme = "gruvbox";
in {
output.config_file = "colo ${scheme}";
vim.g.lightline.colorscheme = scheme;
vim.g.tokyonight_style = "storm";
output.plugins = with pkgs.vimPlugins; [ gruvbox tokyonight-nvim ];
output.plugins = with pkgs.vimPlugins; [gruvbox tokyonight-nvim];
}

View file

@ -1,6 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
vim.g = {
dashboard_custom_footer = [
"It's pretty hard to tell what does bring happiness; poverty and wealth"
@ -29,27 +27,27 @@
dashboard_default_executive = "telescope";
dashboard_custom_section = {
"1_oldfiles" = {
description = [ " Open History -" ];
description = [" Open History -"];
command = "Telescope oldfiles";
};
"2_find_files" = {
description = [ " Find File SPC f o" ];
description = [" Find File SPC f o"];
command = "Telescope find_files";
};
"3_new_file" = {
description = [ " New File -" ];
description = [" New File -"];
command = "enew";
};
"4_lazygit" = {
description = [ " lazygit SPC g g" ];
description = [" lazygit SPC g g"];
command = "LazyGit";
};
"5_live_grep" = {
description = [ " Live Grep SPC f /" ];
description = [" Live Grep SPC f /"];
command = "Telescope live_grep";
};
};
};
output.plugins = with pkgs.vimPlugins; [ dashboard-nvim ];
output.plugins = with pkgs.vimPlugins; [dashboard-nvim];
}

View file

@ -1,11 +1,9 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
plugin.setup.gitsigns = {
# Disable default keybindings
keymaps = {};
};
output.plugins = with pkgs.vimPlugins; [ gitsigns-nvim ];
output.path.path = with pkgs; [ git ];
output.plugins = with pkgs.vimPlugins; [gitsigns-nvim];
output.path.path = with pkgs; [git];
}

View file

@ -1,15 +1,13 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
vim.opt.showmode = false;
vim.g.lightline = {
active = {
left = [ [ "mode" "paste" ] [ "readonly" "filename" "modified" ] ];
left = [["mode" "paste"] ["readonly" "filename" "modified"]];
right = [
[ "lineinfo" ]
[ "percent" ]
[ "fileformat" "fileencoding" "filetype" ]
["lineinfo"]
["percent"]
["fileformat" "fileencoding" "filetype"]
];
};
separator = {
@ -22,5 +20,5 @@
};
};
output.plugins = with pkgs.vimPlugins; [ lightline-vim ];
output.plugins = with pkgs.vimPlugins; [lightline-vim];
}

View file

@ -1,11 +1,9 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
vim.keybindings.keybindings-shortened = {
"<leader>gt" = { command = "<cmd>TodoTelescope<cr>"; };
"<leader>gt" = {command = "<cmd>TodoTelescope<cr>";};
};
plugin.setup.todo-comments = {};
output.plugins = with pkgs.vimPlugins; [ todo-comments-nvim ];
output.plugins = with pkgs.vimPlugins; [todo-comments-nvim];
}