From c0d6f9892442243b4586c6ef9d246b8b653cf259 Mon Sep 17 00:00:00 2001 From: Ryan Baumgardner <26423650+rbaumgardner93@users.noreply.github.com> Date: Mon, 11 Mar 2024 19:18:45 -0400 Subject: [PATCH 1/2] feat: allow treesitter defaults to be overwritten from custom directory (#732) --- init.lua | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/init.lua b/init.lua index cfbe00d..9216e60 100644 --- a/init.lua +++ b/init.lua @@ -779,17 +779,18 @@ require('lazy').setup({ { -- Highlight, edit, and navigate code 'nvim-treesitter/nvim-treesitter', build = ':TSUpdate', - config = function() + opts = { + ensure_installed = { 'bash', 'c', 'html', 'lua', 'markdown', 'vim', 'vimdoc' }, + -- Autoinstall languages that are not installed + auto_install = true, + highlight = { enable = true }, + indent = { enable = true }, + }, + config = function(_, opts) -- [[ Configure Treesitter ]] See `:help nvim-treesitter` ---@diagnostic disable-next-line: missing-fields - require('nvim-treesitter.configs').setup { - ensure_installed = { 'bash', 'c', 'html', 'lua', 'markdown', 'vim', 'vimdoc' }, - -- Autoinstall languages that are not installed - auto_install = true, - highlight = { enable = true }, - indent = { enable = true }, - } + require('nvim-treesitter.configs').setup(opts) -- There are additional nvim-treesitter modules that you can use to interact -- with nvim-treesitter. You should go explore a few and see what interests you: From cb1f16b8cad0c06eac841a227825d9f23b4acba0 Mon Sep 17 00:00:00 2001 From: Chiller Dragon Date: Tue, 12 Mar 2024 07:20:39 +0800 Subject: [PATCH 2/2] chore: rename to for consistency (#719) --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 9216e60..c570c4c 100644 --- a/init.lua +++ b/init.lua @@ -456,7 +456,7 @@ require('lazy').setup({ -- Jump to the definition of the word under your cursor. -- This is where a variable was first declared, or where a function is defined, etc. - -- To jump back, press . + -- To jump back, press . map('gd', require('telescope.builtin').lsp_definitions, '[G]oto [D]efinition') -- Find references for the word under your cursor.