LuaLS / lua-language-server

A language server that offers Lua language support - programmed in Lua
https://luals.github.io
MIT License
3.33k stars 316 forks source link

Code color breaks frequently #1599

Open mkster opened 2 years ago

mkster commented 2 years ago

How are you using the lua-language-server?

Visual Studio Code Extension (sumneko.lua)

Which OS are you using?

Windows

What is the issue affecting?

Other

Expected Behaviour

.

Actual Behaviour

Code coloring breaks frequently after doing edits

image

Reproduction steps

Not sure how to repro but it happens every day for me

Additional Notes

No response

Log File

No response

sumneko commented 2 years ago

Are you using plugin? What is the version of the extension?

mkster commented 2 years ago

Yes this plugin https://github.com/AtomontageInc/vscode-atomontage-lua/blob/master/am_library/Atomontage/plugin.lua Version: v3.5.6

sumneko commented 2 years ago

Could you please test if this commit fixed the issue? You can manually apply this commit, or download server from https://github.com/sumneko/lua-language-server/actions/runs/3221180528

mkster commented 2 years ago

yes seems to work, thank you

mkster commented 2 years ago

Actually its still happening, this time it happened when I created a new file and used a snippet

sumneko commented 2 years ago

Could you please provide a demo project?

sumneko commented 2 years ago

Please check if this commit works: https://github.com/sumneko/lua-language-server/actions/runs/3263623330

mkster commented 2 years ago

Just tried with this.

Created a new file, typed a few characters. Saved file as lua, removed the characters and used my snippet.

Getting this wrong error:

image

Using the first 'script component' snippet here https://github.com/AtomontageInc/vscode-atomontage-lua/blob/master/snippets/snippets.json

So far didnt see wrong colors but will test with this for a while.

mkster commented 2 years ago

Color broke again for me, it seems to happen less often now though

sumneko commented 2 years ago

Please test this commit

mkster commented 1 year ago

Its still happening in v3.6.3. Seemed to have happened when I tabbed back into vscode

mkster commented 1 year ago

Aha! Finally found the way to reproduce. It happens when using git ui. Do some changes and then press discard changes in source control. Now make a change in the file. Coloring is messed up

image
sumneko commented 1 year ago

Are you running in Non-Windows platform? If yes, it maybe a filewatch issue.

mkster commented 1 year ago

I am using windows

sumneko commented 1 year ago

Is there a large number of files in your workspace?

mkster commented 1 year ago

Roughly 100 or less

sumneko commented 1 year ago

I still cannot reproduce, could you provide a demo project?

FlashHit commented 1 year ago

I just put this in here. As the title sounds like this issue could fit in here.

---@field test table<integer, { test: boolean }>

Check the >. grafik

sumneko commented 1 year ago

I just put this in here. As the title sounds like this issue could fit in here.

---@field test table<integer, { test: boolean }>

Check the >. grafik

No, it's #626