tiagovla / tokyodark.nvim

A clean dark theme written in lua for neovim.
453 stars 19 forks source link

highlights for dap? #23

Closed niksingh710 closed 11 months ago

niksingh710 commented 11 months ago

DapLogPoint DapBreakpoint DapStopped

will it be possible to have highlights for dap in the theme?

tiagovla commented 11 months ago

Yep, gonna check it when I get some free time.

tiagovla commented 11 months ago

Could you share a screenshot showing where those highlights are placed using DAP?

niksingh710 commented 11 months ago

Could you share a screenshot showing where those highlights are placed using DAP?

image

here the bug icons is what that need to be colored.

vim.fn.sign_define(
    "DapBreakpoint",
    { text = icons.ui.Bug, texthl = "DapBreakpoint", linehl = "DapBreakpoint", numhl = "DapBreakpoint" }
)
vim.fn.sign_define(
    "DapBreakpointCondition",
    { text = "ﳁ", texthl = "DapBreakpoint", linehl = "DapBreakpoint", numhl = "DapBreakpoint" }
)
vim.fn.sign_define(
    "DapBreakpointRejected",
    { text = icons.ui.Bug, texthl = "DapBreakpoint", linehl = "DapBreakpoint", numhl = "DapBreakpoint" }
)
vim.fn.sign_define(
    "DapLogPoint",
    { text = icons.diagnostics.BoldInformation, texthl = "DapLogPoint", linehl = "DapLogPoint", numhl = "DapLogPoint" }
)
vim.fn.sign_define(
    "DapStopped",
    { text = icons.ui.BoldArrowRight, texthl = "DapStopped", linehl = "DapStopped", numhl = "DapStopped" }
)

vim.api.nvim_set_hl(0, "DapBreakpoint", { fg = "#993939", bg = nil })
vim.api.nvim_set_hl(0, "DapLogPoint", { fg = "#61afef", bg = nil })
vim.api.nvim_set_hl(0, "DapStopped", { fg = "#98c379", bg = nil })

This is what i got from their github but it only works if i source it manually

sorry for the late response was busy.

tiagovla commented 11 months ago

Thanks! I will look into it. If you want to use custom highlights, you could try those like this:

require("tokyodark").setup {
    custom_highlights = {
        DapBreakpoint = { fg = "#993939" },
        DapLogPoint = { fg = "#61afef" },
        DapStopped = { fg = "#98c379" },
    },
}
-- before calling the colorscheme
niksingh710 commented 11 months ago

This throws an error failed to call setup on a nil value h

{
        "tiagovla/tokyodark.nvim",
        config = function()
            require("tokyodark").setup({
                custom_highlights = {
                    DapBreakpoint = { fg = "#993939" },
                    DapLogPoint = { fg = "#61afef" },
                    DapStopped = { fg = "#98c379" },
                },
            })
        end,
    },

lazy config

niksingh710 commented 11 months ago

This throws an error failed to call setup on a nil value h

{
      "tiagovla/tokyodark.nvim",
      config = function()
          require("tokyodark").setup({
              custom_highlights = {
                  DapBreakpoint = { fg = "#993939" },
                  DapLogPoint = { fg = "#61afef" },
                  DapStopped = { fg = "#98c379" },
              },
          })
      end,
  },

lazy config

seems like this was cause i was not on latest commit. now working as expected after updating