mirror of
https://github.com/genebean/dots.git
synced 2026-05-31 07:45:20 -04:00
Compare commits
No commits in common. "369f3a01e1a5df94493a1a9e8f0ab32d987644d9" and "03197d54771754aeb2bb8c77be177715d178a81e" have entirely different histories.
369f3a01e1
...
03197d5477
34 changed files with 785 additions and 52 deletions
43
flake.lock
generated
43
flake.lock
generated
|
|
@ -258,27 +258,6 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"genebean-neovim": {
|
|
||||||
"inputs": {
|
|
||||||
"nix-wrapper-modules": "nix-wrapper-modules",
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs-unstable"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1775875603,
|
|
||||||
"narHash": "sha256-U3pv5uw/V0STc+osvb+QOlAuQ4ROZ5nu83i5yyj6WWo=",
|
|
||||||
"owner": "genebean",
|
|
||||||
"repo": "neovim-flake",
|
|
||||||
"rev": "baf7503fe8f4f8749253033d01620ff5dd52641b",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "genebean",
|
|
||||||
"repo": "neovim-flake",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"genebean-omp-themes": {
|
"genebean-omp-themes": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
|
|
@ -501,27 +480,6 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nix-wrapper-modules": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"genebean-neovim",
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1775724285,
|
|
||||||
"narHash": "sha256-/ukfzDYzcuz7i+unH7XioPS3Acam6FC935XsOCaJDmY=",
|
|
||||||
"owner": "BirdeeHub",
|
|
||||||
"repo": "nix-wrapper-modules",
|
|
||||||
"rev": "d79d2f910dd0d8bffd11113865923199cb304f86",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "BirdeeHub",
|
|
||||||
"repo": "nix-wrapper-modules",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixos-cosmic": {
|
"nixos-cosmic": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat_2",
|
"flake-compat": "flake-compat_2",
|
||||||
|
|
@ -719,7 +677,6 @@
|
||||||
"deadnix": "deadnix",
|
"deadnix": "deadnix",
|
||||||
"disko": "disko",
|
"disko": "disko",
|
||||||
"flox": "flox",
|
"flox": "flox",
|
||||||
"genebean-neovim": "genebean-neovim",
|
|
||||||
"genebean-omp-themes": "genebean-omp-themes",
|
"genebean-omp-themes": "genebean-omp-themes",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"nix-auth": "nix-auth",
|
"nix-auth": "nix-auth",
|
||||||
|
|
|
||||||
|
|
@ -27,11 +27,6 @@
|
||||||
url = "github:flox/flox/v1.4.4";
|
url = "github:flox/flox/v1.4.4";
|
||||||
};
|
};
|
||||||
|
|
||||||
genebean-neovim = {
|
|
||||||
url = "github:genebean/neovim-flake";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
|
||||||
};
|
|
||||||
|
|
||||||
# My oh-my-posh theme
|
# My oh-my-posh theme
|
||||||
genebean-omp-themes = {
|
genebean-omp-themes = {
|
||||||
url = "github:genebean/my-oh-my-posh-themes";
|
url = "github:genebean/my-oh-my-posh-themes";
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,6 @@
|
||||||
../modules/hosts/darwin/home.nix
|
../modules/hosts/darwin/home.nix
|
||||||
../modules/hosts/darwin/${hostname}/home-${username}.nix
|
../modules/hosts/darwin/${hostname}/home-${username}.nix
|
||||||
|
|
||||||
inputs.genebean-neovim.homeManagerModules.default
|
|
||||||
inputs.private-flake.homeManagerModules.private.git
|
inputs.private-flake.homeManagerModules.private.git
|
||||||
(inputs.private-flake.homeManagerModules.private.${hostname} or { })
|
(inputs.private-flake.homeManagerModules.private.${hostname} or { })
|
||||||
inputs.sops-nix.homeManagerModule # user-level secrets management
|
inputs.sops-nix.homeManagerModule # user-level secrets management
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,6 @@
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
inputs.genebean-neovim.homeManagerModules.default
|
|
||||||
inputs.nix-flatpak.homeManagerModules.nix-flatpak
|
inputs.nix-flatpak.homeManagerModules.nix-flatpak
|
||||||
inputs.private-flake.homeManagerModules.private.git
|
inputs.private-flake.homeManagerModules.private.git
|
||||||
inputs.sops-nix.homeManagerModules.sops
|
inputs.sops-nix.homeManagerModules.sops
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,6 @@
|
||||||
../modules/shared/home/linux
|
../modules/shared/home/linux
|
||||||
../modules/hosts/nixos/${hostname}/home-${username}.nix
|
../modules/hosts/nixos/${hostname}/home-${username}.nix
|
||||||
|
|
||||||
inputs.genebean-neovim.homeManagerModules.default
|
|
||||||
inputs.private-flake.homeManagerModules.private.git
|
inputs.private-flake.homeManagerModules.private.git
|
||||||
(inputs.private-flake.homeManagerModules.private.${hostname} or { })
|
(inputs.private-flake.homeManagerModules.private.${hostname} or { })
|
||||||
];
|
];
|
||||||
|
|
|
||||||
31
modules/shared/files/nvim/lua/config/vim-options.lua
Normal file
31
modules/shared/files/nvim/lua/config/vim-options.lua
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
vim.g.mapleader = " "
|
||||||
|
vim.g.maplocalleader = " "
|
||||||
|
|
||||||
|
-- make sure vim know I always have a dark terminal
|
||||||
|
vim.opt.background = "dark"
|
||||||
|
|
||||||
|
-- use spaces for tabs and whatnot
|
||||||
|
vim.opt.expandtab = true
|
||||||
|
vim.opt.tabstop = 2
|
||||||
|
vim.opt.softtabstop = 2
|
||||||
|
vim.opt.shiftwidth = 2
|
||||||
|
vim.opt.shiftround = true
|
||||||
|
|
||||||
|
-- make sure all the mouse stuff is on.
|
||||||
|
-- pressing alt to hightlight + copy/paste works like it does outside of nvim
|
||||||
|
vim.opt.mouse = "a"
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<leader>h", ":nohlsearch<CR>")
|
||||||
|
|
||||||
|
vim.wo.number = true
|
||||||
|
|
||||||
|
vim.o.termguicolors = true
|
||||||
|
|
||||||
|
-- Tips from https://github.com/folke/edgy.nvim
|
||||||
|
-- views can only be fully collapsed with the global statusline
|
||||||
|
vim.opt.laststatus = 3
|
||||||
|
|
||||||
|
-- Default splitting will cause your main splits to jump when opening an edgebar.
|
||||||
|
-- To prevent this, set `splitkeep` to either `screen` or `topline`.
|
||||||
|
vim.opt.splitkeep = "screen"
|
||||||
|
|
||||||
14
modules/shared/files/nvim/lua/disabled/barbar.lua
Normal file
14
modules/shared/files/nvim/lua/disabled/barbar.lua
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
return {'romgrk/barbar.nvim',
|
||||||
|
dependencies = {
|
||||||
|
'lewis6991/gitsigns.nvim', -- OPTIONAL: for git status
|
||||||
|
'nvim-tree/nvim-web-devicons', -- OPTIONAL: for file icons
|
||||||
|
},
|
||||||
|
init = function() vim.g.barbar_auto_setup = false end,
|
||||||
|
opts = {
|
||||||
|
-- lazy.nvim will automatically call setup for you. put your options here, anything missing will use the default:
|
||||||
|
-- animation = true,
|
||||||
|
-- insert_at_start = true,
|
||||||
|
-- …etc.
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
9
modules/shared/files/nvim/lua/disabled/cheatsheet.lua
Normal file
9
modules/shared/files/nvim/lua/disabled/cheatsheet.lua
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
return {
|
||||||
|
"sudormrfbin/cheatsheet.nvim",
|
||||||
|
dependencies = {
|
||||||
|
'nvim-telescope/telescope.nvim',
|
||||||
|
'nvim-lua/popup.nvim',
|
||||||
|
'nvim-lua/plenary.nvim',
|
||||||
|
},
|
||||||
|
config = true,
|
||||||
|
}
|
||||||
11
modules/shared/files/nvim/lua/disabled/nvim-tree.lua
Normal file
11
modules/shared/files/nvim/lua/disabled/nvim-tree.lua
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
return{
|
||||||
|
"nvim-tree/nvim-tree.lua",
|
||||||
|
config = function ()
|
||||||
|
vim.g.loaded_netrw = 1
|
||||||
|
vim.g.loaded_netrwPlugin = 1
|
||||||
|
|
||||||
|
require('nvim-tree').setup()
|
||||||
|
|
||||||
|
vim.keymap.set('n', '<c-n>', ':NvimTreeFindFileToggle<CR>')
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
return {
|
||||||
|
"Mofiqul/dracula.nvim",
|
||||||
|
lazy = false,
|
||||||
|
priority = 1000,
|
||||||
|
config = function()
|
||||||
|
vim.cmd.colorscheme("dracula")
|
||||||
|
end,
|
||||||
|
}
|
||||||
11
modules/shared/files/nvim/lua/disabled/themes/gruvbox.lua
Normal file
11
modules/shared/files/nvim/lua/disabled/themes/gruvbox.lua
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
return {
|
||||||
|
"ellisonleao/gruvbox.nvim",
|
||||||
|
priority = 1000 ,
|
||||||
|
config = function ()
|
||||||
|
require("gruvbox").setup()
|
||||||
|
|
||||||
|
vim.o.background = "dark"
|
||||||
|
vim.o.termguicolors = true
|
||||||
|
vim.cmd.colorscheme "gruvbox"
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
return {
|
||||||
|
"rebelot/kanagawa.nvim",
|
||||||
|
lazy = false,
|
||||||
|
priority = 1000,
|
||||||
|
config = function()
|
||||||
|
vim.cmd.colorscheme "kanagawa"
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
return {
|
||||||
|
"nyoom-engineering/oxocarbon.nvim",
|
||||||
|
config = function ()
|
||||||
|
vim.o.background = "dark"
|
||||||
|
vim.o.termguicolors = true
|
||||||
|
vim.cmd.colorscheme "oxocarbon"
|
||||||
|
end
|
||||||
|
}
|
||||||
10
modules/shared/files/nvim/lua/disabled/themes/tokyonight.lua
Normal file
10
modules/shared/files/nvim/lua/disabled/themes/tokyonight.lua
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
return {
|
||||||
|
-- the colorscheme should be available when starting Neovim
|
||||||
|
"folke/tokyonight.nvim",
|
||||||
|
lazy = false, -- make sure we load this during startup if it is your main colorscheme
|
||||||
|
priority = 1000, -- make sure to load this before all the other start plugins
|
||||||
|
config = function()
|
||||||
|
-- load the colorscheme here
|
||||||
|
vim.cmd.colorscheme "tokyonight-storm"
|
||||||
|
end,
|
||||||
|
}
|
||||||
33
modules/shared/files/nvim/lua/plugins/alpha.lua
Normal file
33
modules/shared/files/nvim/lua/plugins/alpha.lua
Normal file
|
|
@ -0,0 +1,33 @@
|
||||||
|
return {
|
||||||
|
"goolord/alpha-nvim",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-tree/nvim-web-devicons",
|
||||||
|
},
|
||||||
|
|
||||||
|
config = function()
|
||||||
|
local alpha = require("alpha")
|
||||||
|
local dashboard = require("alpha.themes.startify")
|
||||||
|
|
||||||
|
dashboard.section.header.val = {
|
||||||
|
[[ ]],
|
||||||
|
[[ ]],
|
||||||
|
[[ ]],
|
||||||
|
[[ ]],
|
||||||
|
[[ ]],
|
||||||
|
[[ ████ ██████ █████ ██ ]],
|
||||||
|
[[ ███████████ █████ ]],
|
||||||
|
[[ █████████ ███████████████████ ███ ███████████ ]],
|
||||||
|
[[ █████████ ███ █████████████ █████ ██████████████ ]],
|
||||||
|
[[ █████████ ██████████ █████████ █████ █████ ████ █████ ]],
|
||||||
|
[[ ███████████ ███ ███ █████████ █████ █████ ████ █████ ]],
|
||||||
|
[[ ██████ █████████████████████ ████ █████ █████ ████ ██████ ]],
|
||||||
|
[[ ]],
|
||||||
|
[[ ]],
|
||||||
|
[[ ]],
|
||||||
|
}
|
||||||
|
|
||||||
|
alpha.setup(dashboard.opts)
|
||||||
|
|
||||||
|
vim.cmd('autocmd User AlphaReady Neotree show')
|
||||||
|
end,
|
||||||
|
}
|
||||||
49
modules/shared/files/nvim/lua/plugins/bufferline.lua
Normal file
49
modules/shared/files/nvim/lua/plugins/bufferline.lua
Normal file
|
|
@ -0,0 +1,49 @@
|
||||||
|
return {
|
||||||
|
"akinsho/bufferline.nvim",
|
||||||
|
after = "catppuccin",
|
||||||
|
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||||
|
version = "*",
|
||||||
|
config = function()
|
||||||
|
-- Get the color pallet of the theme flavor I am using
|
||||||
|
local color_palette = require("catppuccin.palettes").get_palette("frappe")
|
||||||
|
|
||||||
|
-- Set variables to use the color they'd use if the background was not transparent
|
||||||
|
local bg_highlight = color_palette.crust
|
||||||
|
local separator_fg = color_palette.crust
|
||||||
|
|
||||||
|
require("bufferline").setup({
|
||||||
|
highlights = require("catppuccin.groups.integrations.bufferline").get({
|
||||||
|
-- Copy settings from Catppuccin bufferline integration and override just the
|
||||||
|
-- part that is needed to make it look like it would if the background was not
|
||||||
|
-- set to transparent in catppuccin.lua
|
||||||
|
-- https://github.com/catppuccin/nvim/blob/main/lua/catppuccin/groups/integrations/bufferline.lua
|
||||||
|
custom = {
|
||||||
|
all = {
|
||||||
|
-- this makes the background behind the tabs contrast with the tabs themselves
|
||||||
|
fill = { bg = bg_highlight },
|
||||||
|
|
||||||
|
-- separators
|
||||||
|
-- I am only overriding the foreground as that is what makes the tabs look correct
|
||||||
|
separator = { fg = separator_fg },
|
||||||
|
separator_visible = { fg = separator_fg },
|
||||||
|
separator_selected = { fg = separator_fg },
|
||||||
|
offset_separator = { fg = separator_fg },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
options = {
|
||||||
|
mode = "buffers",
|
||||||
|
separator_style = "slant",
|
||||||
|
offsets = {
|
||||||
|
{
|
||||||
|
filetype = "neo-tree",
|
||||||
|
text = "File Explorer",
|
||||||
|
highlight = "Directory",
|
||||||
|
separator = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
diagnostics = "nvim_lsp",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
57
modules/shared/files/nvim/lua/plugins/catppuccin.lua
Normal file
57
modules/shared/files/nvim/lua/plugins/catppuccin.lua
Normal file
|
|
@ -0,0 +1,57 @@
|
||||||
|
return {
|
||||||
|
"catppuccin/nvim",
|
||||||
|
name = "catppuccin",
|
||||||
|
flavour = "frappe", -- latte, frappe, macchiato, mocha
|
||||||
|
lazy = false,
|
||||||
|
priority = 1000,
|
||||||
|
config = function()
|
||||||
|
require("catppuccin").setup({
|
||||||
|
transparent_background = true,
|
||||||
|
color_overrides = {
|
||||||
|
frappe = {
|
||||||
|
base = "#07042B",
|
||||||
|
mantle = "#0c0746",
|
||||||
|
crust = "#10095d",
|
||||||
|
rosewater = "#FF7F7F", -- used for cursor
|
||||||
|
},
|
||||||
|
},
|
||||||
|
custom_highlights = function(colors)
|
||||||
|
return {
|
||||||
|
Comment = { fg = colors.subtext0 },
|
||||||
|
LineNr = { fg = colors.subtext0 },
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
vim.cmd.colorscheme("catppuccin")
|
||||||
|
end,
|
||||||
|
|
||||||
|
--[[
|
||||||
|
-- original palette from frappe:
|
||||||
|
rosewater = "#f2d5cf",
|
||||||
|
flamingo = "#eebebe",
|
||||||
|
pink = "#f4b8e4",
|
||||||
|
mauve = "#ca9ee6",
|
||||||
|
red = "#e78284",
|
||||||
|
maroon = "#ea999c",
|
||||||
|
peach = "#ef9f76",
|
||||||
|
yellow = "#e5c890",
|
||||||
|
green = "#a6d189",
|
||||||
|
teal = "#81c8be",
|
||||||
|
sky = "#99d1db",
|
||||||
|
sapphire = "#85c1dc",
|
||||||
|
blue = "#8caaee",
|
||||||
|
lavender = "#babbf1",
|
||||||
|
text = "#c6d0f5",
|
||||||
|
subtext1 = "#b5bfe2",
|
||||||
|
subtext0 = "#a5adce",
|
||||||
|
overlay2 = "#949cbb",
|
||||||
|
overlay1 = "#838ba7",
|
||||||
|
overlay0 = "#737994",
|
||||||
|
surface2 = "#626880",
|
||||||
|
surface1 = "#51576d",
|
||||||
|
surface0 = "#414559",
|
||||||
|
base = "#303446",
|
||||||
|
mantle = "#292c3c",
|
||||||
|
crust = "#232634",
|
||||||
|
--]]
|
||||||
|
}
|
||||||
49
modules/shared/files/nvim/lua/plugins/completions.lua
Normal file
49
modules/shared/files/nvim/lua/plugins/completions.lua
Normal file
|
|
@ -0,0 +1,49 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"hrsh7th/nvim-cmp",
|
||||||
|
config = function()
|
||||||
|
local cmp = require("cmp")
|
||||||
|
require("luasnip.loaders.from_vscode").lazy_load()
|
||||||
|
|
||||||
|
cmp.setup({
|
||||||
|
snippet = {
|
||||||
|
expand = function(args)
|
||||||
|
require("luasnip").lsp_expand(args.body)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
window = {
|
||||||
|
completion = cmp.config.window.bordered(),
|
||||||
|
documentation = cmp.config.window.bordered(),
|
||||||
|
},
|
||||||
|
mapping = cmp.mapping.preset.insert({
|
||||||
|
["<C-b>"] = cmp.mapping.scroll_docs(-4),
|
||||||
|
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
||||||
|
["<C-Space>"] = cmp.mapping.complete(),
|
||||||
|
["<C-e>"] = cmp.mapping.abort(),
|
||||||
|
["<CR>"] = cmp.mapping.confirm({ select = true }),
|
||||||
|
}),
|
||||||
|
sources = cmp.config.sources({
|
||||||
|
{
|
||||||
|
name = "nvim_lsp",
|
||||||
|
entry_filter = function(entry)
|
||||||
|
return require("cmp.types").lsp.CompletionItemKind[entry:get_kind()] ~= "Text"
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{ name = "luasnip" },
|
||||||
|
}, {
|
||||||
|
{ name = "buffer" },
|
||||||
|
}),
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"hrsh7th/cmp-nvim-lsp",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"L3MON4D3/LuaSnip",
|
||||||
|
dependencies = {
|
||||||
|
"saadparwaiz1/cmp_luasnip",
|
||||||
|
"rafamadriz/friendly-snippets",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
65
modules/shared/files/nvim/lua/plugins/edgy.lua
Normal file
65
modules/shared/files/nvim/lua/plugins/edgy.lua
Normal file
|
|
@ -0,0 +1,65 @@
|
||||||
|
return {
|
||||||
|
"folke/edgy.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
opts = {
|
||||||
|
exit_when_last = false,
|
||||||
|
bottom = {
|
||||||
|
-- toggleterm / lazyterm at the bottom with a height of 40% of the screen
|
||||||
|
{
|
||||||
|
ft = "toggleterm",
|
||||||
|
size = { height = 0.2 },
|
||||||
|
-- exclude floating windows
|
||||||
|
filter = function(buf, win)
|
||||||
|
return vim.api.nvim_win_get_config(win).relative == ""
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
"Trouble",
|
||||||
|
{ ft = "qf", title = "QuickFix" },
|
||||||
|
{
|
||||||
|
ft = "help",
|
||||||
|
size = { height = 20 },
|
||||||
|
-- only show help buffers
|
||||||
|
filter = function(buf)
|
||||||
|
return vim.bo[buf].buftype == "help"
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{ ft = "spectre_panel", size = { height = 0.4 } },
|
||||||
|
},
|
||||||
|
left = {
|
||||||
|
-- Neo-tree filesystem always takes half the screen height
|
||||||
|
{
|
||||||
|
title = "Neo-Tree",
|
||||||
|
ft = "neo-tree",
|
||||||
|
filter = function(buf)
|
||||||
|
return vim.b[buf].neo_tree_source == "filesystem"
|
||||||
|
end,
|
||||||
|
size = { height = 0.5 },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title = "Neo-Tree Git",
|
||||||
|
ft = "neo-tree",
|
||||||
|
filter = function(buf)
|
||||||
|
return vim.b[buf].neo_tree_source == "git_status"
|
||||||
|
end,
|
||||||
|
pinned = true,
|
||||||
|
open = "Neotree position=right git_status",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title = "Neo-Tree Buffers",
|
||||||
|
ft = "neo-tree",
|
||||||
|
filter = function(buf)
|
||||||
|
return vim.b[buf].neo_tree_source == "buffers"
|
||||||
|
end,
|
||||||
|
pinned = true,
|
||||||
|
open = "Neotree position=top buffers",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
ft = "Outline",
|
||||||
|
pinned = true,
|
||||||
|
open = "SymbolsOutlineOpen",
|
||||||
|
},
|
||||||
|
-- any other neo-tree windows
|
||||||
|
"neo-tree",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
38
modules/shared/files/nvim/lua/plugins/git-stuff.lua
Normal file
38
modules/shared/files/nvim/lua/plugins/git-stuff.lua
Normal file
|
|
@ -0,0 +1,38 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"lewis6991/gitsigns.nvim",
|
||||||
|
config = function()
|
||||||
|
require("gitsigns").setup({
|
||||||
|
current_line_blame = true,
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<leader gp", ":Gitsigns preview_hunk<CR>", {})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tpope/vim-fugitive",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"kdheepak/lazygit.nvim",
|
||||||
|
cmd = {
|
||||||
|
"LazyGit",
|
||||||
|
"LazyGitConfig",
|
||||||
|
"LazyGitCurrentFile",
|
||||||
|
"LazyGitFilter",
|
||||||
|
"LazyGitFilterCurrentFile",
|
||||||
|
},
|
||||||
|
-- optional for floating window border decoration
|
||||||
|
dependencies = {
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
"nvim-telescope/telescope.nvim",
|
||||||
|
},
|
||||||
|
-- setting the keybinding for LazyGit with 'keys' is recommended in
|
||||||
|
-- order to load the plugin when the command is run for the first time
|
||||||
|
keys = {
|
||||||
|
{ "<leader>lg", "<cmd>LazyGit<cr>", desc = "LazyGit" },
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
require("telescope").load_extension("lazygit")
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
65
modules/shared/files/nvim/lua/plugins/lsp-config.lua
Normal file
65
modules/shared/files/nvim/lua/plugins/lsp-config.lua
Normal file
|
|
@ -0,0 +1,65 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"williamboman/mason.nvim",
|
||||||
|
config = true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"williamboman/mason-lspconfig.nvim",
|
||||||
|
config = function()
|
||||||
|
require("mason-lspconfig").setup({
|
||||||
|
ensure_installed = {
|
||||||
|
"lemminx", -- xml
|
||||||
|
"lua_ls", -- lua
|
||||||
|
"nil_ls", -- nix
|
||||||
|
"puppet", -- puppet
|
||||||
|
"ruff", -- python
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"neovim/nvim-lspconfig",
|
||||||
|
config = function()
|
||||||
|
local on_attach = function(_, _)
|
||||||
|
vim.keymap.set("n", "<leader>rn", vim.lsp.buf.rename, {})
|
||||||
|
vim.keymap.set("n", "<leader>ca", vim.lsp.buf.code_action, {})
|
||||||
|
|
||||||
|
vim.keymap.set("n", "gd", vim.lsp.buf.definition, {})
|
||||||
|
vim.keymap.set("n", "gi", vim.lsp.buf.implementation, {})
|
||||||
|
vim.keymap.set("n", "gr", require("telescope.builtin").lsp_references, {})
|
||||||
|
vim.keymap.set("n", "K", vim.lsp.buf.hover, {})
|
||||||
|
end
|
||||||
|
|
||||||
|
local lspconfig = require("lspconfig")
|
||||||
|
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||||
|
|
||||||
|
lspconfig.lemminx.setup({
|
||||||
|
capabilities = capabilities,
|
||||||
|
on_attach = on_attach,
|
||||||
|
})
|
||||||
|
|
||||||
|
lspconfig.lua_ls.setup({
|
||||||
|
capabilities = capabilities,
|
||||||
|
on_attach = on_attach,
|
||||||
|
settings = { Lua = { diagnostics = { globals = { "vim" } } } },
|
||||||
|
})
|
||||||
|
|
||||||
|
lspconfig.nil_ls.setup({
|
||||||
|
capabilities = capabilities,
|
||||||
|
on_attach = on_attach,
|
||||||
|
})
|
||||||
|
|
||||||
|
local puppet_languageserver = vim.fn.expand(
|
||||||
|
"$HOME/.local/share/nvim/mason/packages/puppet-editor-services/libexec/puppet-languageserver"
|
||||||
|
)
|
||||||
|
|
||||||
|
lspconfig.puppet.setup({
|
||||||
|
capabilities = capabilities,
|
||||||
|
on_attach = on_attach,
|
||||||
|
cmd = { puppet_languageserver, "--feature-flags=puppetstrings" },
|
||||||
|
settings = { puppet = { editorServices = { formatOnType = { enable = true } } } },
|
||||||
|
})
|
||||||
|
lspconfig.ruff.setup({ on_attach = on_attach })
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
19
modules/shared/files/nvim/lua/plugins/lualine.lua
Normal file
19
modules/shared/files/nvim/lua/plugins/lualine.lua
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
return {
|
||||||
|
"nvim-lualine/lualine.nvim",
|
||||||
|
config = function()
|
||||||
|
require("lualine").setup({
|
||||||
|
options = {
|
||||||
|
icons_enabled = true,
|
||||||
|
-- theme = "dracula-nvim",
|
||||||
|
},
|
||||||
|
sections = {
|
||||||
|
lualine_a = {
|
||||||
|
{
|
||||||
|
"filename",
|
||||||
|
path = 1,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
24
modules/shared/files/nvim/lua/plugins/neo-tree.lua
Normal file
24
modules/shared/files/nvim/lua/plugins/neo-tree.lua
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
return {
|
||||||
|
"nvim-neo-tree/neo-tree.nvim",
|
||||||
|
lazy = false,
|
||||||
|
branch = "v3.x",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
"nvim-tree/nvim-web-devicons",
|
||||||
|
"MunifTanjim/nui.nvim",
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
vim.g.loaded_netrw = 1
|
||||||
|
vim.g.loaded_netrwPlugin = 1
|
||||||
|
vim.keymap.set("n", "<C-n>", ":Neotree toggle<CR>", {})
|
||||||
|
require("neo-tree").setup({
|
||||||
|
filesystem = {
|
||||||
|
follow_current_file = {
|
||||||
|
enabled = true,
|
||||||
|
},
|
||||||
|
hijack_netrw_behavior = "open_default",
|
||||||
|
},
|
||||||
|
follow_current_file = { enabled = true },
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
61
modules/shared/files/nvim/lua/plugins/noice.lua
Normal file
61
modules/shared/files/nvim/lua/plugins/noice.lua
Normal file
|
|
@ -0,0 +1,61 @@
|
||||||
|
return {
|
||||||
|
"folke/noice.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
opts = {
|
||||||
|
-- add any options here
|
||||||
|
},
|
||||||
|
dependencies = {
|
||||||
|
-- if you lazy-load any plugin below, make sure to add proper `module="..."` entries
|
||||||
|
"MunifTanjim/nui.nvim",
|
||||||
|
-- OPTIONAL:
|
||||||
|
-- `nvim-notify` is only needed, if you want to use the notification view.
|
||||||
|
-- If not available, we use `mini` as the fallback
|
||||||
|
-- "rcarriga/nvim-notify",
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
require("noice").setup({
|
||||||
|
cmdline = { enabled = true },
|
||||||
|
messages = { enabled = false },
|
||||||
|
|
||||||
|
lsp = {
|
||||||
|
-- override markdown rendering so that **cmp** and other plugins use **Treesitter**
|
||||||
|
override = {
|
||||||
|
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
|
||||||
|
["vim.lsp.util.stylize_markdown"] = true,
|
||||||
|
["cmp.entry.get_documentation"] = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
views = {
|
||||||
|
cmdline_popup = {
|
||||||
|
position = {
|
||||||
|
row = "50%",
|
||||||
|
col = "50%",
|
||||||
|
},
|
||||||
|
size = {
|
||||||
|
width = 60,
|
||||||
|
height = "auto",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
popupmenu = {
|
||||||
|
relative = "editor",
|
||||||
|
position = {
|
||||||
|
row = "61%",
|
||||||
|
col = "50%",
|
||||||
|
},
|
||||||
|
size = {
|
||||||
|
width = 60,
|
||||||
|
height = 10,
|
||||||
|
},
|
||||||
|
border = {
|
||||||
|
style = "rounded",
|
||||||
|
padding = { 0, 1 },
|
||||||
|
},
|
||||||
|
win_options = {
|
||||||
|
winhighlight = { Normal = "Normal", FloatBorder = "DiagnosticInfo" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
40
modules/shared/files/nvim/lua/plugins/none-ls.lua
Normal file
40
modules/shared/files/nvim/lua/plugins/none-ls.lua
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"jay-babu/mason-null-ls.nvim",
|
||||||
|
event = { "BufReadPre", "BufNewFile" },
|
||||||
|
dependencies = {
|
||||||
|
"williamboman/mason.nvim",
|
||||||
|
"nvimtools/none-ls.nvim",
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
require("mason-null-ls").setup({
|
||||||
|
ensure_installed = {
|
||||||
|
"prettier", -- HTML, JS, JSON, etc.
|
||||||
|
"stylua", -- LUA
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
-- none-ls replaces null_ls... it's weird
|
||||||
|
"nvimtools/none-ls.nvim",
|
||||||
|
dependencies = { "nvim-lua/plenary.nvim" },
|
||||||
|
config = function()
|
||||||
|
local null_ls = require("null-ls")
|
||||||
|
|
||||||
|
null_ls.setup({
|
||||||
|
sources = {
|
||||||
|
null_ls.builtins.completion.spell,
|
||||||
|
null_ls.builtins.diagnostics.puppet_lint,
|
||||||
|
null_ls.builtins.diagnostics.rubocop,
|
||||||
|
null_ls.builtins.formatting.prettier,
|
||||||
|
null_ls.builtins.formatting.puppet_lint,
|
||||||
|
null_ls.builtins.formatting.rubocop,
|
||||||
|
null_ls.builtins.formatting.stylua,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<leader>gf", vim.lsp.buf.format, {})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
return {
|
||||||
|
"nvim-tree/nvim-web-devicons",
|
||||||
|
config = true,
|
||||||
|
}
|
||||||
40
modules/shared/files/nvim/lua/plugins/telescope.lua
Normal file
40
modules/shared/files/nvim/lua/plugins/telescope.lua
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"nvim-telescope/telescope.nvim",
|
||||||
|
tag = "0.1.5",
|
||||||
|
dependencies = { "nvim-lua/plenary.nvim" },
|
||||||
|
config = function()
|
||||||
|
-- This is your opts table
|
||||||
|
require("telescope").setup({
|
||||||
|
extensions = {
|
||||||
|
["ui-select"] = {
|
||||||
|
require("telescope.themes").get_dropdown({
|
||||||
|
-- even more opts
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
-- load_extension, somewhere after setup function:
|
||||||
|
require("telescope").load_extension("cheat")
|
||||||
|
require("telescope").load_extension("ui-select")
|
||||||
|
|
||||||
|
local builtin = require("telescope.builtin")
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<leader>ts", ":Telescope<CR>")
|
||||||
|
vim.keymap.set("n", "<C-p>", builtin.find_files, {})
|
||||||
|
vim.keymap.set("n", "<leader><leader>", builtin.oldfiles, {})
|
||||||
|
vim.keymap.set("n", "<leader>fg", builtin.live_grep, {})
|
||||||
|
vim.keymap.set("n", "<leader>fh", builtin.help_tags, {})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nvim-telescope/telescope-cheat.nvim",
|
||||||
|
dependencies = {
|
||||||
|
"kkharji/sqlite.lua",
|
||||||
|
"nvim-telescope/telescope.nvim",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{ "nvim-telescope/telescope-symbols.nvim" },
|
||||||
|
{ "nvim-telescope/telescope-ui-select.nvim" },
|
||||||
|
}
|
||||||
9
modules/shared/files/nvim/lua/plugins/todo-comments.lua
Normal file
9
modules/shared/files/nvim/lua/plugins/todo-comments.lua
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
return {
|
||||||
|
"folke/todo-comments.nvim",
|
||||||
|
dependencies = { "nvim-lua/plenary.nvim" },
|
||||||
|
opts = {
|
||||||
|
-- your configuration comes here
|
||||||
|
-- or leave it empty to use the default settings
|
||||||
|
-- refer to the configuration section below
|
||||||
|
},
|
||||||
|
}
|
||||||
5
modules/shared/files/nvim/lua/plugins/toggleterm.lua
Normal file
5
modules/shared/files/nvim/lua/plugins/toggleterm.lua
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
return {
|
||||||
|
"akinsho/toggleterm.nvim",
|
||||||
|
version = "*",
|
||||||
|
config = true,
|
||||||
|
}
|
||||||
53
modules/shared/files/nvim/lua/plugins/treesitter.lua
Normal file
53
modules/shared/files/nvim/lua/plugins/treesitter.lua
Normal file
|
|
@ -0,0 +1,53 @@
|
||||||
|
return {
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
build = ":TSUpdate",
|
||||||
|
config = function()
|
||||||
|
local config = require("nvim-treesitter.configs")
|
||||||
|
config.setup({
|
||||||
|
auto_install = true,
|
||||||
|
highlight = { enable = true },
|
||||||
|
indent = { enable = true },
|
||||||
|
sync_install = false,
|
||||||
|
ensure_installed = {
|
||||||
|
"bash",
|
||||||
|
"css",
|
||||||
|
"csv",
|
||||||
|
"diff",
|
||||||
|
"dockerfile",
|
||||||
|
"git_config",
|
||||||
|
"git_rebase",
|
||||||
|
"gitattributes",
|
||||||
|
"gitignore",
|
||||||
|
"go",
|
||||||
|
"hcl",
|
||||||
|
"hocon",
|
||||||
|
"html",
|
||||||
|
"javascript",
|
||||||
|
"json",
|
||||||
|
"lua",
|
||||||
|
"make",
|
||||||
|
"markdown",
|
||||||
|
"markdown_inline",
|
||||||
|
"nix",
|
||||||
|
"passwd",
|
||||||
|
"promql",
|
||||||
|
"puppet",
|
||||||
|
"python",
|
||||||
|
"regex",
|
||||||
|
--"pip_requirements",
|
||||||
|
"ruby",
|
||||||
|
"sql",
|
||||||
|
"ssh_config",
|
||||||
|
"terraform",
|
||||||
|
"toml",
|
||||||
|
"tsv",
|
||||||
|
"typescript",
|
||||||
|
"udev",
|
||||||
|
"vim",
|
||||||
|
"vimdoc",
|
||||||
|
"xml",
|
||||||
|
"yaml",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
5
modules/shared/files/nvim/lua/plugins/trouble.lua
Normal file
5
modules/shared/files/nvim/lua/plugins/trouble.lua
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
return {
|
||||||
|
"folke/trouble.nvim",
|
||||||
|
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||||
|
config = true,
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
return {
|
||||||
|
"christoomey/vim-tmux-navigator",
|
||||||
|
}
|
||||||
4
modules/shared/files/nvim/lua/plugins/which-key.lua
Normal file
4
modules/shared/files/nvim/lua/plugins/which-key.lua
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
return {
|
||||||
|
"folke/which-key.nvim",
|
||||||
|
config = true,
|
||||||
|
}
|
||||||
|
|
@ -4,6 +4,18 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
let
|
||||||
|
sqlite_lib =
|
||||||
|
if
|
||||||
|
builtins.elem pkgs.stdenv.hostPlatform.system [
|
||||||
|
"aarch64-darwin"
|
||||||
|
"x86_64-darwin"
|
||||||
|
]
|
||||||
|
then
|
||||||
|
"libsqlite3.dylib"
|
||||||
|
else
|
||||||
|
"libsqlite3.so";
|
||||||
|
in
|
||||||
{
|
{
|
||||||
home = {
|
home = {
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
|
|
@ -62,6 +74,14 @@
|
||||||
PAGER = "less";
|
PAGER = "less";
|
||||||
};
|
};
|
||||||
file = {
|
file = {
|
||||||
|
".config/nvim/lua/config" = {
|
||||||
|
source = ../../files/nvim/lua/config;
|
||||||
|
recursive = true;
|
||||||
|
};
|
||||||
|
".config/nvim/lua/plugins" = {
|
||||||
|
source = ../../files/nvim/lua/plugins;
|
||||||
|
recursive = true;
|
||||||
|
};
|
||||||
".config/powershell/Microsoft.PowerShell_profile.ps1".source =
|
".config/powershell/Microsoft.PowerShell_profile.ps1".source =
|
||||||
../../files/Microsoft.PowerShell_profile.ps1;
|
../../files/Microsoft.PowerShell_profile.ps1;
|
||||||
".config/powershell/Microsoft.VSCode_profile.ps1".source =
|
".config/powershell/Microsoft.VSCode_profile.ps1".source =
|
||||||
|
|
@ -110,7 +130,6 @@
|
||||||
};
|
};
|
||||||
eza.enable = true;
|
eza.enable = true;
|
||||||
fzf.enable = true;
|
fzf.enable = true;
|
||||||
genebean-neovim.enable = true;
|
|
||||||
gh.enable = true;
|
gh.enable = true;
|
||||||
git = {
|
git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -151,6 +170,38 @@
|
||||||
}; # end git
|
}; # end git
|
||||||
irssi.enable = true;
|
irssi.enable = true;
|
||||||
jq.enable = true;
|
jq.enable = true;
|
||||||
|
neovim = {
|
||||||
|
enable = true;
|
||||||
|
defaultEditor = true;
|
||||||
|
extraLuaConfig = ''
|
||||||
|
-- NOTE: This will get the OS from Lua:
|
||||||
|
-- print(vim.loop.os_uname().sysname)
|
||||||
|
|
||||||
|
-- setup lazy.nvim
|
||||||
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
|
||||||
|
-- hack to deal with bug in telescope-cheat.nvim
|
||||||
|
-- https://github.com/nvim-telescope/telescope-cheat.nvim/issues/7
|
||||||
|
local cheat_dbdir = vim.fn.stdpath "data" .. "/databases"
|
||||||
|
if not vim.loop.fs_stat(cheat_dbdir) then
|
||||||
|
vim.loop.fs_mkdir(cheat_dbdir, 493)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- load additional settings
|
||||||
|
require("config.vim-options")
|
||||||
|
require("lazy").setup("plugins")
|
||||||
|
|
||||||
|
-- tell sqlite.lua where to find the bits it needs
|
||||||
|
vim.g.sqlite_clib_path = '${pkgs.sqlite.out}/lib/${sqlite_lib}'
|
||||||
|
|
||||||
|
'';
|
||||||
|
extraPackages = with pkgs; [
|
||||||
|
gcc # needed so treesitter can do compiling
|
||||||
|
sqlite # needed by sqlite.lua used by telescope-cheat
|
||||||
|
];
|
||||||
|
plugins = [ pkgs.vimPlugins.lazy-nvim ]; # let lazy.nvim manage every other plugin
|
||||||
|
};
|
||||||
nh = {
|
nh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
flake = "${config.home.homeDirectory}/repos/dots";
|
flake = "${config.home.homeDirectory}/repos/dots";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue