From 003ab2fff752d8ab8ab818839c589ca997c9dc6b Mon Sep 17 00:00:00 2001 From: dichgrem Date: Wed, 19 Nov 2025 21:13:31 +0800 Subject: [PATCH] chore:env_add_android chore:add_gh&&fix_git-full --- home/cli/git.nix | 12 ++++++++++++ home/nvim/default.nix | 12 ++++++++++-- home/nvim/lua/plugins/format.lua | 11 +++++++++++ modules/system/environment.nix | 8 ++++---- 4 files changed, 37 insertions(+), 6 deletions(-) create mode 100644 home/cli/git.nix diff --git a/home/cli/git.nix b/home/cli/git.nix new file mode 100644 index 0000000..82b5c18 --- /dev/null +++ b/home/cli/git.nix @@ -0,0 +1,12 @@ +{ pkgs, ... }: { + programs.git = { + enable = true; + package = pkgs.gitFull; + }; + + programs.gh.enable = true; + + home.packages = with pkgs; [ + git-filter-repo + ]; +} diff --git a/home/nvim/default.nix b/home/nvim/default.nix index c576a18..ab64738 100644 --- a/home/nvim/default.nix +++ b/home/nvim/default.nix @@ -35,6 +35,10 @@ #C/C++ clang-tools + #Kotlin + ktlint + kotlin-language-server + #Python ruff black @@ -177,6 +181,8 @@ { import = "lazyvim.plugins.extras.lang.yaml" }, { import = "lazyvim.plugins.extras.lang.toml" }, { import = "lazyvim.plugins.extras.lang.docker" }, + { import = "lazyvim.plugins.extras.lang.kotlin" }, + { import = "lazyvim.plugins.extras.lang.dart" }, { import = "plugins" }, -- treesitter handled by xdg.configFile."nvim/parser", put this line at the end of spec to clear ensure_installed { "nvim-treesitter/nvim-treesitter", @@ -199,11 +205,13 @@ with plugins; [ bash c - lua - python go + lua rust java + dart + kotlin + python javascript typescript tsx diff --git a/home/nvim/lua/plugins/format.lua b/home/nvim/lua/plugins/format.lua index 1cdda20..a07089e 100644 --- a/home/nvim/lua/plugins/format.lua +++ b/home/nvim/lua/plugins/format.lua @@ -29,6 +29,8 @@ return { -- C/C++ opts.formatters_by_ft.c = { "clang_format" } opts.formatters_by_ft.cpp = { "clang_format" } + -- Kotlin + opts.formatters_by_ft.kotlin = { "ktlint" } -- Python opts.formatters_by_ft.python = { "black", "ruff_format" } -- JS/TS/Web @@ -43,6 +45,15 @@ return { opts.formatters_by_ft.yaml = { "yamlfmt" } -- TOML opts.formatters_by_ft.toml = { "taplo" } + -- Dart / Flutter + opts.formatters_by_ft.dart = { + command = "dart", + args = function(ctx) + return { "format", ctx.bufname } + end, + stdin = false, + exit_codes = { 0 }, + } opts.default_format_opts = { timeout_ms = 1500, lsp_format = "fallback", diff --git a/modules/system/environment.nix b/modules/system/environment.nix index af4c924..3778f94 100644 --- a/modules/system/environment.nix +++ b/modules/system/environment.nix @@ -67,6 +67,7 @@ in { libvirt lm_sensors usbutils + libsecret # Niri wlr-randr @@ -82,6 +83,9 @@ in { gnumake rustc cargo + dart + kotlin + flutter jdk17 python312 pnpm @@ -92,10 +96,6 @@ in { programs = { dconf.enable = true; fuse.userAllowOther = true; - git = { - enable = true; - package = pkgs.gitFull; - }; ssh.startAgent = true; }; }