Merge branch 'pc' of server:/nico/nix-files into pc

This commit is contained in:
Nico
2025-11-28 17:17:03 +01:00
32 changed files with 1635 additions and 145 deletions

View File

@@ -9,12 +9,13 @@
./waybar
./wpaperd
./nvim
./emacs
# ./emacs
./terminal
./rofi
./fuzzel
./niri
./hyprland
./zed-editor
# ./tmux
# ./vscode
];

View File

@@ -1,3 +1,11 @@
cursor {
xcursor-theme "Banana-Blue"
xcursor-size 30
}
// This config is in the KDL format: https://kdl.dev
// "/-" comments out the following node.
// Check the wiki for a full description of the configuration:
@@ -366,6 +374,7 @@ binds {
// Mod+M hotkey-overlay-title="Run an Application: rofi" { spawn "rofi" "-show" "drun"; }
Super+Alt+L hotkey-overlay-title="Power menu" { spawn "rofi" "-show" "power-menu" "-modi" "power-menu:rofi-power-menu"; }
Super+V hotkey-overlay-title="Clipboard history" { spawn "bash" "-c" "cliphist list | fuzzel -d | cliphist decode | wl-copy"; }
Super+E hotkey-overlay-title="Umlaute" { spawn "bash" "-c" "echo 'ä\nö\nü\nß\nÄ\nÖ\nÜ' | fuzzel -d | wl-copy"; }
// You can also use a shell. Do this if you need pipes, multiple commands, etc.
// Note: the entire command goes as a single argument in the end.

View File

@@ -32,7 +32,8 @@ programs.neovim.plugins = [
# ".config/nvim/lua/plugins/coq.lua".source = ./lua/plugins/coq.lua;
".config/nvim/lua/plugins/blink-cmp.lua".source = ./lua/plugins/blink-cmp.lua;
".config/nvim/lua/plugins/lsp.lua".source = ./lua/plugins/lsp.lua;
# ".config/nvim/lua/plugins/mason.lua".source = ./lua/plugins/mason.lua;
".config/nvim/lua/plugins/mason.lua".source = ./lua/plugins/mason.lua;
".config/nvim/lua/plugins/mason-lspconfig.lua".source = ./lua/plugins/mason-lspconfig.lua;
# ".config/nvim/lua/plugins/treesitter.lua".source = ./lua/plugins/treesitter.lua;
".config/nvim/lua/plugins/catppuccin.lua".source = ./lua/plugins/catppuccin.lua;
".config/nvim/lua/plugins/telescope.lua".source = ./lua/plugins/telescope.lua;
@@ -44,7 +45,7 @@ programs.neovim.plugins = [
".config/nvim/lua/plugins/trouble.lua".source = ./lua/plugins/trouble.lua;
".config/nvim/lua/plugins/dap.lua".source = ./lua/plugins/dap.lua;
".config/nvim/lua/plugins/blankline.lua".source = ./lua/plugins/blankline.lua;
".config/nvim/lua/plugins/rustaceanvim.lua".source = ./lua/plugins/rustaceanvim.lua;
# ".config/nvim/lua/plugins/rustaceanvim.lua".source = ./lua/plugins/rustaceanvim.lua;
".config/nvim/lua/plugins/lazygit.lua".source = ./lua/plugins/lazygit.lua;
".config/nvim/lua/plugins/toggleterm.lua".source = ./lua/plugins/toggleterm.lua;
".config/nvim/lua/plugins/love.lua".source = ./lua/plugins/love.lua;
@@ -57,6 +58,8 @@ programs.neovim.plugins = [
".config/nvim/lua/plugins/tiny-inline-diagnostic.lua".source = ./lua/plugins/tiny-inline-diagnostic.lua;
".config/nvim/lua/plugins/conform.lua".source = ./lua/plugins/conform.lua;
".config/nvim/lua/plugins/nvim-tree.lua".source = ./lua/plugins/nvim-tree.lua;
".config/nvim/lua/plugins/notify.lua".source = ./lua/plugins/notify.lua;
# ".config/nvim/lua/plugins/go.lua".source = ./lua/plugins/go.lua;
# ".config/nvim/lua/plugins/typst.lua".source = ./lua/plugins/typst.lua;

View File

@@ -112,13 +112,6 @@ dap.configurations.rust = dap.configurations.gdb
--------------------------------------------
local builtin = require("telescope.builtin")
local conform = require("conform")
-- Rust binds
vim.keymap.set("n", "<leader>rrr", ":RustRun<CR>", { desc = "Run rust program" })
vim.keymap.set("n", "<leader>rd", ":RustLsp debug<CR>", { desc = "Debug rust program" })
vim.keymap.set("n", "<leader>rh", ":RustLsp hover actions<CR>", { desc = "rust hover actions" })
vim.keymap.set("n", "<leader>re", ":RustLsp explainError<CR>", { desc = "explain rust error" })
vim.keymap.set("n", "<leader>rs", ":RustLsp openDocs<CR>", { desc = "open rust docs for symbol under cursor" })
vim.keymap.set("n", "<leader>rrn", ":RustLsp ssr ", { desc = "rust rename" })
-- Love binds
vim.keymap.set("n", "<leader>lr", ":LoveRun<CR>", { desc = "Love run" })
-- Telescope binds
@@ -145,7 +138,7 @@ vim.keymap.set("n", "<leader>tt", ":ToggleTerm direction=tab size=50 <CR>", { de
vim.keymap.set("n", "<leader>tv", ":ToggleTerm direction=vertical <CR>", { desc = "Open terminal vertical" })
vim.keymap.set("n", "<leader>ts", ":ToggleTerm direction=vertical <CR>", { desc = "select open terminal" })
-- file explorer binds (nvim-tree)
vim.keymap.set("n", "<leader>fe", ":NvimTreeToggle <CR>", { desc = "select open terminal" })
vim.keymap.set("n", "<leader>fe", ":NvimTreeToggle <CR>", { desc = "Toggle nvim tree" })
-- code actions
vim.keymap.set("n", "<leader>ca", function()
require("tiny-code-action").code_action()
@@ -154,3 +147,5 @@ end, { desc = "Show code actions", noremap = true, silent = true })
-- disable annoying inline type things
vim.lsp.inlay_hint.enable(false)
vim.diagnostic.config({virtual_text = false})

View File

@@ -1,32 +1,70 @@
return {
'neovim/nvim-lspconfig',
dependencies = { 'saghen/blink.cmp' },
config = function(_,_)
-- example using `opts` for defining servers
opts = {
servers = {
lua_ls = {},
nil_ls = {},
-- vue_ls = {},
-- rust_analyzer = {},
-- gopls = {},
local vue_language_server_path = vim.fn.expand '$MASON/packages' .. '/vue-language-server' .. '/node_modules/@vue/language-server'
local tsserver_filetypes = { 'typescript', 'javascript', 'javascriptreact', 'typescriptreact', 'vue' }
local vue_plugin = {
name = '@vue/typescript-plugin',
location = vue_language_server_path,
languages = { 'vue' },
configNamespace = 'typescript',
}
},
config = function(_, opts)
local lspconfig = require('lspconfig')
for server, config in pairs(opts.servers) do
-- passing config.capabilities to blink.cmp merges with the capabilities in your
-- `opts[server].capabilities, if you've defined it
config.capabilities = require('blink.cmp').get_lsp_capabilities(config.capabilities)
lspconfig[server].setup(config)
end
local vtsls_config = {
settings = {
vtsls = {
tsserver = {
globalPlugins = {
vue_plugin,
},
},
},
},
filetypes = tsserver_filetypes,
}
local ts_ls_config = {
init_options = {
plugins = {
vue_plugin,
},
},
filetypes = tsserver_filetypes,
}
-- If you are on most recent `nvim-lspconfig`
local vue_ls_config = {}
-- nvim 0.11 or above
vim.lsp.config('vtsls', vtsls_config)
vim.lsp.config('vue_ls', vue_ls_config)
vim.lsp.config('lua_ls', {})
-- vim.lsp.config('rust_analyzer', {})
vim.lsp.enable({'vtsls', 'vue_ls', 'lua_ls'})
end
-- -- example calling setup directly for each LSP
-- config = function()
-- local capabilities = require('blink.cmp').get_lsp_capabilities()
-- local lspconfig = require('lspconfig')
--
-- lspconfig['lua_ls'].setup({ capabilities = capabilities })
-- end
-- opts = {
-- servers = {
-- lua_ls = {},
-- nil_ls = {},
-- vstls = {},
-- vue_ls = {},
-- -- rust_analyzer = {},
-- -- gopls = {},
-- }
-- },
-- config = function(_, opts)
-- for server, config in pairs(opts.servers) do
-- config.capabilities = require('blink.cmp').get_lsp_capabilities(config.capabilities)
--
-- -- Verwende `vim.lsp.config` um die Konfiguration anzupassen
-- vim.lsp.config(server, config)
--
-- -- Aktiviere die Konfiguration
-- vim.lsp.enable(server)
-- end
-- end
}

View File

@@ -0,0 +1,8 @@
return {
"mason-org/mason-lspconfig.nvim",
opts = {},
dependencies = {
{ "mason-org/mason.nvim", opts = {} },
"neovim/nvim-lspconfig",
},
}

View File

@@ -1,37 +1,46 @@
return {
"williamboman/mason.nvim",
cmd = "Mason",
keys = { { "<leader>cm", "<cmd>Mason<cr>", desc = "Mason" } },
build = ":MasonUpdate",
opts_extend = { "ensure_installed" },
opts = {
ensure_installed = {
"stylua",
"shfmt",
},
},
---@param opts MasonSettings | {ensure_installed: string[]}
config = function(_, opts)
require("mason").setup(opts)
local mr = require("mason-registry")
mr:on("package:install:success", function()
vim.defer_fn(function()
-- trigger FileType event to possibly load this newly installed LSP server
require("lazy.core.handler.event").trigger({
event = "FileType",
buf = vim.api.nvim_get_current_buf(),
})
end, 100)
end)
mr.refresh(function()
for _, tool in ipairs(opts.ensure_installed) do
local p = mr.get_package(tool)
if not p:is_installed() then
p:install()
end
end
end)
end,
"mason-org/mason.nvim",
config = function ()
require("mason").setup()
end
}
-- return {
--
-- "williamboman/mason.nvim",
-- cmd = "Mason",
-- keys = { { "<leader>cm", "<cmd>Mason<cr>", desc = "Mason" } },
-- build = ":MasonUpdate",
-- opts_extend = { "ensure_installed" },
-- opts = {
-- ensure_installed = {
-- -- "stylua",
-- -- "shfmt",
-- },
-- },
-- ---@param opts MasonSettings | {ensure_installed: string[]}
-- config = function(_, opts)
-- require("mason").setup(opts)
-- local mr = require("mason-registry")
-- mr:on("package:install:success", function()
-- vim.defer_fn(function()
-- -- trigger FileType event to possibly load this newly installed LSP server
-- require("lazy.core.handler.event").trigger({
-- event = "FileType",
-- buf = vim.api.nvim_get_current_buf(),
-- })
-- end, 100)
-- end)
--
-- mr.refresh(function()
-- for _, tool in ipairs(opts.ensure_installed) do
-- local p = mr.get_package(tool)
-- if not p:is_installed() then
-- p:install()
-- end
-- end
-- end)
-- end,
-- }

View File

@@ -0,0 +1,6 @@
return {
"rcarriga/nvim-notify",
config = function ()
vim.notify = require("notify")
end
}

View File

@@ -1,5 +1,29 @@
return {
'mrcjkb/rustaceanvim',
version = '^6', -- Recommended
lazy = false, -- This plugin is already lazy
"mrcjkb/rustaceanvim",
version = "^6", -- Recommended
lazy = false, -- This plugin is already lazy
keys = {
{ "<leader>rrr", ":RustRun<CR>", desc = "Rust run" },
{"<leader>rd", ":RustLsp debug<CR>", desc = "Debug rust program" },
{"<leader>rh", ":RustLsp hover actions<CR>", desc = "rust hover actions" },
{"<leader>re", ":RustLsp explainError<CR>", desc = "explain rust error" },
{"<leader>rs", ":RustLsp openDocs<CR>",desc = "open rust docs for symbol under cursor" },
{"<leader>rrn", ":RustLsp ssr ", desc = "rust rename" }
},
-- opts = {
-- function()
-- vim.keymap.set("n", "<leader>rrr", ":RustRun<CR>", { desc = "Run rust program" })
-- vim.keymap.set("n", "<leader>rd", ":RustLsp debug<CR>", { desc = "Debug rust program" })
-- vim.keymap.set("n", "<leader>rh", ":RustLsp hover actions<CR>", { desc = "rust hover actions" })
-- vim.keymap.set("n", "<leader>re", ":RustLsp explainError<CR>", { desc = "explain rust error" })
-- vim.keymap.set(
-- "n",
-- "<leader>rs",
-- ":RustLsp openDocs<CR>",
-- { desc = "open rust docs for symbol under cursor" }
-- )
-- vim.keymap.set("n", "<leader>rrn", ":RustLsp ssr ", { desc = "rust rename" })
-- end,
-- },
}

View File

@@ -15,9 +15,9 @@ set preview_images_method kitty
programs.git = {
enable = true;
userName = "Nico";
userEmail = "nicovessen@gmail.com";
extraConfig = {
settings.user.name = "Nico";
settings.user.email = "nico@getmemy.coffee";
settings.extraConfig = {
safe.directory = "/etc/nixos";
};
};

0
packages/settings.json Normal file
View File

View File

@@ -48,8 +48,11 @@ programs.zsh = {
initContent = ''
eval "$(starship init zsh)"
export NIX_LD=$(nix eval --impure --raw --expr 'let pkgs = import <nixpkgs> {}; NIX_LD = pkgs.lib.fileContents "${pkgs.stdenv.cc}/nix-support/dynamic-linker"; in NIX_LD')
'';
zplug = {
enable = false;
plugins = [

View File

@@ -0,0 +1,54 @@
{pkgs, lib, ... }:
{
home.file."/home/nico/.config/zed/settings.json" = {
source = ./settings.json;
};
programs.zed-editor = {
enable = true;
};
# ## This populates the userSettings "auto_install_extensions"
# extensions = ["nix" "Catppuccin"];
#
# ## everything inside of these brackets are Zed options.
# userSettings = {
# assistant = {
# enabled = false;
# };
#
# hour_format = "hour24";
# auto_update = false;
# lsp = {
# rust-analyzer = {
# binary = {
# path_lookup = true;
# };
# };
# nix = {
# binary = {
# path_lookup = true;
# };
# };
# };
#
#
# languages = {
# };
#
# vim_mode = true;
# ## tell zed to use direnv and direnv can use a flake.nix enviroment.
# load_direnv = "shell_hook";
# base_keymap = "VSCode";
# theme = {
# mode = "dark";
# light = "Catppuccin frappe";
# dark = "Catppuccin mocha";
# };
# show_whitespaces = "all" ;
# ui_font_size = 16;
# buffer_font_size = 16;
#
# };
#
# };
}

View File

@@ -0,0 +1,57 @@
{
"diagnostics": {
"include_warnings": true,
"inline": {
"enabled": true
}
},
"git": {
"inline_blame": {
"enabled": false
}
},
"ssh_connections": [
{
"host": "localhost",
"projects": [
{
"paths": [
"/home/dev/ids/prog"
]
}
]
}
],
"agent": {
"enabled": true
},
"auto_update": false,
"base_keymap": "VSCode",
"buffer_font_size": 16,
"hour_format": "hour24",
"languages": {},
"load_direnv": "shell_hook",
"lsp": {
"nix": {
"binary": {
"path_lookup": true
}
},
"rust-analyzer": {
"binary": {
"path_lookup": true
}
}
},
"show_whitespaces": "all",
"theme": {
"dark": "Catppuccin Mocha",
"light": "Catppuccin frappe",
"mode": "system"
},
"features": {
"edit_prediction_provider": "none"
},
"ui_font_size": 16,
"vim_mode": true
}