No syntax when dirbuf open a file
basilgood opened this issue · 1 comments
basilgood commented
Hi! Something has gone wrong since b5b68bf
The files opened by bufdir no longer have syntax and it's necessary to reload buffer for the syntax to appear. (:e<cr>
)
I tested the 7c58e36 and all is ok.
NVIM v0.7.0
minimal init.lua with the latest dirbuf good commit
local on_windows = vim.loop.os_uname().version:match 'Windows'
local function join_paths(...)
local path_sep = on_windows and '\\' or '/'
local result = table.concat({ ... }, path_sep)
return result
end
vim.cmd [[set runtimepath=$VIMRUNTIME]]
local temp_dir = vim.loop.os_getenv 'TEMP' or '/tmp'
vim.cmd('set packpath=' .. join_paths(temp_dir, 'nvim', 'site'))
local package_root = join_paths(temp_dir, 'nvim', 'site', 'pack')
local install_path = join_paths(package_root, 'packer', 'start', 'packer.nvim')
local compile_path = join_paths(install_path, 'plugin', 'packer_compiled.lua')
local function load_plugins()
require('packer').startup {
{
'wbthomason/packer.nvim',
{
'elihunter173/dirbuf.nvim',
commit = '7c58e36e53f0108f5a6d18ca66ccd64c85449953',
config = function()
require('dirbuf').setup({ sort_order = 'directories_first' })
end,
},
},
config = {
package_root = package_root,
compile_path = compile_path,
},
}
end
if vim.fn.isdirectory(install_path) == 0 then
vim.fn.system { 'git', 'clone', 'https://github.com/wbthomason/packer.nvim', install_path }
load_plugins()
require('packer').sync()
else
load_plugins()
require('packer').sync()
end
vim.opt.tabstop = 2
vim.opt.shiftwidth = 2
elihunter173 commented
Doh! I know exactly what this is. I can't believe I missed this in my testing. Fixed.