run on every cd
This commit is contained in:
@@ -402,6 +402,7 @@ do
|
||||
return false
|
||||
end
|
||||
|
||||
local function auto_select_compiler()
|
||||
for compiler, glob_patterns in pairs(compiler_mapping) do
|
||||
for _, glob_pattern in ipairs(glob_patterns) do
|
||||
if look_for_file(glob_pattern) then
|
||||
@@ -412,6 +413,12 @@ do
|
||||
if look_for_file('justfile') then
|
||||
vim.go.makeprg = 'just'
|
||||
end
|
||||
end
|
||||
|
||||
auto_select_compiler()
|
||||
vim.api.nvim_create_autocmd('DirChanged', {
|
||||
callback = auto_select_compiler,
|
||||
})
|
||||
end
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user