Update treesitter to v2

This commit is contained in:
2026-01-12 10:32:46 +01:00
parent 96c5106a2b
commit 5e32efd63d
7 changed files with 134 additions and 83 deletions
Generated
+88 -47
View File
@@ -3,11 +3,11 @@
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1765121682,
"narHash": "sha256-4VBOP18BFeiPkyhy9o4ssBNQEvfvv1kXkasAYd0+rrA=",
"lastModified": 1767039857,
"narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "65f23138d8d09a92e30f1e5c87611b23ef451bf3",
"rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab",
"type": "github"
},
"original": {
@@ -24,11 +24,11 @@
]
},
"locked": {
"lastModified": 1765835352,
"narHash": "sha256-XswHlK/Qtjasvhd1nOa1e8MgZ8GS//jBoTqWtrS1Giw=",
"lastModified": 1768135262,
"narHash": "sha256-PVvu7OqHBGWN16zSi6tEmPwwHQ4rLPU9Plvs8/1TUBY=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "a34fae9c08a15ad73f295041fec82323541400a9",
"rev": "80daad04eddbbf5a4d883996a73f3f542fa437ac",
"type": "github"
},
"original": {
@@ -44,11 +44,32 @@
]
},
"locked": {
"lastModified": 1766387499,
"narHash": "sha256-AjK3/UKDzeXFeYNLVBaJ3+HLE9he1g5UrlNd4/BM3eA=",
"lastModified": 1768942641,
"narHash": "sha256-i25tkhqjsfo0YKz8To/+gzazW1v4f8qUGqJQ8OLrkqE=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "527ad07e6625302b648ed3b28c34b62a79bd103e",
"rev": "9997de2f62d1875644f02ddf96cf485a4baecb6f",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"home-manager_2": {
"inputs": {
"nixpkgs": [
"impermanence",
"nixpkgs"
]
},
"locked": {
"lastModified": 1768598210,
"narHash": "sha256-kkgA32s/f4jaa4UG+2f8C225Qvclxnqs76mf8zvTVPg=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "c47b2cc64a629f8e075de52e4742de688f930dc6",
"type": "github"
},
"original": {
@@ -58,12 +79,16 @@
}
},
"impermanence": {
"inputs": {
"home-manager": "home-manager_2",
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1737831083,
"narHash": "sha256-LJggUHbpyeDvNagTUrdhe/pRVp4pnS6wVKALS782gRI=",
"lastModified": 1768941735,
"narHash": "sha256-OyxsfXNcOkt06/kM+4bnuC8moDx+t7Qr+RB0BBa83Ig=",
"owner": "nix-community",
"repo": "impermanence",
"rev": "4b3e914cdf97a5b536a889e939fb2fd2b043a170",
"rev": "69ecf31e8fddc9354a4b418f3a517445d486bb54",
"type": "github"
},
"original": {
@@ -81,11 +106,11 @@
]
},
"locked": {
"lastModified": 1766361902,
"narHash": "sha256-UvMyRzpHluglPn7b4wLBCA8DRSiUwzcS9PKhk0bCcmY=",
"lastModified": 1768953881,
"narHash": "sha256-czdbiHZT2Ul3Oh5QfOgxWOb5rcOIX7oD0MznaU64vEI=",
"owner": "nix-community",
"repo": "neovim-nightly-overlay",
"rev": "8d66aa1836d522d7cbfdf7a1f40046010f7cf558",
"rev": "574a0de26b2b36447a32dd9a10653cfd19ecf92b",
"type": "github"
},
"original": {
@@ -97,11 +122,11 @@
"neovim-src": {
"flake": false,
"locked": {
"lastModified": 1766349065,
"narHash": "sha256-FjrwOMqBASOb0lBItQy3HyGPMcLBokzNQ/0oTiI05YA=",
"lastModified": 1768952091,
"narHash": "sha256-FGZ3rTKc6g2Cvqf1J7Py7/xUQ44M3PhS/cNt4rTEUus=",
"owner": "neovim",
"repo": "neovim",
"rev": "d1189ea508c888ebf7468be3872c975e4ea264bb",
"rev": "87276db7f9b2671ed9f416b4484dfc613dd3a83e",
"type": "github"
},
"original": {
@@ -117,11 +142,11 @@
]
},
"locked": {
"lastModified": 1766038392,
"narHash": "sha256-ht/GuKaw5NT3M12xM+mkUtkSBVtzjJ8IHIy6R/ncv9g=",
"lastModified": 1768764703,
"narHash": "sha256-5ulSDyOG1U+1sJhkJHYsUOWEsmtLl97O0NTVMvgIVyc=",
"owner": "LnL7",
"repo": "nix-darwin",
"rev": "5fb45ece6129bd7ad8f7310df0ae9c00bae7c562",
"rev": "0fc4e7ac670a0ed874abacf73c4b072a6a58064b",
"type": "github"
},
"original": {
@@ -152,14 +177,14 @@
},
"nixos-avf": {
"inputs": {
"nixpkgs": "nixpkgs"
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1763322257,
"narHash": "sha256-eiKNbZXvkB2p/YhM5ltK1CO1znm5Nn2aHLW3Awcqq9g=",
"lastModified": 1768917842,
"narHash": "sha256-wZ2RdXNLbDdgrf2zoNsnFGZB2CtreDh9n6zr6HPBwUI=",
"owner": "nix-community",
"repo": "nixos-avf",
"rev": "3fae0a3692b993bc0c40c61138a76fc1455d0b6e",
"rev": "305eee65ce15d7e37b5672927fcd5a83e78837ce",
"type": "github"
},
"original": {
@@ -170,11 +195,11 @@
},
"nixos-hardware": {
"locked": {
"lastModified": 1764440730,
"narHash": "sha256-ZlJTNLUKQRANlLDomuRWLBCH5792x+6XUJ4YdFRjtO4=",
"lastModified": 1768736227,
"narHash": "sha256-qgGq7CfrYKc3IBYQ7qp0Z/ZXndQVC5Bj0N8HW9mS2rM=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "9154f4569b6cdfd3c595851a6ba51bfaa472d9f3",
"rev": "d447553bcbc6a178618d37e61648b19e744370df",
"type": "github"
},
"original": {
@@ -192,11 +217,11 @@
]
},
"locked": {
"lastModified": 1765841014,
"narHash": "sha256-55V0AJ36V5Egh4kMhWtDh117eE3GOjwq5LhwxDn9eHg=",
"lastModified": 1768840529,
"narHash": "sha256-e22ou8nikeThx9x9/y29VdMEW4Fm7DBzlhp9ndDJUGE=",
"owner": "nix-community",
"repo": "NixOS-WSL",
"rev": "be4af8042e7a61fa12fda58fe9a3b3babdefe17b",
"rev": "b8e9a758fa2e08d8ac5c3be5d4b1fcc92fd3ce84",
"type": "github"
},
"original": {
@@ -207,27 +232,43 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1757545623,
"narHash": "sha256-mCxPABZ6jRjUQx3bPP4vjA68ETbPLNz9V2pk9tO7pRQ=",
"owner": "NixOS",
"lastModified": 1768564909,
"narHash": "sha256-Kell/SpJYVkHWMvnhqJz/8DqQg2b6PguxVWOuadbHCc=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "8cd5ce828d5d1d16feff37340171a98fc3bf6526",
"rev": "e4bae1bd10c9c57b2cf517953ab70060a828ee6f",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-25.05",
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1766309749,
"narHash": "sha256-3xY8CZ4rSnQ0NqGhMKAy5vgC+2IVK0NoVEzDoOh4DA4=",
"lastModified": 1765608474,
"narHash": "sha256-9Wx53UK0z8Di5iesJID0tS1dRKwGxI4i7tsSanOHhF0=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "a6531044f6d0bef691ea18d4d4ce44d0daa6e816",
"rev": "28bb483c11a1214a73f9fd2d9928a6e2ea86ec71",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-25.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1768886240,
"narHash": "sha256-C2TjvwYZ2VDxYWeqvvJ5XPPp6U7H66zeJlRaErJKoEM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0",
"type": "github"
},
"original": {
@@ -266,7 +307,7 @@
"nixos-avf": "nixos-avf",
"nixos-hardware": "nixos-hardware",
"nixos-wsl": "nixos-wsl",
"nixpkgs": "nixpkgs_2",
"nixpkgs": "nixpkgs_3",
"noctalia": "noctalia",
"tmux": "tmux",
"zen-browser": "zen-browser"
@@ -275,11 +316,11 @@
"tmux": {
"flake": false,
"locked": {
"lastModified": 1766397668,
"narHash": "sha256-itzAG88YfyiZUIHBWVbJ6wjADkYbx2r6lcHbdpxWVTA=",
"lastModified": 1768923742,
"narHash": "sha256-dRkPHiR1QZBhXyh5M7FqX4mOo90q/vi3uZBFsjodfio=",
"owner": "tmux",
"repo": "tmux",
"rev": "d607399850879359025fa4160c4dee943ad32be4",
"rev": "d2e09cb2597bf585ea45c0e584326a73e222a438",
"type": "github"
},
"original": {
@@ -295,11 +336,11 @@
]
},
"locked": {
"lastModified": 1766377218,
"narHash": "sha256-y3g3OqPB0tmRjbHJNnJKivSQRtAJR+/9S1xbxBWEatg=",
"lastModified": 1767618227,
"narHash": "sha256-9+XVF47E9NCVs249SSsDtr7YdG/23/lCJmWAjQvOfqI=",
"owner": "youwen5",
"repo": "zen-browser-flake",
"rev": "2f61341b32dd69c07e147188e67e09ba2bb99c33",
"rev": "1586e49b3908b058e221f11d843eb46392dba17b",
"type": "github"
},
"original": {
+5 -1
View File
@@ -49,7 +49,7 @@
j = "jj";
js = "jj st";
jn = "jj new";
jnm = "jj new 'trunk()'";
jnt = "jj new 'trunk()'";
jc = "jj commit";
jcm = "jj commit -m";
je = "jj edit";
@@ -58,9 +58,13 @@
jf = "jj git fetch";
jl = "jj log";
jla = "jj log -r 'all()'";
jd = "jj diff";
jcl = "jj git clone --colocate";
jrb = "jj rebase";
jrbt = "jj rebase -o 'trunk()'";
ja = "jj abandon";
jsq = "jj squash";
jsqi = "jj squash -i";
# k8s
k = "kubectl";
+1 -1
View File
@@ -28,7 +28,7 @@ in {
zathura
libreoffice
qbittorrent
youtube-music
pear-desktop
wl-clipboard
wlr-randr
alsa-utils
+5 -5
View File
@@ -58,6 +58,8 @@ in
catppuccin-nvim
nvim-treesitter.withAllGrammars
nvim-treesitter-textobjects
vim-illuminate
nvim-lspconfig
(blink-cmp.overrideAttrs {
# clashes with oil
@@ -74,7 +76,7 @@ in
harpoon2
gitsigns-nvim
# jj-nvim
jj-nvim
vim-fugitive
vim-rhubarb
git-conflict-nvim
@@ -112,10 +114,7 @@ in
# postPatch = "rm doc/copilot.txt";
# })
];
opt = [
vim-illuminate
nvim-treesitter-textobjects
];
opt = [ ];
};
extraPackages = with pkgs; [
@@ -141,6 +140,7 @@ in
bash-language-server
sqls
biome
tailwindcss-language-server
kdePackages.qtdeclarative # qmlls
# gopls also needs go /shame
+1
View File
@@ -17,6 +17,7 @@ vim.lsp.enable({
"bashls",
"jsonls",
"biome",
"tailwindcss",
"sqls",
"qmlls"
-- "roslyn_ls", we use roslyn.nvim plugin instead.
+33 -28
View File
@@ -1,43 +1,48 @@
vim.api.nvim_create_autocmd("FileType", {
group = vim.api.nvim_create_augroup("treesitter-config", { clear = true }),
callback = function()
pcall(vim.treesitter.start)
vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()"
vim.wo[0][0].foldexpr = 'v:lua.vim.treesitter.foldexpr()'
vim.wo[0][0].foldmethod = 'expr'
end,
})
return {
{
"nvim-treesitter",
load = function()
vim.cmd.packadd("nvim-treesitter-textobjects")
end,
"nvim-treesitter-textobjects",
event = { "BufReadPost", "BufWritePost", "BufNewFile" },
opts = {
highlight = {
enable = true,
additional_vim_regex_highlighting = false,
},
indent = {
enable = true
},
textobjects = {
select = {
enable = true,
lookahead = true,
keymaps = {
["af"] = "@function.outer",
["if"] = "@function.inner",
["ac"] = "@class.outer",
["ic"] = "@class.inner",
["ia"] = "@parameter.inner",
["aa"] = "@parameter.outer",
},
},
select = {
lookahead = true,
},
},
after = function(plug)
require("nvim-treesitter.configs").setup(plug.opts)
vim.wo.foldmethod = 'expr'
vim.wo.foldexpr = 'v:lua.vim.treesitter.foldexpr()'
require("nvim-treesitter-textobjects").setup(plug.opts)
local select = require("nvim-treesitter-textobjects.select")
vim.keymap.set({ "x", "o" }, "af", function()
select.select_textobject("@function.outer", "textobjects")
end)
vim.keymap.set({ "x", "o" }, "if", function()
select.select_textobject("@function.inner", "textobjects")
end)
vim.keymap.set({ "x", "o" }, "ac", function()
select.select_textobject("@class.outer", "textobjects")
end)
vim.keymap.set({ "x", "o" }, "ic", function()
select.select_textobject("@class.inner", "textobjects")
end)
vim.keymap.set({ "x", "o" }, "aa", function()
select.select_textobject("@parameter.outer", "textobjects")
end)
vim.keymap.set({ "x", "o" }, "ia", function()
select.select_textobject("@parameter.inner", "textobjects")
end)
end
},
{
"vim-illuminate",
load = vim.cmd.packadd,
event = { "BufReadPost", "BufWritePost", "BufNewFile" },
opts = {
providers = {
+1 -1
View File
@@ -40,6 +40,6 @@ in {
# };
discord = enableWayland super.discord ["discord" "Discord"];
vesktop = enableWayland super.vesktop ["vesktop"];
youtube-music = enableWayland super.youtube-music ["youtube-music"];
pear-desktop = enableWayland super.pear-desktop ["pear-desktop"];
vscode = enableWayland super.vscode ["code"];
}