diff --git a/nvimrc b/nvimrc index 5ca8c03..ee5d46a 100644 --- a/nvimrc +++ b/nvimrc @@ -339,111 +339,12 @@ packadd! vim-wordmotion " https://github.com/chaoren/vim-wordmotion.git " enable inline vim highlighting: let g:vimsyn_embed= 'lPr' -" Treesitter - -packadd! nvim-treesitter " https://github.com/nvim-treesitter/nvim-treesitter.git -packadd! nvim-treesitter-textobjects " https://github.com/nvim-treesitter/nvim-treesitter-textobjects.git -packadd! nvim-treesitter-refactor " https://github.com/nvim-treesitter/nvim-treesitter-refactor.git -packadd! nvim-treesitter-context " https://github.com/nvim-treesitter/nvim-treesitter-context.git -packadd! playground " https://github.com/nvim-treesitter/playground.git - -lua <d"] = "@class.outer", - ["d"] = "@function.outer", - }, - }, - }, - refactor = { - highlight_definitions = { enable = true }, - highlight_current_scope = { enable = false }, - smart_rename = { - enable = true, - keymaps = { - smart_rename = "grr", - }, - }, - navigation = { - enable = true, - keymaps = { - -- goto_definition_lsp_fallback = "gd", - goto_next_usage = "]r", - goto_previous_usage = "[r", - }, - }, - }, - playground = { - enable = true, - disable = {}, - updatetime = 25, - persist_queries = false, - keybindings = { - toggle_query_editor = 'o', - toggle_hl_groups = 'i', - toggle_injected_languages = 't', - toggle_anonymous_nodes = 'a', - toggle_language_display = 'I', - focus_language = 'f', - unfocus_language = 'F', - update = 'R', - goto_node = '', - show_help = '?', - }, - } -} -EOF - -lua <d"] = "@class.outer", + -- ["d"] = "@function.outer", + }, + }, + }, + refactor = { + highlight_definitions = { enable = true }, + highlight_current_scope = { enable = false }, + smart_rename = { + enable = true, + keymaps = { + smart_rename = "grr", + }, + }, + navigation = { + enable = true, + keymaps = { + -- goto_definition_lsp_fallback = "gd", + goto_next_usage = "]r", + goto_previous_usage = "[r", + }, + }, + }, + playground = { + enable = true, + disable = {}, + updatetime = 25, + persist_queries = false, + keybindings = { + toggle_query_editor = 'o', + toggle_hl_groups = 'i', + toggle_injected_languages = 't', + toggle_anonymous_nodes = 'a', + toggle_language_display = 'I', + focus_language = 'f', + unfocus_language = 'F', + update = 'R', + goto_node = '', + show_help = '?', + }, + } +} + +require'treesitter-context'.setup{ + enable = true, +}