2022-02-26 12:26:49 +01:00
|
|
|
lua << EOF
|
|
|
|
local ts_config = require("nvim-treesitter.configs")
|
|
|
|
ts_config.setup({
|
|
|
|
highlight = {
|
|
|
|
enable = true,
|
|
|
|
-- Avoid duplicate highlighting
|
|
|
|
additional_vim_regex_highlighting = false,
|
|
|
|
},
|
|
|
|
indent = {
|
|
|
|
enable = true,
|
|
|
|
},
|
2022-03-07 21:10:53 +01:00
|
|
|
context_commentstring = {
|
|
|
|
enable = true,
|
|
|
|
},
|
2022-02-26 19:28:15 +01:00
|
|
|
textobjects = {
|
|
|
|
select = {
|
|
|
|
enable = true,
|
|
|
|
-- Jump to matching text objects
|
|
|
|
lookahead = true,
|
|
|
|
keymaps = {
|
|
|
|
["aa"] = "@parameter.outer",
|
|
|
|
["ia"] = "@parameter.inner",
|
|
|
|
["ab"] = "@block.outer",
|
|
|
|
["ib"] = "@block.inner",
|
|
|
|
["ac"] = "@class.outer",
|
|
|
|
["ic"] = "@class.inner",
|
|
|
|
["af"] = "@function.outer",
|
|
|
|
["if"] = "@function.inner",
|
|
|
|
["ak"] = "@comment.outer",
|
2022-02-26 19:52:40 +01:00
|
|
|
["aS"] = "@statement.outer",
|
2022-02-26 19:28:15 +01:00
|
|
|
},
|
|
|
|
},
|
2022-02-26 19:45:09 +01:00
|
|
|
move = {
|
|
|
|
enable = true,
|
|
|
|
-- Add to jump list
|
|
|
|
set_jumps = true,
|
|
|
|
goto_next_start = {
|
|
|
|
["]m"] = "@function.outer",
|
2022-02-26 19:52:40 +01:00
|
|
|
["]S"] = "@statement.outer",
|
2022-02-26 19:45:09 +01:00
|
|
|
["]]"] = "@class.outer",
|
|
|
|
},
|
|
|
|
goto_next_end = {
|
|
|
|
["]M"] = "@function.outer",
|
|
|
|
["]["] = "@class.outer",
|
|
|
|
},
|
|
|
|
goto_previous_start = {
|
|
|
|
["[m"] = "@function.outer",
|
2022-02-26 19:52:40 +01:00
|
|
|
["[S"] = "@statement.outer",
|
2022-02-26 19:45:09 +01:00
|
|
|
["[["] = "@class.outer",
|
|
|
|
},
|
|
|
|
goto_previous_end = {
|
|
|
|
["[M"] = "@function.outer",
|
|
|
|
["[]"] = "@class.outer",
|
|
|
|
},
|
|
|
|
},
|
2022-02-26 19:28:15 +01:00
|
|
|
},
|
2022-02-26 12:26:49 +01:00
|
|
|
})
|
|
|
|
EOF
|