Skip to content
This repository was archived by the owner on Jan 16, 2025. It is now read-only.

Can you tell the server what language dialect to use? #45

Open
SanderNotenbaert opened this issue Jul 3, 2023 · 3 comments
Open

Can you tell the server what language dialect to use? #45

SanderNotenbaert opened this issue Jul 3, 2023 · 3 comments

Comments

@SanderNotenbaert
Copy link

SanderNotenbaert commented Jul 3, 2023

I've got glsl-language-server set up on Neovim using require'lspconfig'.glslls.setup{}. Working fine, but I'm getting diagnostics saying
'glslang: 'non-opaque uniforms outside a block': not allowed when using GLSL for Vulkan'

I'm not using Vulkan though. Is there a way to configure the language server for OpenGL Legacy?

@nolanderc
Copy link
Collaborator

I cannot verify right now, but try passing the --target-env=opengl argument to glslls (double-check the exact names using the --help flag)

@SanderNotenbaert
Copy link
Author

Thanks for the suggestion! I've tried adding require("lspconfig").glslls.setup({ cmd = { "glslls", "--stdin", "--target-env=opengl" } }) in my Neovim setup. So far no change, as far as I can tell. LSP works, but catered to Vulkan it seems.

@mixnam
Copy link
Contributor

mixnam commented Jul 17, 2023

@SanderNotenbaert @nolanderc I created draft PR, that solved this problem for me.
But I don't have exp in c++, and might did smth wrong. Anyway I would appreciate if you tried to test my fixes and provided some feedback if fixes work for you as well.

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

No branches or pull requests

3 participants