Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Colorify not removing visual representation of color #364

Open
Nanito111 opened this issue Oct 12, 2024 · 23 comments
Open

Bug: Colorify not removing visual representation of color #364

Nanito111 opened this issue Oct 12, 2024 · 23 comments

Comments

@Nanito111
Copy link

Describe the bug
Colorify not removing visual representation of color after removing the color hex.

To Reproduce
Write hex color, Colorify showing visual representation of color, remove hex color.

Expected behavior
Visual representation of color getting removed.

Screenshots
https://github.com/user-attachments/assets/068762e3-5651-4af8-85b2-439ae1187b8b

Operating System:
Fedora Linux 40 (KDE Plasma) x86_64

Neovim Version:
NVIM v0.10.1
Build type: RelWithDebInfo
LuaJIT 2.1.1720049189

@siduck
Copy link
Member

siduck commented Oct 12, 2024

good bug, will look on it today!

@siduck
Copy link
Member

siduck commented Oct 12, 2024

till then use the bg mode of colorify. read :h nvui.colorify

@siduck
Copy link
Member

siduck commented Oct 12, 2024

unable to reproduce, u sure u are on latest commit of ui plugin?

simplescreenrecorder-2024-10-12_17.07.05.mp4

@Nanito111
Copy link
Author

image
I confirm that im on last commit of UI plugin.

I check that it doens't happen with lua files. I also check with css files like u did and it happens.

@Nanito111
Copy link
Author

Error executing vim.schedule lua callback: ...local/share/nvim/lazy/ui/lua/nvchad/colorify/methods.lua:67: Invalid 'end_col': out of range                      
stack traceback:                                                                                                                                                
        [C]: in function 'set_extmark'                                                                                                                          
        ...local/share/nvim/lazy/ui/lua/nvchad/colorify/methods.lua:67: in function 'handler'                                                                   
        /usr/share/nvim/runtime/lua/vim/lsp/client.lua:687: in function ''                                                                                      
        vim/_editor.lua: in function <vim/_editor.lua:0>

I got this error log

@Spell28
Copy link

Spell28 commented Dec 10, 2024

Same problem, some times i see this traceback
Снимок экрана 2024-12-10 в 16 18 14

@siduck
Copy link
Member

siduck commented Dec 10, 2024

produce a video so i can reproduce

@Spell28
Copy link

Spell28 commented Dec 10, 2024

@siduck i got this, for me this should be after insert codeium suggestion

2024-12-10.17.13.52.mov

@siduck
Copy link
Member

siduck commented Dec 10, 2024

nice, will debug

@siduck
Copy link
Member

siduck commented Dec 18, 2024

unable to reproduce, can you share a minimal file with vid?

@Nanito111
Copy link
Author

I just reinstalled everything including nvim and nvchad, and now I don't have this problem anymore, maybe there was something wrong with my nvchad installation ¿? idk to be honest haha

@siduck
Copy link
Member

siduck commented Dec 21, 2024

ohh, if someone reproduces with minimal file+vid then i'll debug this @Spell28

@Spell28
Copy link

Spell28 commented Dec 21, 2024

Now I'll try to create a repository with a minimal example and video

@Spell28
Copy link

Spell28 commented Dec 21, 2024

@siduck Copy the css file below to any directory, create a line with two spaces and shift+v and do yank, then just hold down the p button to paste as in the example video

P.S: I'm going to try it on pure nvchad now.
P.S.S: I confirm that there is also an error on a clean nvchad, @siduck I also think you should check this on a weak laptop..

2024-12-21.13.16.57.mov
Some css

:root {
  font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  font-weight: 400;

  color-scheme: light dark;
  color: rgba(255, 255, 255, 0.87);
  background-color: #242424;

  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  font-weight: 500;
  color: #646cff;
  text-decoration: inherit;
}
a:hover {
  color: #535bf2;
}

body {
  margin: 0;
  display: flex;
  place-items: center;
  min-width: 320px;
  min-height: 100vh;
}

h1 {
  font-size: 3.2em;
  line-height: 1.1;
}

button {
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0.6em 1.2em;
  font-size: 1em;
  font-weight: 500;
  font-family: inherit;
  background-color: #1a1a1a;
  cursor: pointer;
  transition: border-color 0.25s;
}
button:hover {
  border-color: #646cff;
}
button:focus,
button:focus-visible {
  outline: 4px auto -webkit-focus-ring-color;
}

@media (prefers-color-scheme: light) {
  :root {
    color: #213547;
    background-color: #ffffff;
  }
  a:hover {
    color: #747bff;
  }
  button {
    background-color: #f9f9f9;
  }
}

@siduck
Copy link
Member

siduck commented Dec 24, 2024

@Spell28 have you updated ui plugin to the latest?

@Spell28
Copy link

Spell28 commented Dec 24, 2024

@siduck Of course, nothing has changed

2024-12-24.14.13.50.mov

@siduck
Copy link
Member

siduck commented Dec 24, 2024

simplescreenrecorder-2024-12-24_14.59.56.mp4

weird unable to reproduce

@Spell28
Copy link

Spell28 commented Dec 24, 2024

@siduck Use yank and past line with two spaces, don't use new line (enter), with enter error is not shown.

@Spell28
Copy link

Spell28 commented Dec 25, 2024

@siduck I changed the lspvars option to false and the error does not appear, does this suggest something?

@siduck
Copy link
Member

siduck commented Dec 25, 2024

@siduck I changed the lspvars option to false and the error does not appear, does this suggest something?

that means there will be no lsp based highlighting i.e from css lsp, tailwind etc

@Spell28
Copy link

Spell28 commented Dec 25, 2024

I don't know how but this completely eliminates the problem, so somewhere in the code associated with this setting there is a problem. Now not everything highlights up because I turned it off, but at least I can use this.
PS. I noticed that this bug breaks LSP, it stops giving auto-completions, etc., but not always
PSS. If you tell me what to do I can debug for you

@siduck
Copy link
Member

siduck commented Dec 26, 2024

simplescreenrecorder-2024-12-26_15.30.10.mp4

i yanked and pasted, still no err @Spell28

you got discord or something? i want to debug and fix this issue real quick

@Nanito111
Copy link
Author

Maybe is something that is present in a specific OS? I had this issue when I was on Fedora, now I'm on Arch and I don't 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants