Git Product home page Git Product logo

Comments (5)

loctvl842 avatar loctvl842 commented on August 25, 2024

Unused variables/imports: Is there a way to gray out the unused variables and imports like in vscode, rather than adding a blue squigly line like in this theme?

If you want to blur unused variable, you can try to install some plugin to do that. Because I can't detect the current color of unused variable, I just want to blur according to the current color of the variable (like the way vscode is doing), not just blur to gray.

Color of export/async/await: In vscode monokai pro these key words are in red, where as in this theme they are blue, is there some way i can change that?

There maybe some differences between vscode and neovim because some highlight groups neovim has while vscode doesn't and vice versa. Trust me, I tried a lot, don't waste your time to figure this out.

from monokai-pro.nvim.

kaykhan avatar kaykhan commented on August 25, 2024

Unused variables/imports: Is there a way to gray out the unused variables and imports like in vscode, rather than adding a blue squigly line like in this theme?

If you want to blur unused variable, you can try to install some plugin to do that. Because I can't detect the current color of unused variable, I just want to blur according to the current color of the variable (like the way vscode is doing), not just blur to gray.

Color of export/async/await: In vscode monokai pro these key words are in red, where as in this theme they are blue, is there some way i can change that?

There maybe some differences between vscode and neovim because some highlight groups neovim has while vscode doesn't and vice versa. Trust me, I tried a lot, don't waste your time to figure this out.

Hi thanks for your response.

  1. Do you know waht i need to override to get it to go gray+italic for unused variables. I'd be happy with that.

e.g

(current sonokai theme)
image

  1. with regards to await/async, i may try to find a way to just target the specific word "async" and "await" and make them red.

from monokai-pro.nvim.

kaykhan avatar kaykhan commented on August 25, 2024

@octvl842 Any ideas?

from monokai-pro.nvim.

loctvl842 avatar loctvl842 commented on August 25, 2024
  1. Do you know waht i need to override to get it to go gray+italic for unused variables. I'd be happy with that.

You can change highlight of DiagnosticUnecessary

  1. with regards to await/async, i may try to find a way to just target the specific word "async" and "await" and make them red.

You can change highlight of @keyword.coroutine.javascript

from monokai-pro.nvim.

maxpetretta avatar maxpetretta commented on August 25, 2024

adding my own config overrides here, in case it can help other neovim noobs (like myself), make the transition:

note: primarily made for jsx/tsx usage, so ymmv

./nvim/lua/plugins/monokai-pro.lua

return {
  {
    "loctvl842/monokai-pro.nvim",
    opts = {
      override = function(c)
        return {
          Structure = { italic = false }, -- interface identifiers
          ["@keyword.function"] = { bold = false }, -- "function"
          ["@keyword.overrides"] = { fg = c.base.cyan, italic = true }, -- custom capture group for "const", "let", "type"
          ["@keyword.type"] = { fg = c.base.cyan, italic = true }, -- "interface"
          ["@keyword"] = { fg = c.base.red, italic = false }, -- "if", "else", "for", "while"
          ["@lsp.type.enumMember"] = { fg = c.base.white }, -- enums
          ["@lsp.typemod.function.defaultLibrary"] = { fg = c.base.green }, -- global functions
          ["@lsp.typemod.variable.defaultLibrary"] = { fg = c.base.white }, -- global objects
          ["@lsp.typemod.variable.readonly"] = { fg = c.base.white }, -- constant identifiers
          ["@punctuation.bracket"] = { fg = c.base.dimmed2 }, -- brackets
          ["@tag.builtin"] = { fg = c.base.red }, -- HTML tags
          ["@type"] = { fg = c.base.white }, -- imported objects
          ["@variable.member"] = { fg = c.base.white }, -- object properties
        }
      end,
    },
  },
}

./nvim/queries/tsx/highlights.scm

[
  "const"
  "let"
  "type"
] @keyword.overrides
["?"] @operator.overrides

./nvim/lua/plugins/treesitter.lua

return {
  "nvim-treesitter/nvim-treesitter",
  opts = {
    highlight = {
      set_custom_captures = {
        ["@keyword.overrides"] = "@keyword.function",
        ["@operator.overrides"] = "@keyword.conditional",
      }
    }
  }
}

from monokai-pro.nvim.

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.