File tree Expand file tree Collapse file tree 6 files changed +55
-0
lines changed
modules/plugins/treesitter Expand file tree Collapse file tree 6 files changed +55
-0
lines changed Original file line number Diff line number Diff line change 325325
326326[ flash.nvim ] : https://github.com/folke/flash.nvim
327327[ gitlinker.nvim ] : https://github.com/linrongbin16/gitlinker.nvim
328+ [ nvim-treesitter-textobjects ] : https://github.com/nvim-treesitter/nvim-treesitter-textobjects
328329
329330- Fix oil config referencing snacks
330331- Add [ flash.nvim] plugin to ` vim.utility.motion.flash-nvim `
331332- Fix default telescope ignore list entry for '.git/' to properly match
332333- Add [ gitlinker.nvim] plugin to ` vim.git.gitlinker-nvim `
334+ - Add [ nvim-treesitter-textobjects] plugin to ` vim.treesitter.textobjects `
333335
334336[ rrvsh] ( https://github.com/rrvsh ) :
335337
Original file line number Diff line number Diff line change 22 imports = [
33 # treesitter extras
44 ./ts-context
5+ ./ts-textobjects
56
67 ./treesitter.nix
78 ./config.nix
Original file line number Diff line number Diff line change 1+ {
2+ config ,
3+ lib ,
4+ ...
5+ } : let
6+ inherit ( lib . modules ) mkIf ;
7+ inherit ( lib . nvim . lua ) toLuaObject ;
8+ inherit ( lib . nvim . dag ) entryAfter ;
9+
10+ inherit ( config . vim ) treesitter ;
11+ cfg = treesitter . textobjects ;
12+ in {
13+ config = mkIf ( treesitter . enable && cfg . enable ) {
14+ vim = {
15+ startPlugins = [ "nvim-treesitter-textobjects" ] ;
16+
17+ # set up treesitter-textobjects after Treesitter and before mini-ai, which can then use
18+ # the provided textobjects.
19+ pluginRC . treesitter-textobjects = entryAfter [ "treesitter" ] ''
20+ require("nvim-treesitter.configs").setup({textobjects = ${ toLuaObject cfg . setupOpts } })
21+ '' ;
22+ } ;
23+ } ;
24+ }
Original file line number Diff line number Diff line change 1+ {
2+ imports = [
3+ ./textobjects.nix
4+ ./config.nix
5+ ] ;
6+ }
Original file line number Diff line number Diff line change 1+ { lib , ...} : let
2+ inherit ( lib . options ) mkEnableOption ;
3+ inherit ( lib . nvim . types ) mkPluginSetupOption ;
4+ in {
5+ options . vim . treesitter . textobjects = {
6+ enable = mkEnableOption "Treesitter textobjects" ;
7+ setupOpts = mkPluginSetupOption "treesitter-textobjects" { } ;
8+ } ;
9+ }
Original file line number Diff line number Diff line change 18941894 "url" : " https://github.com/nvim-treesitter/nvim-treesitter-context/archive/6daca3ad780f045550b820f262002f35175a6c04.tar.gz" ,
18951895 "hash" : " 0qprwd44hw9sz0vh14p6lpvs9vxrick462pfkradmal6ak1kfwn3"
18961896 },
1897+ "nvim-treesitter-textobjects" : {
1898+ "type" : " Git" ,
1899+ "repository" : {
1900+ "type" : " GitHub" ,
1901+ "owner" : " nvim-treesitter" ,
1902+ "repo" : " nvim-treesitter-textobjects"
1903+ },
1904+ "branch" : " master" ,
1905+ "submodules" : false ,
1906+ "revision" : " 0e3be38005e9673d044e994b1e4b123adb040179" ,
1907+ "url" : " https://github.com/nvim-treesitter/nvim-treesitter-textobjects/archive/0e3be38005e9673d044e994b1e4b123adb040179.tar.gz" ,
1908+ "hash" : " 0y93pj3asarw7jhk4cdphhx6awxdyiwajc0n9nr4836gn48qcs85"
1909+ },
18971910 "nvim-ts-autotag" : {
18981911 "type" : " Git" ,
18991912 "repository" : {
You can’t perform that action at this time.
0 commit comments