working nvf with LazyGit!
This commit is contained in:
parent
fea17cb5c1
commit
2ef8643abf
7 changed files with 82 additions and 111 deletions
|
@ -12,7 +12,7 @@
|
|||
|
||||
mkNeovimModule = {
|
||||
path,
|
||||
ignoredPaths ? [./nvf.nix ./plugins/sources/default.nix ./plugins],
|
||||
ignoredPaths ? [],
|
||||
}:
|
||||
filter (hasSuffix ".nix") (
|
||||
map toString (
|
||||
|
@ -28,28 +28,6 @@ in {
|
|||
imports = concatLists [
|
||||
# neovim-flake home-manager module
|
||||
[nvf.nixosModules.default]
|
||||
# [./plugins/settings/ui.nix]
|
||||
# [./plugins/settings/filetree.nix]
|
||||
# [
|
||||
# ./plugins/settings/autocomplete.nix
|
||||
# ./plugins/settings/visuals.nix
|
||||
# ./plugins/settings/autopairs.nix
|
||||
# ./plugins/settings/binds.nix
|
||||
# ./plugins/settings/comments.nix
|
||||
# ./plugins/settings/dashboard.nix
|
||||
# ./plugins/settings/debugger.nix
|
||||
# ./plugins/settings/languages.nix
|
||||
# ./plugins/settings/lsp.nix
|
||||
# ./plugins/settings/telescope.nix
|
||||
# ./plugins/settings/notes.nix
|
||||
# ./plugins/settings/notify.nix
|
||||
# ./plugins/settings/projects.nix
|
||||
# ./plugins/settings/statusline.nix
|
||||
# ./plugins/settings/tabline.nix
|
||||
# ./plugins/settings/theme.nix
|
||||
# ./plugins/settings/treesitter.nix
|
||||
# ./plugins/settings/utility.nix
|
||||
# ./plugins/settings/git.nix
|
||||
# construct this entore directory as a module
|
||||
# which means all default.nix files will be imported automtically
|
||||
(mkNeovimModule {path = ./.;})
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
{
|
||||
programs.neovim-flake.settings.vim.maps = {
|
||||
normal = {
|
||||
"<leader>gg".action = "<cmd>LazyGit<CR>";
|
||||
/*
|
||||
# General
|
||||
"<leader>fd".action = ":lua vim.g.formatsave = not vim.g.formatsave<CR>";
|
||||
"<leader>zt".action = ":<C-U>let g:default_terminal = v:count1<CR>";
|
||||
#"<leader>e".action = ":NvimTreeToggle<CR>";
|
||||
# "<leader>ld".action = ":lua vim.diagnostic.setqflist({open = true})<CR>";
|
||||
# "<leader>lf".action = ":lua vim.lsp.buf.format()<CR>";
|
||||
# "<leader>li".action = ":lua vim.lsp.buf.implementation()<CR>";
|
||||
|
@ -28,17 +28,17 @@
|
|||
"<leader>gb".action = "<cmd>Gitsigns blame_line<CR>";
|
||||
"<leader>gD".action = "<cmd>Gitsigns diffthis HEAD<CR>";
|
||||
"<leader>gw".action = "<cmd>Gitsigns toggle_word_diff<CR>";
|
||||
|
||||
*/
|
||||
# Movement
|
||||
"<C-h>".action = "<C-W>h";
|
||||
"<C-j>".action = "<C-W>j";
|
||||
"<C-k>".action = "<C-W>k";
|
||||
"<C-l>".action = "<C-W>l";
|
||||
# Telescope
|
||||
"<M-f>".action = ":Telescope resume<CR>";
|
||||
"<M-f>".action = "<cmd>Telescope resume<CR>";
|
||||
"<leader>fq".action = ":Telescope quickfix<CR>";
|
||||
"<leader>f/".action = ":Telescope live_grep<cr>";
|
||||
|
||||
/*
|
||||
# Aerial
|
||||
"<S-O>".action = ":AerialToggle<CR>";
|
||||
|
||||
|
|
|
@ -82,66 +82,66 @@
|
|||
in {
|
||||
programs.neovim-flake.settings.vim.extraPlugins = {
|
||||
# plugins that are pulled from nixpkgs
|
||||
# direnv = {package = direnv-vim;};
|
||||
friendly-snippets = {package = friendly-snippets;};
|
||||
mkdir-nvim = {package = mkdir-nvim;};
|
||||
lazygit-nvim = {package = lazygit-nvim;};
|
||||
aerial = {
|
||||
package = aerial-nvim;
|
||||
setup = "require('aerial').setup {}";
|
||||
};
|
||||
|
||||
nvim-surround = {
|
||||
package = nvim-surround;
|
||||
setup = "require('nvim-surround').setup {}";
|
||||
};
|
||||
/*
|
||||
direnv = {package = direnv-vim;};
|
||||
friendly-snippets = {package = friendly-snippets;};
|
||||
mkdir-nvim = {package = mkdir-nvim;};
|
||||
lazygit-nvim = {package = lazygit-nvim;};
|
||||
aerial = {
|
||||
package = aerial-nvim;
|
||||
setup = "require('aerial').setup {}";
|
||||
};
|
||||
undotree = {
|
||||
package = undotree;
|
||||
setup = ''
|
||||
vim.g.undotree_ShortIndicators = true
|
||||
vim.g.undotree_TreeVertShape = '│'
|
||||
'';
|
||||
};
|
||||
*/
|
||||
ssr-nvim = {
|
||||
package = ssr-nvim;
|
||||
setup = "require('ssr').setup {}";
|
||||
};
|
||||
|
||||
nvim-surround = {
|
||||
package = nvim-surround;
|
||||
setup = "require('nvim-surround').setup {}";
|
||||
};
|
||||
legendary = {
|
||||
package = legendary-nvim;
|
||||
setup = ''
|
||||
require('legendary').setup {};
|
||||
'';
|
||||
};
|
||||
|
||||
undotree = {
|
||||
package = undotree;
|
||||
setup = ''
|
||||
vim.g.undotree_ShortIndicators = true
|
||||
vim.g.undotree_TreeVertShape = '│'
|
||||
'';
|
||||
};
|
||||
|
||||
ssr-nvim = {
|
||||
package = ssr-nvim;
|
||||
setup = "require('ssr').setup {}";
|
||||
};
|
||||
|
||||
legendary = {
|
||||
package = legendary-nvim;
|
||||
setup = ''
|
||||
require('legendary').setup {};
|
||||
'';
|
||||
};
|
||||
|
||||
# plugins that are built from their sources
|
||||
regexplainer = {package = pluginSources.regexplainer;};
|
||||
vim-nftables = {package = pluginSources.vim-nftables;};
|
||||
# plugins that are built from their sources
|
||||
# regexplainer = {package = pluginSources.regexplainer;};
|
||||
# vim-nftables = {package = pluginSources.vim-nftables;};
|
||||
/*
|
||||
data-view = {
|
||||
package = pluginSources.data-viewer-nvim;
|
||||
setup = ''
|
||||
-- open data files in data-viewer.nvim
|
||||
vim.api.nvim_exec([[
|
||||
autocmd BufReadPost,BufNewFile *.sqlite,*.csv,*.tsv DataViewer
|
||||
]], false)
|
||||
data-view = {
|
||||
package = pluginSources.data-viewer-nvim;
|
||||
setup = ''
|
||||
-- open data files in data-viewer.nvim
|
||||
vim.api.nvim_exec([[
|
||||
autocmd BufReadPost,BufNewFile *.sqlite,*.csv,*.tsv DataViewer
|
||||
]], false)
|
||||
|
||||
|
||||
-- keybinds
|
||||
vim.api.nvim_set_keymap('n', '<leader>dv', ':DataViewer<CR>', {noremap = true})
|
||||
vim.api.nvim_set_keymap('n', '<leader>dvn', ':DataViewerNextTable<CR>', {noremap = true})
|
||||
vim.api.nvim_set_keymap('n', '<leader>dvp', ':DataViewerPrevTable<CR>', {noremap = true})
|
||||
vim.api.nvim_set_keymap('n', '<leader>dvc', ':DataViewerClose<CR>', {noremap = true})
|
||||
'';
|
||||
};
|
||||
-- keybinds
|
||||
vim.api.nvim_set_keymap('n', '<leader>dv', ':DataViewer<CR>', {noremap = true})
|
||||
vim.api.nvim_set_keymap('n', '<leader>dvn', ':DataViewerNextTable<CR>', {noremap = true})
|
||||
vim.api.nvim_set_keymap('n', '<leader>dvp', ':DataViewerPrevTable<CR>', {noremap = true})
|
||||
vim.api.nvim_set_keymap('n', '<leader>dvc', ':DataViewerClose<CR>', {noremap = true})
|
||||
'';
|
||||
};
|
||||
*/
|
||||
smart-splits = {
|
||||
package = pluginSources.smart-splits;
|
||||
setup = "require('smart-splits').setup {}";
|
||||
};
|
||||
|
||||
/*
|
||||
neotab-nvim = {
|
||||
package = pluginSources.neotab-nvim;
|
||||
setup = ''
|
||||
|
@ -173,7 +173,7 @@ in {
|
|||
}
|
||||
'';
|
||||
};
|
||||
|
||||
*/
|
||||
specs-nvim = {
|
||||
package = pluginSources.specs-nvim;
|
||||
setup = ''
|
||||
|
@ -202,6 +202,5 @@ in {
|
|||
vim.api.nvim_set_keymap('n', 'N', 'N:lua require("specs").show_specs()<CR>', { noremap = true, silent = true })
|
||||
'';
|
||||
};
|
||||
*/
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
{config, ...}: let
|
||||
inherit (config.modules.other.system) username;
|
||||
in {
|
||||
_: {
|
||||
programs.neovim-flake.settings.vim = {
|
||||
comments.comment-nvim.enable = true;
|
||||
};
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
{config, ...}: let
|
||||
inherit (config.modules.other.system) username;
|
||||
in {
|
||||
_: {
|
||||
programs.neovim-flake.settings.vim = {
|
||||
dashboard = {
|
||||
alpha.enable = false;
|
||||
alpha.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
{config, ...}: let
|
||||
inherit (config.modules.other.system) username;
|
||||
in {
|
||||
_: {
|
||||
programs.neovim-flake.settings.vim = {
|
||||
debugger.nvim-dap = {
|
||||
enable = true;
|
||||
|
|
|
@ -38,7 +38,6 @@ in {
|
|||
# alternatively, neovim-nightly from the neovim-nightly overlay
|
||||
# via inputs.neovim-nightly.packages.${pkgs.stdenv.system}.neovim
|
||||
package = pkgs.neovim-unwrapped;
|
||||
/*
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
|
||||
|
@ -57,15 +56,15 @@ in {
|
|||
enableLuaLoader = true;
|
||||
enableEditorconfig = true;
|
||||
|
||||
debugMode = {
|
||||
enable = false;
|
||||
logFile = "/tmp/nvim.log";
|
||||
};
|
||||
debugMode = {
|
||||
enable = false;
|
||||
logFile = "/tmp/nvim.log";
|
||||
};
|
||||
|
||||
additionalRuntimePaths = [
|
||||
(mkRuntimeDir "after")
|
||||
(mkRuntimeDir "spell")
|
||||
];
|
||||
additionalRuntimePaths = [
|
||||
(mkRuntimeDir "after")
|
||||
(mkRuntimeDir "spell")
|
||||
];
|
||||
|
||||
# while I should be doing this in luaConfigRC below
|
||||
# I have come to realise that spellfile contents are
|
||||
|
@ -80,20 +79,21 @@ in {
|
|||
# the lua configuration of my Neovim configuration
|
||||
# wrapper. this is recursively read from the lua
|
||||
# directory, so we do not need to use require
|
||||
luaConfigRC = let
|
||||
# get the name of each lua file in the lua directory, where setting files reside
|
||||
# and import them recursively
|
||||
configPaths = filter (hasSuffix ".lua") (map toString (listFilesRecursive ./lua));
|
||||
/*
|
||||
luaConfigRC = let
|
||||
# get the name of each lua file in the lua directory, where setting files reside
|
||||
# and import them recursively
|
||||
configPaths = filter (hasSuffix ".lua") (map toString (listFilesRecursive ./lua));
|
||||
|
||||
# generates a key-value pair that looks roughly as follows:
|
||||
# `<filePath> = entryAnywhere ''<contents of filePath>''`
|
||||
# which is expected by neovim-flake's modified DAG library
|
||||
luaConfig = genAttrs configPaths (file:
|
||||
entryBefore ["luaScript"] ''
|
||||
${fileContents "${file}"}
|
||||
'');
|
||||
in
|
||||
luaConfig;
|
||||
# generates a key-value pair that looks roughly as follows:
|
||||
# `<filePath> = entryAnywhere ''<contents of filePath>''`
|
||||
# which is expected by neovim-flake's modified DAG library
|
||||
luaConfig = genAttrs configPaths (file:
|
||||
entryBefore ["luaScript"] ''
|
||||
${fileContents "${file}"}
|
||||
'');
|
||||
in
|
||||
luaConfig;
|
||||
*/
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue