Added a vim config and put everything in my prefered indentation style.
This commit is contained in:
146
flake.lock
generated
146
flake.lock
generated
@@ -1,5 +1,44 @@
|
||||
{
|
||||
"nodes": {
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1759362264,
|
||||
"narHash": "sha256-wfG0S7pltlYyZTM+qqlhJ7GMw2fTF4mLKCIVhLii/4M=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "758cf7296bee11f1706a574c77d072b8a7baa881",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
@@ -20,6 +59,34 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"ixx": {
|
||||
"inputs": {
|
||||
"flake-utils": [
|
||||
"nixvim",
|
||||
"nuschtosSearch",
|
||||
"flake-utils"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nuschtosSearch",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1754860581,
|
||||
"narHash": "sha256-EM0IE63OHxXCOpDHXaTyHIOk2cNvMCGPqLt/IdtVxgk=",
|
||||
"owner": "NuschtOS",
|
||||
"repo": "ixx",
|
||||
"rev": "babfe85a876162c4acc9ab6fb4483df88fa1f281",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NuschtOS",
|
||||
"ref": "v0.1.1",
|
||||
"repo": "ixx",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1759831965,
|
||||
@@ -36,10 +103,87 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixvim": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"nuschtosSearch": "nuschtosSearch",
|
||||
"systems": "systems_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1760245579,
|
||||
"narHash": "sha256-VnWatwwsLHkgWO6R3N71nQiacOKhpmEBPbasGdr3Ogk=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixvim",
|
||||
"rev": "dc8dea66e8b02fcee6711ec0c72932bf4a033069",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "nixvim",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nuschtosSearch": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"ixx": "ixx",
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1758662783,
|
||||
"narHash": "sha256-igrxT+/MnmcftPOHEb+XDwAMq3Xg1Xy7kVYQaHhPlAg=",
|
||||
"owner": "NuschtOS",
|
||||
"repo": "search",
|
||||
"rev": "7d4c0fc4ffe3bd64e5630417162e9e04e64b27a4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NuschtOS",
|
||||
"repo": "search",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": "nixpkgs"
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixvim": "nixvim"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_2": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -7,9 +7,13 @@
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nixvim = {
|
||||
url = "github:nix-community/nixvim";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, home-manager }@inputs: {
|
||||
outputs = { self, nixpkgs, home-manager, nixvim }@inputs: {
|
||||
|
||||
packages.x86_64-linux.hello = nixpkgs.legacyPackages.x86_64-linux.hello;
|
||||
|
||||
@@ -21,6 +25,7 @@
|
||||
modules = [
|
||||
./hosts/desktop/configuration.nix
|
||||
inputs.home-manager.nixosModules.default
|
||||
inputs.nixvim.nixosModules.nixvim
|
||||
];
|
||||
specialArgs = { inherit inputs; };
|
||||
};
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
../../modules/nixos/localization.nix
|
||||
../../modules/nixos/ai/index.nix
|
||||
../../modules/nixos/gnome/gnome.nix
|
||||
../../modules/home/vim.nix
|
||||
inputs.home-manager.nixosModules.default
|
||||
];
|
||||
|
||||
@@ -82,7 +83,7 @@ nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
||||
#vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
||||
wget
|
||||
|
||||
tree
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [ /*../../modules/home/vim.nix*/ ];
|
||||
|
||||
# Home Manager needs a bit of information about you and the paths it should
|
||||
# manage.
|
||||
home.username = "lily";
|
||||
|
||||
87
modules/home/vim.nix
Executable file
87
modules/home/vim.nix
Executable file
@@ -0,0 +1,87 @@
|
||||
{ pkgs, lib, nixvim, ... }:
|
||||
{
|
||||
imports = [ /*inputs.nixvim.nixosModules.nixvim*/ ];
|
||||
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
enableMan = true;
|
||||
|
||||
globals.mapleader = "`";
|
||||
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
|
||||
opts = {
|
||||
tabstop = 4;
|
||||
softtabstop = 0;
|
||||
shiftwidth = 4;
|
||||
expandtab = false;
|
||||
autoindent = true;
|
||||
number = true;
|
||||
relativenumber = true;
|
||||
ignorecase = true;
|
||||
smartcase = true;
|
||||
};
|
||||
|
||||
plugins.lsp = {
|
||||
enable = true;
|
||||
servers = {
|
||||
rust_analyzer = {
|
||||
enable = true;
|
||||
installCargo = false;
|
||||
installRustc = false;
|
||||
};
|
||||
nixd = {
|
||||
enable = true;
|
||||
# settings.formatting.command = [ "alejandra" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
plugins.treesitter = {
|
||||
enable = true;
|
||||
nixvimInjections = true;
|
||||
# ensure_installed = "all";
|
||||
settings = {
|
||||
highlight = {
|
||||
enable = true;
|
||||
disable = [ "org" ];
|
||||
};
|
||||
};
|
||||
grammarPackages = pkgs.vimPlugins.nvim-treesitter.allGrammars;
|
||||
};
|
||||
extraPlugins = with pkgs.vimPlugins; [
|
||||
orgmode
|
||||
vim-nix
|
||||
];
|
||||
|
||||
extraConfigLua = ''
|
||||
-- Tree-sitter configuration
|
||||
require'nvim-treesitter.configs'.setup {
|
||||
-- If TS highlights are not enabled at all, or disabled via ``disable`` prop, highlighting will fallback to default Vim syntax highlighting
|
||||
highlight = {
|
||||
-- enable = true,
|
||||
-- disable = {'org'}, -- Remove this to use TS highlighter for some of the highlights (Experimental)
|
||||
additional_vim_regex_highlighting = {'org'}, -- Required since TS highlighter doesn't support all syntax features (conceal)
|
||||
},
|
||||
-- ensure_installed = {'org'}, -- Or run :TSUpdate org
|
||||
}
|
||||
|
||||
require('orgmode').setup({
|
||||
org_agenda_files = {'~/Org/Agenda/agenda.org', '~/Public/Org/Agenda/agenda.org'},
|
||||
org_default_notes_file = '~/Dropbox/org/refile.org',
|
||||
})
|
||||
'';
|
||||
|
||||
extraConfigVim = ''
|
||||
filetype indent off
|
||||
set noexpandtab
|
||||
set list
|
||||
set listchars=tab:▸\ ,trail:·
|
||||
autocmd FileType nix setlocal noexpandtab tabstop=4 shiftwidth=4 softtabstop=0
|
||||
'';
|
||||
|
||||
#colorschemes.base16.enable = true;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user