Giter VIP home page Giter VIP logo

Comments (6)

dpetka2001 avatar dpetka2001 commented on July 18, 2024 1

Because this way has been deprecated for the LSP diagnostic icons. You should change them in

{
  "neovim/nvim-lspconfig",
  opts = {
      diagnostics = {
        signs = {
          text = {
            [vim.diagnostic.severity.ERROR] = your_sign_1,
            [vim.diagnostic.severity.WARN] = your_sign_2,
            [vim.diagnostic.severity.HINT] = your_sign_3,
            [vim.diagnostic.severity.INFO] = your_sign_4,
          },
        },
      },
  },
}

from lazyvim.

folke avatar folke commented on July 18, 2024

Those icons are an option for the LazyVim plugin. It's all in the docs.
https://www.lazyvim.org/configuration#icons--colorscheme

from lazyvim.

czfadmin avatar czfadmin commented on July 18, 2024

Thank you very much. I misread this configuration. I'll try it later. This project is great.

from lazyvim.

czfadmin avatar czfadmin commented on July 18, 2024

@folke Why do I have this effect when I configure it this way?

image

This is my configuration:

-- Configure LazyVim to load gruvbox
return {
  "LazyVim/LazyVim",
  opts = {
    colorscheme = "sonokai",
    icons = {
      diagnostics = {
        Error = "",
        Warn = "",
        Hint = "",
        Info = "",
      },
    },
  },
}

from lazyvim.

dpetka2001 avatar dpetka2001 commented on July 18, 2024

Actually it should happen with the changing the icons in LazyVim spec, but I believe that nvim-lspconfig opts are getting parsed during parsing phase, thus LazyVim.config.icons.diagnostics is getting evaluated at that moment and gets the icon from the default config instead of what the user has specified in his personal configuration.

If we make opts a function, then LazyVim.config.icons.diagnostics get evaluated when nvim-lspconfig gets loaded and it takes correctly into consideration whatever icon the user has changed in his personal configuration for LazyVim spec.

Should we make that change @folke?

from lazyvim.

czfadmin avatar czfadmin commented on July 18, 2024

因为这种方式已不再适用于LSP诊断图标。您应该在代码中进行更改。

{
  "neovim/nvim-lspconfig",
  opts = {
      diagnostics = {
        signs = {
          text = {
            [vim.diagnostic.severity.ERROR] = your_sign_1,
            [vim.diagnostic.severity.WARN] = your_sign_2,
            [vim.diagnostic.severity.HINT] = your_sign_3,
            [vim.diagnostic.severity.INFO] = your_sign_4,
          },
        },
      },
  },
}

@dpetka2001. Thank you. It is indeed possible to modify the diagnostic icon. I feel that adding this feature is very good. Because as a user of lazyvim, many people want to beautify the lazyvim theme they use.

from lazyvim.

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.