Compare commits
7 Commits
4c29259470
...
5839f63ad5
| Author | SHA1 | Date | |
|---|---|---|---|
| 5839f63ad5 | |||
| dbfcacb6e7 | |||
| c620d32c51 | |||
| aa80055d58 | |||
| 6e1547ae48 | |||
| f2b2302f61 | |||
| f357586217 |
128
flake.lock
generated
128
flake.lock
generated
@@ -114,11 +114,11 @@
|
|||||||
},
|
},
|
||||||
"den": {
|
"den": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1773295801,
|
"lastModified": 1773344028,
|
||||||
"narHash": "sha256-Wzk6tz4K8lID2El0BG3F3JLFPEx6P74E3UyJwBlE+I0=",
|
"narHash": "sha256-11LNYUxMqV1X/AwNURpGpJWnKYNiwQGnFSQof/pZ8S8=",
|
||||||
"owner": "vic",
|
"owner": "vic",
|
||||||
"repo": "den",
|
"repo": "den",
|
||||||
"rev": "7c781f55d26fe40d84961557aa2e1e9480cee93e",
|
"rev": "edaa0b03639ec6485f6862c035ed10974d8f0008",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -237,11 +237,11 @@
|
|||||||
},
|
},
|
||||||
"flake-aspects": {
|
"flake-aspects": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1773272797,
|
"lastModified": 1773339018,
|
||||||
"narHash": "sha256-sSdYZiIeo98LmdnCR5GMN8B8bsHFgWA+1l9ZEpwXrFU=",
|
"narHash": "sha256-sPPriYJpLmukixc6/KBzeOhw83OSodco5YbeayHzAgo=",
|
||||||
"owner": "vic",
|
"owner": "vic",
|
||||||
"repo": "flake-aspects",
|
"repo": "flake-aspects",
|
||||||
"rev": "cc5a09d16af05210afe01c22f6b868929a4163b6",
|
"rev": "b51a00bc0140e7708e421a64f20170a2e8ccae93",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -323,6 +323,27 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-parts_3": {
|
"flake-parts_3": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs-lib": [
|
||||||
|
"neovim-nightly-overlay",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1772408722,
|
||||||
|
"narHash": "sha256-rHuJtdcOjK7rAHpHphUb1iCvgkU3GpfvicLMwwnfMT0=",
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"rev": "f20dc5d9b8027381c474144ecabc9034d6a839a3",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-parts_4": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs-lib": [
|
"nixpkgs-lib": [
|
||||||
"nixvim",
|
"nixvim",
|
||||||
@@ -406,11 +427,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1773286336,
|
"lastModified": 1773367248,
|
||||||
"narHash": "sha256-+yFtmhOHterllxWmV6YbdevTXpJdGS0mS0UmJ0k9fh0=",
|
"narHash": "sha256-FFMc1uAwy2GYasd0rdNDVxKyAgzuoJH2M+GglBQbqf0=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "7d06e0cefe6e4a1e85b2b3274dcb0b3da242a557",
|
"rev": "be0c641a6a5564caa33982faa1fe2c60d92131c7",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -422,11 +443,11 @@
|
|||||||
"homebrew-cask": {
|
"homebrew-cask": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1773303437,
|
"lastModified": 1773390491,
|
||||||
"narHash": "sha256-grP7e0BRp8GDT28hAV5H4Pu51IDQ34913hxGldlQf70=",
|
"narHash": "sha256-pNVKLd8Z0TmhUFfoUU4+iACsWLQuhkDaQBIYsGNgcrM=",
|
||||||
"owner": "homebrew",
|
"owner": "homebrew",
|
||||||
"repo": "homebrew-cask",
|
"repo": "homebrew-cask",
|
||||||
"rev": "0300017ecdeaa28c6635c559381ff4d0e1203c86",
|
"rev": "4ebe4674412a7867b1fab47aca19d2c5098cea63",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -438,11 +459,11 @@
|
|||||||
"homebrew-core": {
|
"homebrew-core": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1773306422,
|
"lastModified": 1773390003,
|
||||||
"narHash": "sha256-EvboT0Gno/1BZ7OcaDFZ737cQr2J6amdrbpHAFbameU=",
|
"narHash": "sha256-3oEXbfs3G6oYBwviyj71BvvDt0n0k/qzHA4p+9mGpQM=",
|
||||||
"owner": "homebrew",
|
"owner": "homebrew",
|
||||||
"repo": "homebrew-core",
|
"repo": "homebrew-core",
|
||||||
"rev": "f6d9718a1bee00675755ebfbe80964990bebcfda",
|
"rev": "ea9540a5e8d64a3442b5f9708f9398130352b454",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -526,11 +547,11 @@
|
|||||||
"treefmt-nix": "treefmt-nix"
|
"treefmt-nix": "treefmt-nix"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1773302483,
|
"lastModified": 1773372117,
|
||||||
"narHash": "sha256-NFnShCTM8fsNF8dRMIgebo8oiTHMKyCEBieYon4K0Ic=",
|
"narHash": "sha256-i23+1xDYCC0Oi2RKSiGB8Qp4WLziWKDPKEaR+Q+Bdvc=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "llm-agents.nix",
|
"repo": "llm-agents.nix",
|
||||||
"rev": "dd92bb728d845be99ebfee69c1ee951dcbceb2b1",
|
"rev": "fb16f8035819135fb0dc6c276fb75a3db2da3378",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -584,6 +605,44 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"neovim-nightly-overlay": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-parts": "flake-parts_3",
|
||||||
|
"neovim-src": "neovim-src",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1773360308,
|
||||||
|
"narHash": "sha256-Asr6gDwzxvcglRaXEZSTL4lEA6braemURJc6wKBhKrs=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "neovim-nightly-overlay",
|
||||||
|
"rev": "b550599eedc54514f5b71cee8e480e337d104d84",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "neovim-nightly-overlay",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"neovim-src": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1773359104,
|
||||||
|
"narHash": "sha256-vWu0zLThxpsx6vbPK5eAgvkMKu1LV8tbybS/sjWn8S8=",
|
||||||
|
"owner": "neovim",
|
||||||
|
"repo": "neovim",
|
||||||
|
"rev": "957eb1fde04496b4a2c07fd8427a8d78844d1bf7",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "neovim",
|
||||||
|
"repo": "neovim",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nix-homebrew": {
|
"nix-homebrew": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"brew-src": "brew-src"
|
"brew-src": "brew-src"
|
||||||
@@ -652,11 +711,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_4": {
|
"nixpkgs_4": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1773110118,
|
"lastModified": 1773201692,
|
||||||
"narHash": "sha256-mPAG8phMbCReKSiKAijjjd3v7uVcJOQ75gSjGJjt/Rk=",
|
"narHash": "sha256-NXrKzNMniu4Oam2kAFvqJ3GB2kAvlAFIriTAheaY8hw=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "e607cb5360ff1234862ac9f8839522becb853bb9",
|
"rev": "b6067cc0127d4db9c26c79e4de0513e58d0c40c9",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -668,11 +727,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_5": {
|
"nixpkgs_5": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1773305098,
|
"lastModified": 1773389992,
|
||||||
"narHash": "sha256-fm+rOZiAzFivuco5d7T+rE8i213EIEuHvoIuWiVlYto=",
|
"narHash": "sha256-wvfdLLWJ2I9oEpDd9PfMA8osfIZicoQ5MT1jIwNs9Tk=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "b9637319b2e3b8061ba416b46cde41bd9f8b4442",
|
"rev": "c06b4ae3d6599a672a6210b7021d699c351eebda",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -732,7 +791,7 @@
|
|||||||
},
|
},
|
||||||
"nixvim": {
|
"nixvim": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-parts": "flake-parts_3",
|
"flake-parts": "flake-parts_4",
|
||||||
"nixpkgs": "nixpkgs_6",
|
"nixpkgs": "nixpkgs_6",
|
||||||
"systems": "systems_4"
|
"systems": "systems_4"
|
||||||
},
|
},
|
||||||
@@ -753,11 +812,11 @@
|
|||||||
"nono": {
|
"nono": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1773270026,
|
"lastModified": 1773328997,
|
||||||
"narHash": "sha256-aLMBK2JQkn07wzho79WwolXRZEqvpILdq5bxp9F6Wug=",
|
"narHash": "sha256-O5g/6tpLDVJPmIgqCtSQBTEDjAg1/1PHON5mWBgI9t4=",
|
||||||
"owner": "always-further",
|
"owner": "always-further",
|
||||||
"repo": "nono",
|
"repo": "nono",
|
||||||
"rev": "9f3205847598d04d8b882c8ecb8238e4855d2a41",
|
"rev": "0be494284aadffd82633ce6ad1fa76301d5645b3",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -800,6 +859,7 @@
|
|||||||
"jj-starship": "jj-starship",
|
"jj-starship": "jj-starship",
|
||||||
"llm-agents": "llm-agents",
|
"llm-agents": "llm-agents",
|
||||||
"naersk": "naersk",
|
"naersk": "naersk",
|
||||||
|
"neovim-nightly-overlay": "neovim-nightly-overlay",
|
||||||
"nix-homebrew": "nix-homebrew",
|
"nix-homebrew": "nix-homebrew",
|
||||||
"nixpkgs": "nixpkgs_5",
|
"nixpkgs": "nixpkgs_5",
|
||||||
"nixpkgs-lib": [
|
"nixpkgs-lib": [
|
||||||
@@ -1002,11 +1062,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1772660329,
|
"lastModified": 1773297127,
|
||||||
"narHash": "sha256-IjU1FxYqm+VDe5qIOxoW+pISBlGvVApRjiw/Y/ttJzY=",
|
"narHash": "sha256-6E/yhXP7Oy/NbXtf1ktzmU8SdVqJQ09HC/48ebEGBpk=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "treefmt-nix",
|
"repo": "treefmt-nix",
|
||||||
"rev": "3710e0e1218041bbad640352a0440114b1e10428",
|
"rev": "71b125cd05fbfd78cab3e070b73544abe24c5016",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -1022,11 +1082,11 @@
|
|||||||
"utils": "utils_2"
|
"utils": "utils_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1773260683,
|
"lastModified": 1773331838,
|
||||||
"narHash": "sha256-ZZEX8JD+kiqpNsPOgrksbNrh5w8B63s8ebJplftdqhQ=",
|
"narHash": "sha256-MaWHEvzAM5nBlMJiQ8E79hYb13WpWrhhN6YuWandgec=",
|
||||||
"owner": "agavra",
|
"owner": "agavra",
|
||||||
"repo": "tuicr",
|
"repo": "tuicr",
|
||||||
"rev": "392d5e5a7b443cb7bbf234f7f44c6c0352b99c8a",
|
"rev": "bb92720d4000bb991028ecfe11872e31e8b62303",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
@@ -44,6 +44,10 @@
|
|||||||
url = "github:nix-community/naersk/master";
|
url = "github:nix-community/naersk/master";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
neovim-nightly-overlay = {
|
||||||
|
url = "github:nix-community/neovim-nightly-overlay";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
nix-homebrew.url = "github:zhaofengli-wip/nix-homebrew";
|
nix-homebrew.url = "github:zhaofengli-wip/nix-homebrew";
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/master";
|
nixpkgs.url = "github:nixos/nixpkgs/master";
|
||||||
nixpkgs-lib.follows = "nixpkgs";
|
nixpkgs-lib.follows = "nixpkgs";
|
||||||
|
|||||||
@@ -5,6 +5,21 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
autoCmd = [
|
autoCmd = [
|
||||||
|
{
|
||||||
|
event = ["VimEnter" "ColorScheme"];
|
||||||
|
group = "Christoph";
|
||||||
|
pattern = "*";
|
||||||
|
callback.__raw = ''
|
||||||
|
function()
|
||||||
|
local base = require("rose-pine.palette").base
|
||||||
|
local foam = require("rose-pine.palette").foam
|
||||||
|
vim.api.nvim_set_hl(0, "NormalFloat", { bg = base })
|
||||||
|
vim.api.nvim_set_hl(0, "FloatTitle", { fg = foam, bg = base, bold = true })
|
||||||
|
vim.api.nvim_set_hl(0, "MiniPickPrompt", { bg = base, bold = true })
|
||||||
|
vim.api.nvim_set_hl(0, "MiniPickBorderText", { bg = base })
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
}
|
||||||
{
|
{
|
||||||
event = "BufWritePre";
|
event = "BufWritePre";
|
||||||
group = "Christoph";
|
group = "Christoph";
|
||||||
|
|||||||
@@ -1,21 +1,22 @@
|
|||||||
{
|
{inputs', ...}: {
|
||||||
imports = [
|
imports = [
|
||||||
./autocmd.nix
|
./autocmd.nix
|
||||||
./mappings.nix
|
./mappings.nix
|
||||||
./options.nix
|
./options.nix
|
||||||
./plugins/blink-cmp.nix
|
./plugins/blink-cmp.nix
|
||||||
|
./plugins/code-review.nix
|
||||||
./plugins/conform.nix
|
./plugins/conform.nix
|
||||||
|
./plugins/diffview.nix
|
||||||
./plugins/grug-far.nix
|
./plugins/grug-far.nix
|
||||||
./plugins/harpoon.nix
|
./plugins/harpoon.nix
|
||||||
./plugins/hunk.nix
|
./plugins/hunk.nix
|
||||||
./plugins/jj-diffconflicts.nix
|
./plugins/jj-diffconflicts.nix
|
||||||
./plugins/jj-nvim.nix
|
./plugins/jj-nvim.nix
|
||||||
./plugins/code-review.nix
|
|
||||||
./plugins/diffview.nix
|
|
||||||
./plugins/lsp.nix
|
./plugins/lsp.nix
|
||||||
./plugins/mini.nix
|
./plugins/mini.nix
|
||||||
./plugins/oil.nix
|
./plugins/oil.nix
|
||||||
./plugins/opencode.nix
|
./plugins/opencode.nix
|
||||||
|
./plugins/render-markdown.nix
|
||||||
./plugins/toggleterm.nix
|
./plugins/toggleterm.nix
|
||||||
./plugins/treesitter.nix
|
./plugins/treesitter.nix
|
||||||
./plugins/zk.nix
|
./plugins/zk.nix
|
||||||
@@ -24,16 +25,15 @@
|
|||||||
programs.nixvim = {
|
programs.nixvim = {
|
||||||
enable = true;
|
enable = true;
|
||||||
defaultEditor = true;
|
defaultEditor = true;
|
||||||
|
package = inputs'.neovim-nightly-overlay.packages.default;
|
||||||
luaLoader.enable = true;
|
luaLoader.enable = true;
|
||||||
colorschemes.rose-pine = {
|
colorschemes.rose-pine = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
variant = "dawn";
|
variant = "dawn";
|
||||||
|
extend_background_behind_borders = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
extraConfigLua = ''
|
|
||||||
vim.ui.select = MiniPick.ui_select
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
home.shellAliases = {
|
home.shellAliases = {
|
||||||
|
|||||||
@@ -5,9 +5,8 @@
|
|||||||
format_on_save = {};
|
format_on_save = {};
|
||||||
formatters_by_ft = {
|
formatters_by_ft = {
|
||||||
nix = ["alejandra"];
|
nix = ["alejandra"];
|
||||||
javascript = ["prettier"];
|
javascript = ["oxfmt"];
|
||||||
typescript = ["prettier"];
|
typescript = ["oxfmt"];
|
||||||
vue = ["prettier"];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -30,7 +30,6 @@ in {
|
|||||||
close_on_edit = false,
|
close_on_edit = false,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
-- Disable default keymaps — we set our own in mappings.nix
|
|
||||||
ui = {
|
ui = {
|
||||||
log = {
|
log = {
|
||||||
keymaps = true,
|
keymaps = true,
|
||||||
|
|||||||
@@ -29,12 +29,12 @@
|
|||||||
{ mode = 'n', keys = '<Leader>e', desc = '+Explore/+Edit' },
|
{ mode = 'n', keys = '<Leader>e', desc = '+Explore/+Edit' },
|
||||||
{ mode = 'n', keys = '<Leader>f', desc = '+Find' },
|
{ mode = 'n', keys = '<Leader>f', desc = '+Find' },
|
||||||
{ mode = 'n', keys = '<Leader>v', desc = '+VCS' },
|
{ mode = 'n', keys = '<Leader>v', desc = '+VCS' },
|
||||||
{ mode = 'n', keys = '<Leader>l', desc = '+LSP' },
|
{ mode = 'n', keys = '<Leader>l', desc = '+LSP' },
|
||||||
{ mode = 'x', keys = '<Leader>l', desc = '+LSP' },
|
{ mode = 'x', keys = '<Leader>l', desc = '+LSP' },
|
||||||
{ mode = 'n', keys = '<Leader>o', desc = '+OpenCode' },
|
{ mode = 'n', keys = '<Leader>o', desc = '+OpenCode' },
|
||||||
{ mode = 'x', keys = '<Leader>o', desc = '+OpenCode' },
|
{ mode = 'x', keys = '<Leader>o', desc = '+OpenCode' },
|
||||||
{ mode = 'n', keys = '<Leader>r', desc = '+Review' },
|
{ mode = 'n', keys = '<Leader>r', desc = '+Review' },
|
||||||
{ mode = 'v', keys = '<Leader>r', desc = '+Review' },
|
{ mode = 'v', keys = '<Leader>r', desc = '+Review' },
|
||||||
require("mini.clue").gen_clues.builtin_completion(),
|
require("mini.clue").gen_clues.builtin_completion(),
|
||||||
require("mini.clue").gen_clues.g(),
|
require("mini.clue").gen_clues.g(),
|
||||||
require("mini.clue").gen_clues.marks(),
|
require("mini.clue").gen_clues.marks(),
|
||||||
@@ -159,193 +159,17 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
move = {};
|
move = {};
|
||||||
notify = {
|
notify = {};
|
||||||
content.format.__raw = ''
|
|
||||||
function(notif)
|
|
||||||
local formatted = MiniNotify.default_format(notif)
|
|
||||||
return '\n ' .. formatted:gsub('\n', ' \n ') .. ' \n'
|
|
||||||
end
|
|
||||||
'';
|
|
||||||
window.config = {
|
|
||||||
border = "none";
|
|
||||||
title = "";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
pairs = {};
|
pairs = {};
|
||||||
pick = {};
|
pick = {};
|
||||||
splitjoin = {};
|
splitjoin = {};
|
||||||
starter = {};
|
starter = {};
|
||||||
statusline = {
|
statusline = {};
|
||||||
content.active.__raw = ''
|
|
||||||
function()
|
|
||||||
local mode, mode_hl = MiniStatusline.section_mode({ trunc_width = 120 })
|
|
||||||
local diff = MiniStatusline.section_diff({ trunc_width = 75 })
|
|
||||||
local diagnostics = MiniStatusline.section_diagnostics({ trunc_width = 75 })
|
|
||||||
local lsp = MiniStatusline.section_lsp({ trunc_width = 75 })
|
|
||||||
local filename = MiniStatusline.section_filename({ trunc_width = 140 })
|
|
||||||
local search = MiniStatusline.section_searchcount({ trunc_width = 75 })
|
|
||||||
|
|
||||||
return _G.CschStatusline.active({
|
|
||||||
mode = mode,
|
|
||||||
mode_hl = mode_hl,
|
|
||||||
diff = diff,
|
|
||||||
diagnostics = diagnostics,
|
|
||||||
lsp = lsp,
|
|
||||||
filename = filename,
|
|
||||||
search = search,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
surround = {};
|
surround = {};
|
||||||
trailspace = {};
|
trailspace = {};
|
||||||
visits = {};
|
visits = {};
|
||||||
};
|
};
|
||||||
mockDevIcons = true;
|
mockDevIcons = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
extraConfigLua = ''
|
|
||||||
local mini_notify_group = vim.api.nvim_create_augroup('MiniNotifyDesign', { clear = true })
|
|
||||||
_G.CschStatusline = _G.CschStatusline or {}
|
|
||||||
|
|
||||||
local function to_hex(value)
|
|
||||||
return value and string.format('#%06x', value) or nil
|
|
||||||
end
|
|
||||||
|
|
||||||
local function get_hl(name)
|
|
||||||
return vim.api.nvim_get_hl(0, { name = name, link = false })
|
|
||||||
end
|
|
||||||
|
|
||||||
local function get_fg(name, fallback)
|
|
||||||
return to_hex(get_hl(name).fg) or fallback
|
|
||||||
end
|
|
||||||
|
|
||||||
local function get_bg(name, fallback)
|
|
||||||
return to_hex(get_hl(name).bg) or fallback
|
|
||||||
end
|
|
||||||
|
|
||||||
local function set_statusline_highlights()
|
|
||||||
local block_bg = get_bg('CursorLine', get_bg('Visual', '#373b41'))
|
|
||||||
local block_fg = get_fg('StatusLine', get_fg('Normal', '#c5c8c6'))
|
|
||||||
|
|
||||||
vim.api.nvim_set_hl(0, 'CschStatuslineBlock', { fg = block_fg, bg = block_bg })
|
|
||||||
end
|
|
||||||
|
|
||||||
local function statusline_group(hl, strings)
|
|
||||||
local parts = vim.tbl_filter(function(x)
|
|
||||||
return type(x) == 'string' and x ~= ""
|
|
||||||
end, strings or {})
|
|
||||||
|
|
||||||
if #parts == 0 then
|
|
||||||
return ""
|
|
||||||
end
|
|
||||||
|
|
||||||
return string.format('%%#%s# %s ', hl, table.concat(parts, ' '))
|
|
||||||
end
|
|
||||||
|
|
||||||
local function statusline_block(text, hl)
|
|
||||||
if text == nil or text == "" then
|
|
||||||
return ""
|
|
||||||
end
|
|
||||||
|
|
||||||
return string.format('%%#%s# %s ', hl, text)
|
|
||||||
end
|
|
||||||
|
|
||||||
local function statusline_filesize()
|
|
||||||
local size = math.max(vim.fn.line2byte(vim.fn.line('$') + 1) - 1, 0)
|
|
||||||
|
|
||||||
if size < 1024 then
|
|
||||||
return string.format('%dB', size)
|
|
||||||
elseif size < 1048576 then
|
|
||||||
return string.format('%.2fKiB', size / 1024)
|
|
||||||
end
|
|
||||||
|
|
||||||
return string.format('%.2fMiB', size / 1048576)
|
|
||||||
end
|
|
||||||
|
|
||||||
local function statusline_filetype()
|
|
||||||
local filetype = vim.bo.filetype
|
|
||||||
|
|
||||||
if filetype == "" then
|
|
||||||
return vim.bo.buftype ~= "" and vim.bo.buftype or 'text'
|
|
||||||
end
|
|
||||||
|
|
||||||
local icon = ""
|
|
||||||
if _G.MiniIcons ~= nil then
|
|
||||||
icon = _G.MiniIcons.get('filetype', filetype) or ""
|
|
||||||
end
|
|
||||||
|
|
||||||
return (icon ~= "" and (icon .. ' ') or "") .. filetype
|
|
||||||
end
|
|
||||||
|
|
||||||
local function statusline_fileinfo()
|
|
||||||
local label = statusline_filetype()
|
|
||||||
|
|
||||||
if MiniStatusline.is_truncated(120) or vim.bo.buftype ~= "" then
|
|
||||||
return label
|
|
||||||
end
|
|
||||||
|
|
||||||
return string.format('%s · %s', label, statusline_filesize())
|
|
||||||
end
|
|
||||||
|
|
||||||
local function statusline_location()
|
|
||||||
local line = vim.fn.line('.')
|
|
||||||
local total_lines = vim.fn.line('$')
|
|
||||||
local column = vim.fn.virtcol('.')
|
|
||||||
|
|
||||||
if MiniStatusline.is_truncated(90) then
|
|
||||||
return string.format('Ln %d Col %d', line, column)
|
|
||||||
end
|
|
||||||
|
|
||||||
return string.format('Ln %d/%d · Col %d', line, total_lines, column)
|
|
||||||
end
|
|
||||||
|
|
||||||
function _G.CschStatusline.active(parts)
|
|
||||||
local left = vim.tbl_filter(function(x)
|
|
||||||
return x ~= ""
|
|
||||||
end, {
|
|
||||||
statusline_block(parts.mode, parts.mode_hl),
|
|
||||||
statusline_group('MiniStatuslineDevinfo', { parts.diff, parts.diagnostics, parts.lsp }),
|
|
||||||
'%<',
|
|
||||||
statusline_group('MiniStatuslineFilename', { parts.filename }),
|
|
||||||
})
|
|
||||||
local right = vim.tbl_filter(function(x)
|
|
||||||
return x ~= ""
|
|
||||||
end, {
|
|
||||||
statusline_block(statusline_fileinfo(), 'CschStatuslineBlock'),
|
|
||||||
statusline_block(parts.search, 'CschStatuslineBlock'),
|
|
||||||
statusline_block(statusline_location(), parts.mode_hl),
|
|
||||||
})
|
|
||||||
|
|
||||||
return table.concat(left, "") .. '%=%#StatusLine#' .. table.concat(right, "")
|
|
||||||
end
|
|
||||||
|
|
||||||
local function set_mini_notify_highlights()
|
|
||||||
local border = vim.api.nvim_get_hl(0, { name = 'FloatBorder' })
|
|
||||||
local normal = vim.api.nvim_get_hl(0, { name = 'NormalFloat' })
|
|
||||||
local popup_bg = get_bg('Pmenu', get_bg('CursorLine', get_bg('NormalFloat', '#303446')))
|
|
||||||
local title = vim.api.nvim_get_hl(0, { name = 'FloatTitle' })
|
|
||||||
|
|
||||||
border.bg = 'NONE'
|
|
||||||
normal.bg = popup_bg
|
|
||||||
normal.bold = true
|
|
||||||
title.bg = 'NONE'
|
|
||||||
|
|
||||||
vim.api.nvim_set_hl(0, 'MiniNotifyBorder', border)
|
|
||||||
vim.api.nvim_set_hl(0, 'MiniNotifyNormal', normal)
|
|
||||||
vim.api.nvim_set_hl(0, 'MiniNotifyTitle', title)
|
|
||||||
end
|
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd('ColorScheme', {
|
|
||||||
group = mini_notify_group,
|
|
||||||
callback = function()
|
|
||||||
set_mini_notify_highlights()
|
|
||||||
set_statusline_highlights()
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
set_mini_notify_highlights()
|
|
||||||
set_statusline_highlights()
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,295 +2,51 @@
|
|||||||
opencode-nvim =
|
opencode-nvim =
|
||||||
pkgs.vimUtils.buildVimPlugin {
|
pkgs.vimUtils.buildVimPlugin {
|
||||||
pname = "opencode-nvim";
|
pname = "opencode-nvim";
|
||||||
version = "unstable-2026-03-07";
|
version = "unstable-2026-03-12";
|
||||||
src =
|
src =
|
||||||
pkgs.fetchFromGitHub {
|
pkgs.fetchFromGitHub {
|
||||||
owner = "sudo-tee";
|
owner = "sudo-tee";
|
||||||
repo = "opencode.nvim";
|
repo = "opencode.nvim";
|
||||||
rev = "dffa3f39a8251c7ba53b1544d8536b5f51b4e90d";
|
rev = "800c4f891f5d940f2805780a39872a0207b5a446";
|
||||||
hash = "sha256-KxIuToMpyo/Yi4xKirMV8Fznlma6EL1k4YQm5MQdGw4=";
|
hash = "sha256-3xyZux5S8ThBsi7AC4AWnd2h2LEI5L+I5Am2PNWKu64=";
|
||||||
};
|
};
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
programs.nixvim = {
|
programs.nixvim = {
|
||||||
extraPlugins = with pkgs.vimPlugins; [
|
autoCmd = [
|
||||||
|
{
|
||||||
|
event = "FileType";
|
||||||
|
group = "Christoph";
|
||||||
|
pattern = "opencode,opencode_output";
|
||||||
|
callback.__raw = ''
|
||||||
|
function()
|
||||||
|
vim.b.ministatusline_disable = true
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
extraPlugins = [
|
||||||
opencode-nvim
|
opencode-nvim
|
||||||
plenary-nvim
|
|
||||||
render-markdown-nvim
|
|
||||||
];
|
];
|
||||||
extraConfigLua = ''
|
extraConfigLua = ''
|
||||||
local api = vim.api
|
require("opencode").setup({
|
||||||
local opencode_output_filetype = 'opencode_output'
|
|
||||||
local opencode_window_filetypes = {
|
|
||||||
opencode = true,
|
|
||||||
opencode_output = true,
|
|
||||||
}
|
|
||||||
|
|
||||||
local palette = {
|
|
||||||
base = '#faf4ed',
|
|
||||||
surface = '#fffaf3',
|
|
||||||
overlay = '#f2e9e1',
|
|
||||||
highlight_med = '#dfdad9',
|
|
||||||
text = '#575279',
|
|
||||||
subtle = '#797593',
|
|
||||||
muted = '#9893a5',
|
|
||||||
pine = '#286983',
|
|
||||||
iris = '#907aa9',
|
|
||||||
foam = '#56949f',
|
|
||||||
leaf = '#6d8f89',
|
|
||||||
gold = '#ea9d34',
|
|
||||||
rose = '#d7827e',
|
|
||||||
love = '#b4637a',
|
|
||||||
}
|
|
||||||
|
|
||||||
local function set_highlights(highlights)
|
|
||||||
for group, spec in pairs(highlights) do
|
|
||||||
api.nvim_set_hl(0, group, spec)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local opencode_markdown_conceal_query = vim.treesitter.query.parse('markdown_inline', [[
|
|
||||||
[
|
|
||||||
(emphasis_delimiter)
|
|
||||||
(code_span_delimiter)
|
|
||||||
(latex_span_delimiter)
|
|
||||||
] @conceal
|
|
||||||
|
|
||||||
(inline_link
|
|
||||||
[
|
|
||||||
"["
|
|
||||||
"]"
|
|
||||||
"("
|
|
||||||
(link_destination)
|
|
||||||
")"
|
|
||||||
] @conceal)
|
|
||||||
|
|
||||||
(full_reference_link
|
|
||||||
[
|
|
||||||
"["
|
|
||||||
"]"
|
|
||||||
(link_label)
|
|
||||||
] @conceal)
|
|
||||||
|
|
||||||
(collapsed_reference_link
|
|
||||||
[
|
|
||||||
"["
|
|
||||||
"]"
|
|
||||||
] @conceal)
|
|
||||||
|
|
||||||
(shortcut_link
|
|
||||||
[
|
|
||||||
"["
|
|
||||||
"]"
|
|
||||||
] @conceal)
|
|
||||||
|
|
||||||
(image
|
|
||||||
[
|
|
||||||
"!"
|
|
||||||
"["
|
|
||||||
"]"
|
|
||||||
"("
|
|
||||||
(link_destination)
|
|
||||||
")"
|
|
||||||
] @conceal)
|
|
||||||
]])
|
|
||||||
|
|
||||||
local function collect_conceal_marks(ctx)
|
|
||||||
local marks = {}
|
|
||||||
|
|
||||||
for _, node in opencode_markdown_conceal_query:iter_captures(ctx.root, ctx.buf) do
|
|
||||||
local start_row, start_col, end_row, end_col = node:range()
|
|
||||||
marks[#marks + 1] = {
|
|
||||||
conceal = true,
|
|
||||||
start_row = start_row,
|
|
||||||
start_col = start_col,
|
|
||||||
opts = {
|
|
||||||
end_row = end_row,
|
|
||||||
end_col = end_col,
|
|
||||||
conceal = "",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
return marks
|
|
||||||
end
|
|
||||||
|
|
||||||
local function set_opencode_output_conceal()
|
|
||||||
if vim.bo.filetype ~= opencode_output_filetype then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
vim.wo.conceallevel = 3
|
|
||||||
vim.wo.concealcursor = 'nvic'
|
|
||||||
end
|
|
||||||
|
|
||||||
local function hide_opencode_statusline()
|
|
||||||
if not opencode_window_filetypes[vim.bo.filetype] then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
vim.wo.statusline = ' '
|
|
||||||
end
|
|
||||||
|
|
||||||
vim.treesitter.language.register('markdown', opencode_output_filetype)
|
|
||||||
vim.treesitter.language.register('markdown_inline', opencode_output_filetype)
|
|
||||||
|
|
||||||
api.nvim_create_autocmd({ 'FileType', 'BufWinEnter', 'WinEnter' }, {
|
|
||||||
callback = set_opencode_output_conceal,
|
|
||||||
})
|
|
||||||
api.nvim_create_autocmd({ 'FileType', 'BufWinEnter', 'WinEnter', 'BufEnter' }, {
|
|
||||||
pattern = '*',
|
|
||||||
callback = hide_opencode_statusline,
|
|
||||||
})
|
|
||||||
|
|
||||||
set_highlights({
|
|
||||||
RenderMarkdownCode = { bg = palette.surface },
|
|
||||||
RenderMarkdownCodeBorder = { fg = palette.highlight_med, bg = palette.surface },
|
|
||||||
RenderMarkdownCodeInline = { bg = palette.surface },
|
|
||||||
RenderMarkdownH1 = { fg = palette.pine, bold = true },
|
|
||||||
RenderMarkdownH2 = { fg = palette.iris, bold = true },
|
|
||||||
RenderMarkdownH3 = { fg = palette.foam, bold = true },
|
|
||||||
RenderMarkdownH4 = { fg = palette.gold, bold = true },
|
|
||||||
OpencodeInputLegend = { fg = palette.subtle, bold = true },
|
|
||||||
OpencodeAgentBuild = { bg = palette.muted, fg = palette.base, bold = true },
|
|
||||||
})
|
|
||||||
|
|
||||||
local render_markdown_config = {
|
|
||||||
anti_conceal = { enabled = false },
|
|
||||||
heading = {
|
|
||||||
icons = { '◆ ', '◇ ', '○ ', '· ', '· ', '· ' },
|
|
||||||
backgrounds = {},
|
|
||||||
position = 'inline',
|
|
||||||
width = 'block',
|
|
||||||
left_pad = 0,
|
|
||||||
right_pad = 2,
|
|
||||||
border = false,
|
|
||||||
sign = false,
|
|
||||||
},
|
|
||||||
code = {
|
|
||||||
sign = false,
|
|
||||||
width = 'full',
|
|
||||||
left_pad = 2,
|
|
||||||
right_pad = 0,
|
|
||||||
border = 'thin',
|
|
||||||
language_icon = false,
|
|
||||||
language_name = true,
|
|
||||||
},
|
|
||||||
bullet = {
|
|
||||||
icons = { '·', '–', '·', '–' },
|
|
||||||
},
|
|
||||||
custom_handlers = {
|
|
||||||
markdown_inline = {
|
|
||||||
extends = true,
|
|
||||||
parse = collect_conceal_marks,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
file_types = { opencode_output_filetype },
|
|
||||||
win_options = {
|
|
||||||
conceallevel = { rendered = 3 },
|
|
||||||
concealcursor = { rendered = 'nvic' },
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
require('render-markdown').setup(render_markdown_config)
|
|
||||||
|
|
||||||
local opencode_icon_overrides = {
|
|
||||||
header_user = '│',
|
|
||||||
header_assistant = '│',
|
|
||||||
run = '▸',
|
|
||||||
task = '◦',
|
|
||||||
read = '◦',
|
|
||||||
edit = '◦',
|
|
||||||
write = '◦',
|
|
||||||
plan = '◦',
|
|
||||||
search = '◦',
|
|
||||||
web = '◦',
|
|
||||||
list = '◦',
|
|
||||||
tool = '◦',
|
|
||||||
snapshot = '◦',
|
|
||||||
restore_point = '◦',
|
|
||||||
file = '·',
|
|
||||||
folder = '·',
|
|
||||||
attached_file = '·',
|
|
||||||
agent = '·',
|
|
||||||
reference = '·',
|
|
||||||
reasoning = '◦',
|
|
||||||
question = '?',
|
|
||||||
border = '│',
|
|
||||||
}
|
|
||||||
|
|
||||||
require('opencode').setup({
|
|
||||||
server = {
|
|
||||||
url = 'http://127.0.0.1',
|
|
||||||
port = 18822,
|
|
||||||
auto_kill = false,
|
|
||||||
},
|
|
||||||
input = {
|
|
||||||
text = {
|
|
||||||
wrap = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
debug = {
|
debug = {
|
||||||
show_ids = false,
|
show_ids = false,
|
||||||
},
|
},
|
||||||
ui = {
|
|
||||||
icons = {
|
|
||||||
preset = 'nerdfonts',
|
|
||||||
overrides = opencode_icon_overrides,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
|
|
||||||
do
|
local hl = vim.api.nvim_set_hl
|
||||||
local config = require('opencode.config')
|
hl(0, "OpencodeBorder", { fg = "#9893a5" })
|
||||||
local formatter = require('opencode.ui.formatter')
|
hl(0, "OpencodeToolBorder", { fg = "#cecacd" })
|
||||||
local format_utils = require('opencode.ui.formatter.utils')
|
hl(0, "OpencodeDiffAdd", { bg = "#dfeadf" })
|
||||||
local icons = require('opencode.ui.icons')
|
hl(0, "OpencodeDiffDelete", { bg = "#f2dde2" })
|
||||||
local util = require('opencode.util')
|
hl(0, "OpencodeAgentPlan", { bg = "#907aa9", fg = "#fffaf3" })
|
||||||
|
hl(0, "OpencodeAgentBuild", { bg = "#56949f", fg = "#fffaf3" })
|
||||||
local function format_reasoning_title(part)
|
hl(0, "OpencodeAgentCustom", { bg = "#ea9d34", fg = "#fffaf3" })
|
||||||
local title = 'Reasoning'
|
hl(0, "OpencodeContestualAction", { bg = "#dfdad9" })
|
||||||
local time = part.time
|
hl(0, "OpencodeInputLegend", { bg = "#f2e9e1", fg = "#797593" })
|
||||||
|
|
||||||
if time and type(time) == 'table' and time.start then
|
|
||||||
local duration_text = util.format_duration_seconds(time.start, time['end'])
|
|
||||||
if duration_text then
|
|
||||||
title = string.format('%s %s', title, duration_text)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return title
|
|
||||||
end
|
|
||||||
|
|
||||||
local function highlight_reasoning_block(output, start_line)
|
|
||||||
local end_line = output:get_line_count()
|
|
||||||
|
|
||||||
if end_line - start_line > 1 then
|
|
||||||
formatter.add_vertical_border(output, start_line, end_line, 'OpencodeToolBorder', -1, 'OpencodeReasoningText')
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
output:add_extmark(start_line - 1, {
|
|
||||||
line_hl_group = 'OpencodeReasoningText',
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
formatter._format_reasoning = function(output, part)
|
|
||||||
local text = vim.trim(part.text or "")
|
|
||||||
local start_line = output:get_line_count() + 1
|
|
||||||
|
|
||||||
format_utils.format_action(output, icons.get('reasoning'), format_reasoning_title(part), "")
|
|
||||||
|
|
||||||
if config.ui.output.tools.show_reasoning_output and text ~= "" then
|
|
||||||
output:add_empty_line()
|
|
||||||
output:add_lines(vim.split(text, '\n'), ' ')
|
|
||||||
output:add_empty_line()
|
|
||||||
end
|
|
||||||
|
|
||||||
highlight_reasoning_block(output, start_line)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
9
modules/_neovim/plugins/render-markdown.nix
Normal file
9
modules/_neovim/plugins/render-markdown.nix
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
programs.nixvim.plugins.render-markdown = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
anti_conceal = {enabled = false;};
|
||||||
|
file_types = ["markdown" "opencode_output"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -3,58 +3,20 @@
|
|||||||
plugins.treesitter = {
|
plugins.treesitter = {
|
||||||
enable = true;
|
enable = true;
|
||||||
nixGrammars = true;
|
nixGrammars = true;
|
||||||
grammarPackages = pkgs.vimPlugins.nvim-treesitter.allGrammars;
|
grammarPackages = with pkgs.vimPlugins.nvim-treesitter-parsers; [
|
||||||
|
css
|
||||||
|
elixir
|
||||||
|
javascript
|
||||||
|
lua
|
||||||
|
markdown
|
||||||
|
markdown_inline
|
||||||
|
nix
|
||||||
|
typescript
|
||||||
|
];
|
||||||
settings = {
|
settings = {
|
||||||
highlight.enable = true;
|
highlight.enable = true;
|
||||||
indent.enable = true;
|
indent.enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Register missing treesitter predicates for compatibility with newer grammars
|
|
||||||
extraConfigLuaPre = ''
|
|
||||||
do
|
|
||||||
local query = require("vim.treesitter.query")
|
|
||||||
local predicates = query.list_predicates()
|
|
||||||
if not vim.tbl_contains(predicates, "is-not?") then
|
|
||||||
query.add_predicate("is-not?", function(match, pattern, source, predicate)
|
|
||||||
local dominated_by = predicate[2]
|
|
||||||
local dominated = false
|
|
||||||
for _, node in pairs(match) do
|
|
||||||
if type(node) == "userdata" then
|
|
||||||
local current = node:parent()
|
|
||||||
while current do
|
|
||||||
if current:type() == dominated_by then
|
|
||||||
dominated = true
|
|
||||||
break
|
|
||||||
end
|
|
||||||
current = current:parent()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
return not dominated
|
|
||||||
end, { force = true, all = true })
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Fix grammar-bundled treesitter queries that use #match? with Lua pattern
|
|
||||||
-- syntax (e.g. %d) instead of Vim regex. Neovim 0.11 picks the first
|
|
||||||
-- non-extending query file in the rtp as the base, so the grammar-bundled
|
|
||||||
-- (buggy) queries take precedence over the corrected site-level queries.
|
|
||||||
-- Override affected languages with the site-level version.
|
|
||||||
do
|
|
||||||
local langs = { "sql" }
|
|
||||||
for _, lang in ipairs(langs) do
|
|
||||||
local files = vim.api.nvim_get_runtime_file(
|
|
||||||
"queries/" .. lang .. "/highlights.scm", true)
|
|
||||||
if #files > 1 then
|
|
||||||
local f = io.open(files[#files])
|
|
||||||
if f then
|
|
||||||
vim.treesitter.query.set(lang, "highlights", f:read("*all"))
|
|
||||||
f:close()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -76,7 +76,7 @@
|
|||||||
After = ["default.target"];
|
After = ["default.target"];
|
||||||
};
|
};
|
||||||
Service = {
|
Service = {
|
||||||
ExecStart = "${inputs'.llm-agents.packages.opencode}/bin/opencode serve --port 18822";
|
ExecStart = "${inputs'.llm-agents.packages.opencode}/bin/opencode serve --port 18822 --host 100.64.0.1";
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
RestartSec = 5;
|
RestartSec = 5;
|
||||||
Environment = "PATH=${config.home.profileDirectory}/bin:/run/current-system/sw/bin";
|
Environment = "PATH=${config.home.profileDirectory}/bin:/run/current-system/sw/bin";
|
||||||
|
|||||||
@@ -49,6 +49,10 @@
|
|||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
nixvim.url = "github:nix-community/nixvim";
|
nixvim.url = "github:nix-community/nixvim";
|
||||||
|
neovim-nightly-overlay = {
|
||||||
|
url = "github:nix-community/neovim-nightly-overlay";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
llm-agents.url = "github:numtide/llm-agents.nix";
|
llm-agents.url = "github:numtide/llm-agents.nix";
|
||||||
# Overlay inputs
|
# Overlay inputs
|
||||||
himalaya.url = "github:pimalaya/himalaya";
|
himalaya.url = "github:pimalaya/himalaya";
|
||||||
|
|||||||
@@ -75,7 +75,7 @@
|
|||||||
};
|
};
|
||||||
Service = {
|
Service = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
ExecStart = "${opencode}/bin/opencode run --command inbox-triage --model opencode-go/kimi-k2.5";
|
ExecStart = "${opencode}/bin/opencode run --command inbox-triage --model opencode-go/glm-5";
|
||||||
Environment = "PATH=${pkgs.himalaya}/bin:${opencode}/bin:${pkgs.coreutils}/bin";
|
Environment = "PATH=${pkgs.himalaya}/bin:${opencode}/bin:${pkgs.coreutils}/bin";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user