From fea98efeba80337cdb140b372b62fef5478dc0e9 Mon Sep 17 00:00:00 2001 From: Jeremy Date: Fri, 30 Oct 2026 02:23:11 -0400 Subject: [PATCH] c conf --- client-configuration.nix | 10 +++++++-- flake.lock | 12 +++++------ nvim.nix | 7 +++++++ nvim/lua/config/lazy.lua | 2 ++ nvim/lua/plugins/bash.lua | 38 +++++++++++++++++++++++++++++++++++ nvim/lua/plugins/clangd.lua | 21 +++++++++++++++++++ nvim/lua/plugins/img-clip.lua | 19 ++++++++++++++++++ 7 files changed, 101 insertions(+), 8 deletions(-) create mode 100644 nvim/lua/plugins/bash.lua create mode 100644 nvim/lua/plugins/clangd.lua create mode 100644 nvim/lua/plugins/img-clip.lua diff --git a/client-configuration.nix b/client-configuration.nix index aa07d9e..f3c00f3 100644 --- a/client-configuration.nix +++ b/client-configuration.nix @@ -189,8 +189,8 @@ #", Print, exec, grimblast --freeze copy area" #"SHIFT, Print, exec, grimblast copy screen" - ", Print, exec, mkdir -p ~/Pictures/Screenshots && grimblast --freeze copy area ~/Pictures/Screenshots/$(date +%Y-%m-%d_%H-%M-%S).png" - "$mod, Print, exec, mkdir -p ~/Pictures/Screenshots && grimblast save screen ~/Pictures/Screenshots/$(date +%Y-%m-%d_%H-%M-%S).png" + ", Print, exec, grimblast --freeze copysave area ~/screenshot.png" + "$mod, Print, exec, grimblast copysave screen ~/screenshot.png" "$mod SHIFT, Escape, exec, systemctl suspend" ]; @@ -386,6 +386,12 @@ rust-analyzer cargo rustc + pyright + ruff + clang-tools + bash-language-server + shellcheck + shfmt ]; }; diff --git a/flake.lock b/flake.lock index 72d0949..dd669bf 100644 --- a/flake.lock +++ b/flake.lock @@ -39,11 +39,11 @@ }, "nixpkgs-2605": { "locked": { - "lastModified": 1792898606, - "narHash": "sha256-Mg3rRjsbMqhSMxop5PYMXos8SwAjejrxSgVThTvP9eg=", + "lastModified": 1793183032, + "narHash": "sha256-56mFMf8heLNfYhcgbrh4GpN5x+G9JOfTFXZC3n6w0qM=", "owner": "nixos", "repo": "nixpkgs", - "rev": "1f607aa79b6356ed45d3cd3c8079c196e79efa2c", + "rev": "08d3a97586f6b6343b3b5e799980773629432610", "type": "github" }, "original": { @@ -55,11 +55,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1792773339, - "narHash": "sha256-rZLrzrC6i+jnTAlvPZHogKDulY7WWDEv9hJeHieO7Zw=", + "lastModified": 1793110635, + "narHash": "sha256-dhoW6VgFWlaodSY5jrBn+CF2FLmaUvDVgM7+C7T2+NM=", "owner": "nixos", "repo": "nixpkgs", - "rev": "3ec636362e1816bc2f0888fa0fa2c69f1bc9e504", + "rev": "31ecbaca1bdefa45dffc409f0250bd8039ea0010", "type": "github" }, "original": { diff --git a/nvim.nix b/nvim.nix index 873be6a..2a321e9 100644 --- a/nvim.nix +++ b/nvim.nix @@ -26,5 +26,12 @@ xdg.configFile."nvim/lua/config/keymaps.lua".source = ./nvim/lua/config/keymaps.lua; xdg.configFile."nvim/lua/config/autocmds.lua".source = ./nvim/lua/config/autocmds.lua; xdg.configFile."nvim/lua/plugins/example.lua".source = ./nvim/lua/plugins/example.lua; + xdg.configFile."nvim/lua/plugins/bash.lua".source = ./nvim/lua/plugins/bash.lua; + xdg.configFile."nvim/lua/plugins/clangd.lua".source = ./nvim/lua/plugins/clangd.lua; + xdg.configFile."nvim/lua/plugins/img-clip.lua".source = ./nvim/lua/plugins/img-clip.lua; + xdg.configFile."clangd/config.yaml".text = '' + CompileFlags: + Compiler: gcc + ''; }; } diff --git a/nvim/lua/config/lazy.lua b/nvim/lua/config/lazy.lua index f19fa03..d6d3535 100644 --- a/nvim/lua/config/lazy.lua +++ b/nvim/lua/config/lazy.lua @@ -19,6 +19,8 @@ require("lazy").setup({ { "LazyVim/LazyVim", import = "lazyvim.plugins" }, { import = "lazyvim.plugins.extras.lang.typst" }, { import = "lazyvim.plugins.extras.lang.rust" }, + { import = "lazyvim.plugins.extras.lang.python" }, + { import = "lazyvim.plugins.extras.lang.clangd" }, { import = "plugins" }, }, defaults = { diff --git a/nvim/lua/plugins/bash.lua b/nvim/lua/plugins/bash.lua new file mode 100644 index 0000000..5027717 --- /dev/null +++ b/nvim/lua/plugins/bash.lua @@ -0,0 +1,38 @@ +return { + { + "nvim-treesitter/nvim-treesitter", + opts = function(_, opts) + if type(opts.ensure_installed) == "table" then + vim.list_extend(opts.ensure_installed, { "bash" }) + end + end, + }, + { + "neovim/nvim-lspconfig", + opts = { + servers = { + bashls = { + filetypes = { "sh", "bash", "zsh" }, + }, + }, + }, + }, + { + "stevearc/conform.nvim", + opts = { + formatters_by_ft = { + sh = { "shfmt" }, + bash = { "shfmt" }, + }, + }, + }, + { + "mfussenegger/nvim-lint", + opts = { + linters_by_ft = { + sh = { "shellcheck" }, + bash = { "shellcheck" }, + }, + }, + }, +} diff --git a/nvim/lua/plugins/clangd.lua b/nvim/lua/plugins/clangd.lua new file mode 100644 index 0000000..3e9f07a --- /dev/null +++ b/nvim/lua/plugins/clangd.lua @@ -0,0 +1,21 @@ +return { + { + "neovim/nvim-lspconfig", + opts = { + servers = { + clangd = { + cmd = { + "clangd", + "--background-index", + "--clang-tidy", + "--header-insertion=iwyu", + "--completion-style=detailed", + "--function-arg-placeholders", + "--fallback-style=llvm", + "--query-driver=/etc/profiles/per-user/*/bin/gcc,/etc/profiles/per-user/*/bin/g++,/run/current-system/sw/bin/gcc,/run/current-system/sw/bin/g++,/nix/store/*/bin/gcc,/nix/store/*/bin/g++", + }, + }, + }, + }, + }, +} diff --git a/nvim/lua/plugins/img-clip.lua b/nvim/lua/plugins/img-clip.lua new file mode 100644 index 0000000..c83562a --- /dev/null +++ b/nvim/lua/plugins/img-clip.lua @@ -0,0 +1,19 @@ +return { + { + "HakonHarnes/img-clip.nvim", + event = "VeryLazy", + opts = { + default = { + embed_image_as_base64 = false, + prompt_for_file_name = false, + drag_and_drop = { + insert_mode = true, + }, + use_absolute_path = true, + }, + }, + keys = { + { "p", "PasteImage", desc = "Paste image from system clipboard" }, + }, + }, +}