nvimdev / lspsaga.nvim

improve neovim lsp experience
MIT License
3.37k stars 285 forks source link

Q: latest diangostic style is deifferent with older #1442

Closed 0x00-ketsu closed 1 month ago

0x00-ketsu commented 1 month ago

Describe the bug

Compared with the latest diangostic style, I personally feel that the previous version (45be478ddeac8c0b60153acc826ec5e30feeb15d) is more elegant.

Steps to reproduce

# python
if __name__ == "__main__":
    s = 'foo

Execute with command Lspsaga diagnostic_jump_next

Expected behavior

latest

image

previous version 45be478ddeac8c0b60153acc826ec5e30feeb15d

image

Neovim version (nvim -v)

0.10.0

lspsaga commit

ac2720450a940cc306ce495dd06a92e253d91f09

Terminal name/version

xterm2

glepnir commented 1 month ago

the new implementation is based on neovim original diagnostic jump . it support show many diagnostic informations. so what the expect behavior then ? border color ?

0x00-ketsu commented 1 month ago

the new implementation is based on neovim original diagnostic jump . it support show many diagnostic informations. so what the expect behavior then ? border color ?

glepnir commented 1 month ago

that's easy but if the position have many diangostic informations like E W the border still use ERROR a bit wired.

0x00-ketsu commented 1 month ago

that's easy but if the position have many diangostic informations like E W the border still use ERROR a bit wired.

Understand, this is just a personal suggestion

glepnir commented 1 month ago

I have update an ui improve it works like this now.

image
0x00-ketsu commented 1 month ago

I have update an ui improve it works like this now.

image

👍

But, the new UI when works with plugin ellisonleao/gruvbox.nvim enable transparent_mode, diangostic sign E W background color is gone, like below

image

min config

local api = vim.api

api.nvim_command('set nu')
api.nvim_command('set relativenumber')

vim.opt.signcolumn = 'yes'

-- Plugins
local lazypath = vim.fn.stdpath('data') .. '/lazy/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',
    '--branch=stable', -- latest stable release
    lazypath,
  })
end
vim.opt.rtp:prepend(lazypath)

-- Example using a list of specs with the default options
vim.g.mapleader = ',' -- Make sure to set `mapleader` before lazy so your mappings are correct

require('lazy').setup({
  {
    'ellisonleao/gruvbox.nvim',
    config = function()
      require('gruvbox').setup({
        transparent_mode = true,
      })
    end,
  },
  {
    'hrsh7th/nvim-cmp',
    event = 'InsertEnter',
    config = function()
      ---@diagnostic disable-next-line: missing-fields
      require('cmp').setup({})
    end,
    dependencies = {
      { 'hrsh7th/cmp-nvim-lsp' },
    },
  },
  {
    'neovim/nvim-lspconfig',
    config = function()
      require('lspconfig').lua_ls.setup({})
      require('lspconfig').gopls.setup({})
      require('lspconfig').pyright.setup({})
      require('lspconfig').rust_analyzer.setup({})
    end,
  },
  {
    'williamboman/mason.nvim',
    config = function()
      require('mason').setup({})
    end,
  },
  { 'williamboman/mason-lspconfig.nvim' },
  {
    'nvimtools/none-ls.nvim',
    config = function()
      local null_ls = require('null-ls')
      local code_actions = null_ls.builtins.code_actions
      local diagnostics = null_ls.builtins.diagnostics
      null_ls.setup({
        sources = {
          code_actions.gitsigns,
          diagnostics.golangci_lint,
        },
      })
    end,
    dependencies = { { 'nvim-lua/plenary.nvim' } },
  },
  {
    'lewis6991/gitsigns.nvim',
    lazy = true,
    event = { 'BufRead', 'BufNewFile' },
    config = function()
      require('gitsigns').setup({})
    end,
    dependencies = { 'nvim-lua/plenary.nvim' },
  },
  {
    'glepnir/lspsaga.nvim',
    event = 'BufRead',
    config = function()
      require('lspsaga').setup({
        implement = { enable = true },
      })
    end,
    dependencies = { { 'nvim-tree/nvim-web-devicons' }, { 'nvim-treesitter/nvim-treesitter' } },
  },
})

vim.cmd('colorscheme gruvbox')
glepnir commented 1 month ago

what's the output of hi DiagnosticError ? config it like hi DiagnosticError guifg=red border is hi FloatBorder

update

image
0x00-ketsu commented 1 month ago

hi DiagnosticError

DiagnosticError xxx links to GruvboxRed
GruvboxRed     xxx guifg=#fb4934
glepnir commented 1 month ago

update now should work i guess

0x00-ketsu commented 1 month ago

update now should work i guess

update to latest, background still not work

image
glepnir commented 1 month ago

:hi DiagnosticErrorReverse output is what

0x00-ketsu commented 1 month ago

DiagnosticErrorReverse

DiagnosticERRORReverse xxx guifg=Black
glepnir commented 1 month ago

should be works .I ignore it still need get color again when it's a link

0x00-ketsu commented 1 month ago

should be works .I ignore it still need get color again when it's a link

works fine now 👏