Skip to content

Commit 1e45ec7

Browse files
authoredNov 14, 2023
Merge branch 'AstroNvim:main' into main
2 parents 3d18596 + 59d657c commit 1e45ec7

File tree

3 files changed

+39
-7
lines changed

3 files changed

+39
-7
lines changed
 

‎lua/lazy_snapshot.lua

+6-6
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ return {
77
{ "NvChad/nvim-colorizer.lua", commit = "dde3084106a70b9a79d48f426f6d6fec6fd203f7", optional = true },
88
{ "Shatur/neovim-session-manager", commit = "68dde355a4304d83b40cf073f53915604bdd8e70", optional = true },
99
{ "akinsho/toggleterm.nvim", version = "^2", optional = true },
10-
{ "b0o/SchemaStore.nvim", commit = "686687585c040529f7efa68aa433282068c9d78b", optional = true },
10+
{ "b0o/SchemaStore.nvim", commit = "f934fbbf417cf05da7f1576c67655ab25f7b702d", optional = true },
1111
{ "echasnovski/mini.bufremove", commit = "f53c7f27e36009fe61563c11cde154b94a0e5b94", optional = true },
1212
{ "folke/lazy.nvim", version = "^10", optional = true },
1313
{ "folke/neoconf.nvim", version = "^1", optional = true },
@@ -17,7 +17,7 @@ return {
1717
{ "hrsh7th/cmp-buffer", commit = "3022dbc9166796b644a841a02de8dd1cc1d311fa", optional = true },
1818
{ "hrsh7th/cmp-nvim-lsp", commit = "44b16d11215dce86f253ce0c30949813c0a90765", optional = true },
1919
{ "hrsh7th/cmp-path", commit = "91ff86cd9c29299a64f968ebb45846c485725f23", optional = true },
20-
{ "hrsh7th/nvim-cmp", commit = "51260c02a8ffded8e16162dcf41a23ec90cfba62", optional = true },
20+
{ "hrsh7th/nvim-cmp", commit = "0b751f6beef40fd47375eaf53d3057e0bfa317e4", optional = true },
2121
{ "jay-babu/mason-null-ls.nvim", version = "^2", optional = true },
2222
{ "jay-babu/mason-nvim-dap.nvim", version = "^2", optional = true },
2323
{ "jose-elias-alvarez/null-ls.nvim", commit = "0010ea927ab7c09ef0ce9bf28c2b573fc302f5a7", optional = true },
@@ -28,15 +28,15 @@ return {
2828
{ "max397574/better-escape.nvim", commit = "7031dc734add47bb71c010e0551829fa5799375f", optional = true },
2929
{ "mfussenegger/nvim-dap", version = "^0.6", optional = true },
3030
{ "mrjones2014/smart-splits.nvim", version = "^1", optional = true },
31-
{ "neovim/nvim-lspconfig", commit = "d0467b9574b48429debf83f8248d8cee79562586", optional = true },
31+
{ "neovim/nvim-lspconfig", commit = "36e4ffec0a9e373ac9dbf7949d3567c8f04ca3df", optional = true },
3232
{ "numToStr/Comment.nvim", version = "^0.8", optional = true },
3333
{ "nvim-lua/plenary.nvim", version = "^0.1", optional = true },
3434
{ "nvim-neo-tree/neo-tree.nvim", version = "^3", optional = true },
3535
{ "nvim-telescope/telescope-fzf-native.nvim", commit = "6c921ca12321edaa773e324ef64ea301a1d0da62", optional = true },
3636
{ "nvim-telescope/telescope.nvim", version = "^0.1", optional = true },
37-
{ "nvim-tree/nvim-web-devicons", commit = "5de460ca7595806044eced31e3c36c159a493857", optional = true },
38-
{ "nvim-treesitter/nvim-treesitter", commit = "c5a7533113b2deb7db899d387b877389cc8b6113", optional = true },
39-
{ "nvim-treesitter/nvim-treesitter-textobjects", commit = "e69a504baf2951d52e1f1fbb05145d43f236cbf1", optional = true },
37+
{ "nvim-tree/nvim-web-devicons", commit = "47103b80c38c59f7a1b5408c232b92bf5d018651", optional = true },
38+
{ "nvim-treesitter/nvim-treesitter", commit = "8996612bfbebe1657e1bb55a95201c96cab945c6", optional = true },
39+
{ "nvim-treesitter/nvim-treesitter-textobjects", commit = "e1e670a86274d5cb681e475d4891ea1afe605ced", optional = true },
4040
{ "onsails/lspkind.nvim", commit = "57610d5ab560c073c465d6faf0c19f200cb67e6e", optional = true },
4141
{ "rafamadriz/friendly-snippets", commit = "43727c2ff84240e55d4069ec3e6158d74cb534b6", optional = true },
4242
{ "rcarriga/cmp-dap", commit = "d16f14a210cd28988b97ca8339d504533b7e09a4", optional = true },
+11-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
1-
return function(_, opts) require("nvim-treesitter.configs").setup(opts) end
1+
return function(_, opts)
2+
if type(opts.ensure_installed) == "table" then
3+
local added = {}
4+
opts.ensure_installed = vim.tbl_filter(function(parser)
5+
if added[parser] then return false end
6+
added[parser] = true
7+
return true
8+
end, opts.ensure_installed)
9+
end
10+
require("nvim-treesitter.configs").setup(opts)
11+
end

‎lua/plugins/treesitter.lua

+22
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,32 @@ return {
2323
"TSUpdateSync",
2424
},
2525
build = ":TSUpdate",
26+
init = function(plugin)
27+
-- PERF: add nvim-treesitter queries to the rtp and it's custom query predicates early
28+
-- This is needed because a bunch of plugins no longer `require("nvim-treesitter")`, which
29+
-- no longer trigger the **nvim-treeitter** module to be loaded in time.
30+
-- Luckily, the only thins that those plugins need are the custom queries, which we make available
31+
-- during startup.
32+
-- CODE FROM LazyVim (thanks folke!) https://github.com/LazyVim/LazyVim/commit/1e1b68d633d4bd4faa912ba5f49ab6b8601dc0c9
33+
require("lazy.core.loader").add_to_rtp(plugin)
34+
require "nvim-treesitter.query_predicates"
35+
end,
2636
opts = function()
2737
return {
2838
autotag = { enable = true },
2939
context_commentstring = { enable = true, enable_autocmd = false },
40+
-- HACK: force install of shipped neovim parsers since TSUpdate doesn't correctly update them
41+
ensure_installed = {
42+
"bash",
43+
"c",
44+
"lua",
45+
"markdown",
46+
"markdown_inline",
47+
"python",
48+
"query",
49+
"vim",
50+
"vimdoc",
51+
},
3052
highlight = {
3153
enable = true,
3254
disable = function(_, bufnr) return vim.b[bufnr].large_buf end,

0 commit comments

Comments
 (0)
Please sign in to comment.