navigator.lua
navigator.lua copied to clipboard
PHP Syntax highlighting in preview window doesn't work when using Treesitter
Using a bare-bones setup. As soon as PHP treesitter parser is installed, syntax highlighting goes blank in the preview window.
It's seems to be related to the janky language design requiring <?
opening tag at the start of the file. If the preview window includes the tag, highlighting works fine. Other languages don't have this problem.
Minimal config for reproduction:
local fn = vim.fn
local install_path = fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim"
if fn.empty(fn.glob(install_path)) > 0 then
PACKER_BOOTSTRAP = fn.system({
"git",
"clone",
"--depth",
"1",
"https://github.com/wbthomason/packer.nvim",
install_path,
})
vim.cmd([[packadd packer.nvim]])
end
require('packer').startup(function(use)
use({
'williamboman/nvim-lsp-installer',
config = function()
require('nvim-lsp-installer').setup({})
end,
})
use({
"nvim-treesitter/nvim-treesitter",
run = ':TSUpdate',
config = function()
require("nvim-treesitter.configs").setup({
-- ensure_installed = {"php"},
})
end
})
use ({
"williamboman/mason.nvim",
config = function ()
require("mason").setup({})
end
})
use({
'ray-x/navigator.lua',
requires = {
{ 'ray-x/guihua.lua', run = 'cd lua/fzy && make' },
{ 'neovim/nvim-lspconfig' },
},
config = function()
require'navigator'.setup({});
end
})
end)
require('packer').sync()
vim.cmd [[
colorscheme murphy
set background=dark
]]