neovim config
This commit is contained in:
parent
346ccb57d5
commit
5972a37b36
7
README.md
Normal file
7
README.md
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# Bonfire
|
||||||
|
|
||||||
|
***Lit another Nix derivation***
|
||||||
|
|
||||||
|
> This is a private configuration and experiment with Nix and NixOS. Formally
|
||||||
|
> it's a more than just a dotfiles in cause of packages, modules, templates and
|
||||||
|
> etc. Discover the current repository on your own risk.
|
15
config/nvim/.neoconf.json
Normal file
15
config/nvim/.neoconf.json
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"neodev": {
|
||||||
|
"library": {
|
||||||
|
"enabled": true,
|
||||||
|
"plugins": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"neoconf": {
|
||||||
|
"plugins": {
|
||||||
|
"lua_ls": {
|
||||||
|
"enabled": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
29
config/nvim/ginit.vim
Normal file
29
config/nvim/ginit.vim
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
" Enable Mouse
|
||||||
|
set mouse=a
|
||||||
|
|
||||||
|
" Set Editor Font
|
||||||
|
if exists(':GuiFont')
|
||||||
|
" Use GuiFont! to ignore font errors
|
||||||
|
GuiFont MesloLGS Nerd Font Mono:h10
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Disable GUI Tabline
|
||||||
|
if exists(':GuiTabline')
|
||||||
|
GuiTabline 0
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Disable GUI Popupmenu
|
||||||
|
if exists(':GuiPopupmenu')
|
||||||
|
GuiPopupmenu 0
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Enable GUI ScrollBar
|
||||||
|
if exists(':GuiScrollBar')
|
||||||
|
GuiScrollBar 0
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Right Click Context Menu (Copy-Cut-Paste)
|
||||||
|
nnoremap <silent><RightMouse> :call GuiShowContextMenu()<CR>
|
||||||
|
inoremap <silent><RightMouse> <Esc>:call GuiShowContextMenu()<CR>
|
||||||
|
xnoremap <silent><RightMouse> :call GuiShowContextMenu()<CR>gv
|
||||||
|
snoremap <silent><RightMouse> <C-G>:call GuiShowContextMenu()<CR>gv
|
2
config/nvim/init.lua
Normal file
2
config/nvim/init.lua
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
-- bootstrap lazy.nvim, LazyVim and your plugins
|
||||||
|
require("config.lazy")
|
3
config/nvim/lua/config/autocmds.lua
Normal file
3
config/nvim/lua/config/autocmds.lua
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
-- Autocmds are automatically loaded on the VeryLazy event
|
||||||
|
-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua
|
||||||
|
-- Add any additional autocmds here
|
15
config/nvim/lua/config/keymaps.lua
Normal file
15
config/nvim/lua/config/keymaps.lua
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
-- Keymaps are automatically loaded on the VeryLazy event
|
||||||
|
-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua
|
||||||
|
-- Add any additional keymaps here
|
||||||
|
|
||||||
|
-- Move to window
|
||||||
|
vim.keymap.set("n", "<C-Left>", "<C-w>h", { desc = "Go to left window", remap = true })
|
||||||
|
vim.keymap.set("n", "<C-Down>", "<C-w>j", { desc = "Go to lower window", remap = true })
|
||||||
|
vim.keymap.set("n", "<C-Up>", "<C-w>k", { desc = "Go to upper window", remap = true })
|
||||||
|
vim.keymap.set("n", "<C-Right>", "<C-w>l", { desc = "Go to right window", remap = true })
|
||||||
|
|
||||||
|
-- Resize window using <ctrl> arrow keys
|
||||||
|
vim.keymap.set("n", "<C-k>", "<cmd>resize +2<cr>", { desc = "Increase window height" })
|
||||||
|
vim.keymap.set("n", "<C-l>", "<cmd>resize -2<cr>", { desc = "Decrease window height" })
|
||||||
|
vim.keymap.set("n", "<C-h>", "<cmd>vertical resize -2<cr>", { desc = "Decrease window width" })
|
||||||
|
vim.keymap.set("n", "<C-j>", "<cmd>vertical resize +2<cr>", { desc = "Increase window width" })
|
46
config/nvim/lua/config/lazy.lua
Normal file
46
config/nvim/lua/config/lazy.lua
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
|
if not vim.loop.fs_stat(lazypath) then
|
||||||
|
-- bootstrap lazy.nvim
|
||||||
|
-- stylua: ignore
|
||||||
|
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath })
|
||||||
|
end
|
||||||
|
vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
|
||||||
|
|
||||||
|
require("lazy").setup({
|
||||||
|
spec = {
|
||||||
|
-- add LazyVim and import its plugins
|
||||||
|
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
||||||
|
-- import any extras modules here
|
||||||
|
-- { import = "lazyvim.plugins.extras.lang.typescript" },
|
||||||
|
-- { import = "lazyvim.plugins.extras.lang.json" },
|
||||||
|
-- { import = "lazyvim.plugins.extras.ui.mini-animate" },
|
||||||
|
-- import/override with your plugins
|
||||||
|
{ import = "plugins" },
|
||||||
|
},
|
||||||
|
defaults = {
|
||||||
|
-- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup.
|
||||||
|
-- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default.
|
||||||
|
lazy = false,
|
||||||
|
-- It's recommended to leave version=false for now, since a lot the plugin that support versioning,
|
||||||
|
-- have outdated releases, which may break your Neovim install.
|
||||||
|
version = false, -- always use the latest git commit
|
||||||
|
-- version = "*", -- try installing the latest stable version for plugins that support semver
|
||||||
|
},
|
||||||
|
install = { colorscheme = { "tokyonight", "habamax" } },
|
||||||
|
checker = { enabled = true }, -- automatically check for plugin updates
|
||||||
|
performance = {
|
||||||
|
rtp = {
|
||||||
|
-- disable some rtp plugins
|
||||||
|
disabled_plugins = {
|
||||||
|
"gzip",
|
||||||
|
-- "matchit",
|
||||||
|
-- "matchparen",
|
||||||
|
-- "netrwPlugin",
|
||||||
|
"tarPlugin",
|
||||||
|
"tohtml",
|
||||||
|
"tutor",
|
||||||
|
"zipPlugin",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
3
config/nvim/lua/config/options.lua
Normal file
3
config/nvim/lua/config/options.lua
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
-- Options are automatically loaded before lazy.nvim startup
|
||||||
|
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
|
||||||
|
-- Add any additional options here
|
63
config/nvim/lua/plugins/user.lua
Normal file
63
config/nvim/lua/plugins/user.lua
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
return {
|
||||||
|
|
||||||
|
{
|
||||||
|
"ellisonleao/gruvbox.nvim",
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"folke/tokyonight.nvim",
|
||||||
|
style = "moon",
|
||||||
|
priority = 1000,
|
||||||
|
},
|
||||||
|
|
||||||
|
{ "skywind3000/asyncrun.vim" },
|
||||||
|
|
||||||
|
-- Configure LazyVim to load gruvbox
|
||||||
|
{
|
||||||
|
"LazyVim/LazyVim",
|
||||||
|
opts = {
|
||||||
|
colorscheme = "tokyonight",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
{ "equalsraf/neovim-gui-shim" },
|
||||||
|
|
||||||
|
{
|
||||||
|
"nvim-neo-tree/neo-tree.nvim",
|
||||||
|
opts = {
|
||||||
|
filesystem = {
|
||||||
|
filtered_items = {
|
||||||
|
hide_dotfiles = false,
|
||||||
|
hide_gitignored = false,
|
||||||
|
},
|
||||||
|
use_libuv_file_watcher = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"folke/trouble.nvim",
|
||||||
|
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"nvim-orgmode/orgmode",
|
||||||
|
dependencies = {
|
||||||
|
{ "nvim-treesitter/nvim-treesitter", lazy = true },
|
||||||
|
},
|
||||||
|
event = "VeryLazy",
|
||||||
|
config = function()
|
||||||
|
require("orgmode").setup_ts_grammar()
|
||||||
|
|
||||||
|
require("nvim-treesitter.configs").setup({
|
||||||
|
highlight = {
|
||||||
|
enable = true,
|
||||||
|
additional_vim_regex_highlighting = { "org" },
|
||||||
|
},
|
||||||
|
ensure_installed = { "org" },
|
||||||
|
})
|
||||||
|
|
||||||
|
require("orgmode").setup()
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
4
config/nvim/stylua.toml
Normal file
4
config/nvim/stylua.toml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
indent_type = "Spaces"
|
||||||
|
indent_width = 4
|
||||||
|
column_width = 120
|
||||||
|
|
68
flake.lock
generated
68
flake.lock
generated
@ -1,5 +1,27 @@
|
|||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
|
"agenix": {
|
||||||
|
"inputs": {
|
||||||
|
"darwin": "darwin",
|
||||||
|
"home-manager": "home-manager",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1701216516,
|
||||||
|
"narHash": "sha256-jKSeJn+7hZ1dZdiH1L+NWUGT2i/BGomKAJ54B9kT06Q=",
|
||||||
|
"owner": "ryantm",
|
||||||
|
"repo": "agenix",
|
||||||
|
"rev": "13ac9ac6d68b9a0896e3d43a082947233189e247",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "ryantm",
|
||||||
|
"repo": "agenix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"cachix": {
|
"cachix": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat",
|
"flake-compat": "flake-compat",
|
||||||
@ -24,6 +46,28 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"darwin": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"agenix",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1673295039,
|
||||||
|
"narHash": "sha256-AsdYgE8/GPwcelGgrntlijMg4t3hLFJFCRF3tL5WVjA=",
|
||||||
|
"owner": "lnl7",
|
||||||
|
"repo": "nix-darwin",
|
||||||
|
"rev": "87b9d090ad39b25b2400029c64825fc2a8868943",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "lnl7",
|
||||||
|
"ref": "master",
|
||||||
|
"repo": "nix-darwin",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"flake-compat": {
|
"flake-compat": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
@ -78,6 +122,27 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"home-manager": {
|
"home-manager": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"agenix",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1682203081,
|
||||||
|
"narHash": "sha256-kRL4ejWDhi0zph/FpebFYhzqlOBrk0Pl3dzGEKSAlEw=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"rev": "32d3e39c491e2f91152c84f8ad8b003420eab0a1",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"home-manager_2": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
@ -215,8 +280,9 @@
|
|||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
|
"agenix": "agenix",
|
||||||
"cachix": "cachix",
|
"cachix": "cachix",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager_2",
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
11
flake.nix
11
flake.nix
@ -5,13 +5,20 @@
|
|||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; };
|
home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; };
|
||||||
cachix = { url = "github:cachix/devenv/v0.6.3"; inputs.nixpkgs.follows = "nixpkgs"; };
|
cachix = { url = "github:cachix/devenv/v0.6.3"; inputs.nixpkgs.follows = "nixpkgs"; };
|
||||||
|
agenix = { url = "github:ryantm/agenix"; inputs.nixpkgs.follows = "nixpkgs"; };
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs @ { self, nixpkgs, home-manager, ... }: {
|
outputs = inputs @ { self, nixpkgs, home-manager, agenix, ... }: {
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
astora = with nixpkgs; lib.nixosSystem {
|
astora = with nixpkgs; lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = [ home-manager.nixosModules.home-manager ./nixosConfigurations/astora ./nixosModules/bonfire.nix ];
|
modules = [
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
|
agenix.nixosModules.default
|
||||||
|
./nixosConfigurations/astora
|
||||||
|
./nixosModules/bonfire.nix
|
||||||
|
];
|
||||||
|
specialArgs = { inherit inputs; };
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, agenix, inputs, ... }:
|
||||||
{
|
{
|
||||||
system.stateVersion = "23.11";
|
system.stateVersion = "23.11";
|
||||||
|
|
||||||
@ -90,6 +90,9 @@
|
|||||||
gcc
|
gcc
|
||||||
|
|
||||||
cachix
|
cachix
|
||||||
|
inputs.agenix.packages.${system}.default
|
||||||
|
|
||||||
|
helix
|
||||||
];
|
];
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
@ -101,6 +104,8 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
programs.direnv.enable = true;
|
||||||
|
|
||||||
fonts.packages = with pkgs; [ nerdfonts ];
|
fonts.packages = with pkgs; [ nerdfonts ];
|
||||||
|
|
||||||
programs.steam.enable = true;
|
programs.steam.enable = true;
|
||||||
|
@ -49,6 +49,7 @@
|
|||||||
pinentry-program ${pkgs.pinentry.gtk2}/bin/pinentry
|
pinentry-program ${pkgs.pinentry.gtk2}/bin/pinentry
|
||||||
'';
|
'';
|
||||||
home.file.".config/git/config".source = "${config.bonfire.configDir}/git/config";
|
home.file.".config/git/config".source = "${config.bonfire.configDir}/git/config";
|
||||||
|
home.file.".config/nvim" = { source = "${config.bonfire.configDir}/nvim"; recursive = true; };
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.gnupg.agent = {
|
programs.gnupg.agent = {
|
||||||
|
Loading…
Reference in New Issue
Block a user