File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 66local config = require (' rustaceanvim.config.internal' )
77local ra = require (' rustaceanvim.rust_analyzer' )
88if config .tools .reload_workspace_from_cargo_toml then
9+ local group = vim .api .nvim_create_augroup (' RustaceanCargoReloadWorkspace' , { clear = false })
10+ local bufnr = vim .api .nvim_get_current_buf ()
11+ vim .api .nvim_clear_autocmds {
12+ buffer = bufnr ,
13+ group = group ,
14+ }
915 vim .api .nvim_create_autocmd (' BufWritePost' , {
1016 buffer = vim .api .nvim_get_current_buf (),
17+ group = group ,
1118 callback = function ()
1219 if # ra .get_active_rustaceanvim_clients (nil ) > 0 then
1320 vim .cmd .RustLsp { ' reloadWorkspace' , mods = { silent = true } }
1421 end
1522 end ,
16- group = vim .api .nvim_create_augroup (' RustaceanCargoReloadWorkspace' , { clear = false }),
1723 })
1824end
You can’t perform that action at this time.
0 commit comments