craftzdog / solarized-osaka.nvim

🏯 A clean, dark Neovim theme written in Lua, with support for lsp, treesitter and lots of plugins.
Apache License 2.0
650 stars 29 forks source link

bug: colorscheme broken on .tsx files #30

Closed Redoxahmii closed 4 months ago

Redoxahmii commented 5 months ago

Did you check docs and existing issues?

Neovim version (nvim -v)

v0.9.5

Operating system/version

Arch Linux

Describe the bug

The colorscheme is complete broken on .tsx files. This issue first occurred with .jsx, html and other files but .tsx files where working properly. For some reason similar issue has now come back for .tsx files.

Screenshot_20240410_063749

As you can see it is now broken on .tsx files i had not opened a tsx file for some while so i just noticed it today.

Steps To Reproduce

Open any .tsx file.

Expected Behavior

Normal syntax

Repro

-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
  vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath, })
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
  "craftzdog/solarized-osaka.nvim",
  "craftzdog/solarized-osaka.nvim",
  -- add any other plugins here
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

vim.cmd.colorscheme("solarized-osaka")
-- add anything else here
Redoxahmii commented 5 months ago

Created pull to fix this.

Redoxahmii commented 4 months ago

.tsx files now use a separate Treesitter parser by the name of tsx which was not installed causing these issues. Closing.