1
0
Fork 0
dotfiles/home/config/nvim/plugins/treesitter.fnl

39 lines
3.1 KiB
Text
Raw Normal View History

2023-07-31 08:31:27 +00:00
(let [treesitter-config (require :nvim-treesitter.configs)
2022-05-31 13:46:32 +00:00
nifoc-treesitter (require :nifoc.treesitter)
2022-11-11 14:06:11 +00:00
disable-parsers []]
2022-05-31 13:46:32 +00:00
(nifoc-treesitter.setup)
2022-06-05 20:51:01 +00:00
(treesitter-config.setup {:ensure_installed []
:sync_install true
2022-11-08 23:24:54 +00:00
:auto_install false
:highlight {:enable true :disable disable-parsers}
2022-11-11 14:06:11 +00:00
:indent {:enable true :disable disable-parsers}
2022-11-08 23:24:54 +00:00
:matchup {:enable true :disable disable-parsers}
2023-10-31 20:24:26 +00:00
:autopairs {:enable true :disable disable-parsers}
2022-04-05 19:57:44 +00:00
:playground {:enable true}
2022-11-11 14:06:11 +00:00
:nifoc_hooks {:enable true
2023-12-12 19:05:42 +00:00
:disable disable-parsers}
:textobjects {:select {:enable true
:lookahead true
:keymaps {:af {:query "@function.outer"
:desc "Select outer part of a function"}
:if {:query "@function.inner"
:desc "Select inner part of a function"}
:ac {:query "@class.outer"
:desc "Select outer part of a class"}
:ic {:query "@class.inner"
:desc "Select inner part of a class"}
:as {:query "@scope"
:desc "Select language scope"}}}
:swap {:enable true
:swap_next {:<leader>a {:query "@parameter.inner"
:desc "Swap function parameter with the next one"}}
:swap_previous {:<leader>A {:query "@parameter.inner"
:desc "Swap function parameter with the previous one"}}}
:lsp_interop {:enable true
:border :rounded
:floating_preview_opts {}
:peek_definition_code {:<leader>lpf {:query "@function.outer"
:desc "Peek outer function definition"}
:<leader>lpF {:query "@class.outer"
:desc "Peek outer class definition"}}}}}))