repos / dotfiles

my dotfiles

commit
c9273e0
parent
6cff32d
author
Eric Bower
date
2025-07-20 08:34:47 -0400 EDT
fix(nvim): PackChanged callback
1 files changed,  +12, -4
M dot_config/nvim/init.lua
+12, -4
 1@@ -6,9 +6,9 @@ o.expandtab       = true
 2 o.wrap            = false
 3 o.autoread        = true
 4 o.list            = true -- show trailing characters
 5-o.signcolumn      = 'yes'
 6-o.backspace       = 'indent,eol,start'
 7-o.shell           = '/bin/bash'
 8+o.signcolumn      = "yes"
 9+o.backspace       = "indent,eol,start"
10+o.shell           = "/bin/bash"
11 o.colorcolumn     = '100'
12 o.completeopt     = { "menuone", "noselect", "popup" }
13 o.laststatus      = 0
14@@ -170,7 +170,15 @@ local ts_parsers = {
15 }
16 local nts = require("nvim-treesitter")
17 nts.install(ts_parsers)
18-autocmd('PackChanged', { callback = function() nts.update() end })
19+autocmd({ "PackChanged" }, {
20+  callback = function(args)
21+    local spec = args.data.spec
22+    if spec and spec.name == "nvim-treesitter" and args.data.kind == "update" then
23+      vim.notify("nvim-treesitter was updated, updating parsers", vim.log.levels.INFO)
24+      vim.schedule(function() nts.update() end)
25+    end
26+  end,
27+})
28 
29 setup_lsp()
30 setup_fzf()