Skip to content

Commit a285896

Browse files
iton0rodolfolabiapari
authored andcommitted
refactor: update treesitter and which-key config (nvim-lua#1068)
1 parent 4580035 commit a285896

File tree

1 file changed

+8
-13
lines changed

1 file changed

+8
-13
lines changed

init.lua

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -944,6 +944,8 @@ require('lazy').setup({
944944
{ -- Highlight, edit, and navigate code
945945
'nvim-treesitter/nvim-treesitter',
946946
build = ':TSUpdate',
947+
main = 'nvim-treesitter.configs', -- Sets main module to use for opts
948+
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
947949
opts = {
948950
ensure_installed = {
949951
-- 'arduino',
@@ -995,19 +997,12 @@ require('lazy').setup({
995997
},
996998
indent = { enable = true, disable = { 'ruby' } },
997999
},
998-
config = function(_, opts)
999-
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
1000-
1001-
---@diagnostic disable-next-line: missing-fields
1002-
require('nvim-treesitter.configs').setup(opts)
1003-
1004-
-- There are additional nvim-treesitter modules that you can use to interact
1005-
-- with nvim-treesitter. You should go explore a few and see what interests you:
1006-
--
1007-
-- - Incremental selection: Included, see `:help nvim-treesitter-incremental-selection-mod`
1008-
-- - Show your current context: https://github.com/nvim-treesitter/nvim-treesitter-context
1009-
-- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects
1010-
end,
1000+
-- There are additional nvim-treesitter modules that you can use to interact
1001+
-- with nvim-treesitter. You should go explore a few and see what interests you:
1002+
--
1003+
-- - Incremental selection: Included, see `:help nvim-treesitter-incremental-selection-mod`
1004+
-- - Show your current context: https://github.com/nvim-treesitter/nvim-treesitter-context
1005+
-- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects
10111006
},
10121007

10131008
-- The following two comments only work if you have downloaded the kickstart repo, not just copy pasted the

0 commit comments

Comments
 (0)