# HG changeset patch # User zegervdv # Date 1617133675 -7200 # Node ID 5ffb0fd7b98d71fad9ae66b3e8c814380b7f9693 # Parent eba1dee43703aba45c9964af17424244c315b51f Move treesitter config into packer_compiled diff -r eba1dee43703 -r 5ffb0fd7b98d dot_config/nvim/config.lua --- a/dot_config/nvim/config.lua Tue Mar 30 16:29:17 2021 +0200 +++ b/dot_config/nvim/config.lua Tue Mar 30 21:47:55 2021 +0200 @@ -145,10 +145,69 @@ end } use { - 'nvim-treesitter/nvim-treesitter', + { + 'nvim-treesitter/nvim-treesitter', + config = function () + require "nvim-treesitter.highlight" + + require'nvim-treesitter.configs'.setup { + highlight = { + enable = false, + }, + incremental_selection = { + enable = true, + keymaps = { + init_selection = "gnn", + node_incremental = "grn", + scope_incremental = "grc", + node_decremental = "grm", + } + }, + refactor = { + highlight_definitions = { enable = true }, + smart_rename = { + enable = true, + keymaps = { + smart_rename = "gsr", + }, + }, + navigation = { + enable = true, + keymaps = { + goto_definition = "gnd", + list_definitions = "gnD", + }, + }, + }, + textobjects = { + move = { + enable = true, + goto_next_start = { + ["]]"] = "@block.outer", + }, + goto_previous_start = { + ["[["] = "@block.outer", + }, + goto_next_end = { + ["]["] = "@block.outer", + }, + goto_previous_end = { + ["[]"] = "@block.outer", + }, + }, + }, + playground = { + enable = true, + disable = {}, + updatetime = 25, + persist_queries = false + } + } + end + }, 'nvim-treesitter/nvim-treesitter-refactor', 'nvim-treesitter/nvim-treesitter-textobjects', - {'nvim-treesitter/playground', opt = true} + {'nvim-treesitter/playground', opt = true}, } use {'SirVer/ultisnips'} use { @@ -323,62 +382,6 @@ local lsp = require'lspconfig' local lsputil = require'lspconfig.util' -require "nvim-treesitter.highlight" - -require'nvim-treesitter.configs'.setup { - highlight = { - enable = false, - }, - incremental_selection = { - enable = true, - keymaps = { - init_selection = "gnn", - node_incremental = "grn", - scope_incremental = "grc", - node_decremental = "grm", - } - }, - refactor = { - highlight_definitions = { enable = true }, - smart_rename = { - enable = true, - keymaps = { - smart_rename = "gsr", - }, - }, - navigation = { - enable = true, - keymaps = { - goto_definition = "gnd", - list_definitions = "gnD", - }, - }, - }, - textobjects = { - move = { - enable = true, - goto_next_start = { - ["]]"] = "@block.outer", - }, - goto_previous_start = { - ["[["] = "@block.outer", - }, - goto_next_end = { - ["]["] = "@block.outer", - }, - goto_previous_end = { - ["[]"] = "@block.outer", - }, - }, - }, - playground = { - enable = true, - disable = {}, - updatetime = 25, - persist_queries = false - } -} - local on_attach = function(client) mapper('n', '', 'lua require"lspsaga.diagnostic".show_line_diagnostics()') mapper('n', 'gd', 'lua vim.lsp.buf.declaration()')