svenstaro / glsl-language-server

Language server implementation for GLSL
MIT License
173 stars 29 forks source link

Client glslls quit with exit code 0 and signal 6 #59

Open Thisishemmit opened 1 month ago

Thisishemmit commented 1 month ago

I'm using glslls along with lsp_config.nvim and whenever I try to open glsl file in the editor this error show up:

Client glslls quit with exit code 0 and signal 6. Check log
 for errors: /home/user/.local/state/nvim/lsp.log

The log line in lsp.log is:

[ERROR][2024-07-25 15:13:05] .../vim/lsp/rpc.lua:772    "rpc"   "/usr/local/bin/glslls" "stderr"    "terminate called after throwing an instance of 'std::invalid_argument'\n  what():  Unknown file extension!\n"

And the glslls.lua of the lsp_config.nvim is:

local util = require "lspconfig.util"

return {
    default_config = {
        cmd = {"glslls", "--stdin"},
        filetypes = {
            "glsl",
            "vert",
            "tesc",
            "tese",
            "frag",
            "geom",
            "comp"
        },
        root_dir = util.find_git_ancestor,
        single_file_support = true,
        capabilities = {
            textDocument = {
                completion = {
                    editsNearCursor = true
                }
            },
            offsetEncoding = {
                "utf-8",
                "utf-16"
            }
        }
    },
    docs = {
        description = [[
https://github.com/svenstaro/glsl-language-server
Language server implementation for GLSL
`glslls` can be compiled and installed manually, or, if your distribut>
via the `glsl-language-server` AUR package
    ]]
    }
}
svenstaro commented 1 month ago

Hm that's odd. Can you tell what file extension your plugin tries to communicate?

Thisishemmit commented 1 month ago

@svenstaro my file extension was .glsl but after i added .frag like .frag.glsl it worked but highlighted some errors like:

uniform float time;     ■ 'non-opaque uniforms outside a block' : not allowed when using GLSL for Vulkan