Prolog LSP now supports colours (Discussion)

Does it cause the screen to jitter, flash, give one headaches when it does the screen update or requires one to take a coffee break when using?

If no keep going.

I use to worry about such things a long time ago and found that it was usually just one thing done wrong that would shoot up the runtime. So obviously that would get fixed. Never seems to amaze me how much a processor will do between the time you press and then release a key. I think about some of the online games I play that update with 50 players in a massive battle with the player interaction calculations being done on a central server thousands of miles away and it just works.

I meant more “visually busy” – it highlights a lot of stuff now :stuck_out_tongue:

You should see my use of VSC with Prolog I sometimes have over 30 files open in 10 windows and the windows have micro views of the code on the right, search indicators, error - warning - spelling indicators, line counts, etc. I haven’t checked recently but am waiting for VSC to work across multiple monitors.

I also find that with dark mode it is much easier to look at a really busy screen.

Hi, I am trying to use your LSP server, with some success. I am using neovim. I installed the pack you provide:

$ swipl pack install lsp_server

And then I followed the native Neovim instructions.

In addition, I had to add this to my init.lua:

vim.lsp.enable('prolog')

It seems to work but I see a LOT of the same color… This is regardless of color scheme. I am attaching a small screenshot.

Is this working as intended? Is the color the same by coincident or on purpose, or because I have mis-configured something?

Hm, I haven’t tested the “semantic colours” LSP feature in a while, but I don’t think it should look like that. If you open a prolog file without the LSP enabled, does it look more reasonable? I’ll give it a try myself and see what I can determine

Yes, both the “built in” Prolog support by Neovim and especially the logtalk syntax highlighter for Vim give different and maybe better results.

It might be an issue with the colorscheme not defining faces for the semantic tokens. This link here has some information on setting the faces, as well as how to just disable it so the normal colour scheme will come through.

For what it’s worth, the below is what I get with a neovim config that does nothing except configure the Prolog LSP: