nvim stuff
This commit is contained in:
@@ -1,9 +1,4 @@
|
||||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
{pkgs, ...}: {
|
||||
programs.bat = {
|
||||
enable = true;
|
||||
config = {
|
||||
|
||||
@@ -1,14 +1,9 @@
|
||||
{
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
{...}: let
|
||||
name = "Christoph Schmatzler";
|
||||
in
|
||||
{
|
||||
in {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
ignores = [ "*.swp" ];
|
||||
ignores = ["*.swp"];
|
||||
userName = name;
|
||||
lfs = {
|
||||
enable = true;
|
||||
|
||||
35
profiles/base/home-manager/neovim/autocmd.nix
Normal file
35
profiles/base/home-manager/neovim/autocmd.nix
Normal file
@@ -0,0 +1,35 @@
|
||||
{
|
||||
programs.nixvim = {
|
||||
autoGroups = {
|
||||
Christoph = {};
|
||||
};
|
||||
|
||||
autoCmd = [
|
||||
{
|
||||
event = "BufWritePre";
|
||||
group = "Christoph";
|
||||
pattern = "*";
|
||||
command = "%s/\\s\\+$//e";
|
||||
}
|
||||
{
|
||||
event = "LspAttach";
|
||||
group = "Christoph";
|
||||
callback.__raw = ''
|
||||
function(e)
|
||||
local opts = { buffer = e.buf }
|
||||
vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts)
|
||||
vim.keymap.set("n", "K", function() vim.lsp.buf.hover() end, opts)
|
||||
vim.keymap.set("n", "<leader>vws", function() vim.lsp.buf.workspace_symbol() end, opts)
|
||||
vim.keymap.set("n", "<leader>vd", function() vim.diagnostic.open_float() end, opts)
|
||||
vim.keymap.set("n", "<leader>vca", function() vim.lsp.buf.code_action() end, opts)
|
||||
vim.keymap.set("n", "<leader>vrr", function() vim.lsp.buf.references() end, opts)
|
||||
vim.keymap.set("n", "<leader>vrn", function() vim.lsp.buf.rename() end, opts)
|
||||
vim.keymap.set("i", "<C-h>", function() vim.lsp.buf.signature_help() end, opts)
|
||||
vim.keymap.set("n", "[d", function() vim.diagnostic.goto_next() end, opts)
|
||||
vim.keymap.set("n", "]d", function() vim.diagnostic.goto_prev() end, opts)
|
||||
end
|
||||
'';
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,7 +1,10 @@
|
||||
{
|
||||
{pkgs, ...}: {
|
||||
imports = [
|
||||
./options.nix
|
||||
./autocmd.nix
|
||||
./plugins/conform.nix
|
||||
./plugins/mini.nix
|
||||
./plugins/oil.nix
|
||||
./plugins/treesitter.nix
|
||||
./plugins/which-key.nix
|
||||
];
|
||||
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
{ }
|
||||
14
profiles/base/home-manager/neovim/plugins/conform.nix
Normal file
14
profiles/base/home-manager/neovim/plugins/conform.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
programs.nixvim.plugins.conform-nvim = {
|
||||
enable = true;
|
||||
settings = {
|
||||
format_on_save = {};
|
||||
formatters_by_ft = {
|
||||
nix = ["alejandra"];
|
||||
javascript = ["prettier"];
|
||||
typescript = ["prettier"];
|
||||
elixir = ["mix"];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
59
profiles/base/home-manager/neovim/plugins/mini.nix
Normal file
59
profiles/base/home-manager/neovim/plugins/mini.nix
Normal file
@@ -0,0 +1,59 @@
|
||||
{
|
||||
programs.nixvim.plugins.mini = {
|
||||
enable = true;
|
||||
modules = {
|
||||
basics = {
|
||||
options = {
|
||||
basic = true;
|
||||
extra_ui = true;
|
||||
win_ui_borders = "dot";
|
||||
};
|
||||
mappings = {
|
||||
basic = true;
|
||||
windows = true;
|
||||
move_with_alt = true;
|
||||
};
|
||||
autocommands = {
|
||||
basic = true;
|
||||
};
|
||||
};
|
||||
icons = {};
|
||||
notify = {};
|
||||
sessions = {};
|
||||
statusline = {};
|
||||
extra = {};
|
||||
ai = {
|
||||
custom_textobjects = {
|
||||
B.__raw = "require('mini.extra').gen_ai_spec.buffer()";
|
||||
F.__raw = "require('mini.ai').gen_spec.treesitter({ a = '@function.outer', i = '@function.inner' })";
|
||||
};
|
||||
};
|
||||
align = {};
|
||||
bracketed = {};
|
||||
bufremove = {};
|
||||
comment = {};
|
||||
completion = {
|
||||
lsp_completion = {
|
||||
source_func = "omnifunc";
|
||||
};
|
||||
};
|
||||
pick = {};
|
||||
surround = {};
|
||||
};
|
||||
};
|
||||
|
||||
programs.nixvim.keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>ff";
|
||||
action = ":Pick files<CR>";
|
||||
options.desc = "Search files";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>/";
|
||||
action = ":Pick grep_live<CR>";
|
||||
options.desc = "Grep";
|
||||
}
|
||||
];
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
{
|
||||
programs.nixvim.plugins.oil = {
|
||||
enable = true;
|
||||
autoLoad = true;
|
||||
settings = {
|
||||
columns = [
|
||||
"icon"
|
||||
|
||||
17
profiles/base/home-manager/neovim/plugins/treesitter.nix
Normal file
17
profiles/base/home-manager/neovim/plugins/treesitter.nix
Normal file
@@ -0,0 +1,17 @@
|
||||
{pkgs, ...}: {
|
||||
programs.nixvim.plugins.treesitter = {
|
||||
enable = true;
|
||||
settings = {
|
||||
highlight.enable = true;
|
||||
indent.enable = true;
|
||||
};
|
||||
grammarPackages = with pkgs.vimPlugins.nvim-treesitter.builtGrammars; [
|
||||
bash
|
||||
fish
|
||||
json
|
||||
nix
|
||||
toml
|
||||
yaml
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -3,9 +3,7 @@
|
||||
lib,
|
||||
user,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
}: {
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
includes = [
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
{
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
{lib, ...}: {
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
{pkgs, ...}: {
|
||||
programs.zellij = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
|
||||
Reference in New Issue
Block a user