Giter VIP home page Giter VIP logo

Comments (6)

cpmsmith avatar cpmsmith commented on September 26, 2024 1

@Andrii-Vovk I expect you're getting those highlights from the TypeScript language server, not from tree-sitter. You can confirm that, as well as what highlight group it's using, by running the :Inspect ex command with your cursor on one of the symbols that's getting highlighted. For whatever reason, it looks like @lsp.type.variable links to Identifier, even though @variable doesn't.

image

You can disable highlights from the language server as described here, by removing semanticTokensProvider from the server_capabilities. Judging from the LunarVim docs, I think that would look like this:

local default_on_init = require("lvim.lsp").common_on_init
require("lvim.lsp.manager").setup("tsserver", {
  on_init = function (client)
    client.server_capabilities.semanticTokensProvider = nil
    default_on_init(client)
  end,
})

Or, if you want to keep the LSP-based highlighting, you can just unlink the one group as described in the Neovim docs:
https://github.com/neovim/neovim/blob/32b49448b227588c2fbc93f89743104fd445e0a6/runtime/doc/lsp.txt#L470

from material.vim.

Andrii-Vovk avatar Andrii-Vovk commented on September 26, 2024

Fixed this for now with an autocommand:
"ColorScheme", { pattern = "*", callback = function() vim.cmd("highlight Identifier ctermfg=White guifg=White") end }

But it seems like a workaround, please let me know, if there is a proper solution

from material.vim.

kaicataldo avatar kaicataldo commented on September 26, 2024

Hiya! Do you know which TypeScript syntax highlighting plugin you're using? Here's what I see using my setup (using HerringtonDarkholme/yats.vim):
Screenshot 2024-01-19 at 7 05 45 PM

It's possible that the syntax highlighting plugin you're using is setting those values, so would be good to track down the root cause of the issue. Thanks!

from material.vim.

Andrii-Vovk avatar Andrii-Vovk commented on September 26, 2024

Hey! Lunarvim uses nvim-treesitter by default.
I tried disabling all the plugins that i added on top, and the issue persisted, so it seems that its an issue with treesitter? I'm pretty new to vim, so i'm not sure what are my next steps here, and this seems already out of scope here, as this is not a problem with your theme, but I would appreciate any help!
Thanks!

from material.vim.

Andrii-Vovk avatar Andrii-Vovk commented on September 26, 2024

Thank you, I really appreciate your help!

from material.vim.

kaicataldo avatar kaicataldo commented on September 26, 2024

@cpmsmith Thanks for digging into this!

from material.vim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.