Commit a89a965a authored by Jørgen Lien Sellæg's avatar Jørgen Lien Sellæg
Browse files

add support for glsl shaders closes #439

parent 04b5aace
......@@ -78,3 +78,17 @@ ln -s ~/.cargo/bin/rust-analyzer /usr/local/bin/rust-language-server
* Additional setup within a Rust project:
* Add an empty `.rust-format` file to enable style format on save
## GLSL
Install language server, and create a script to enable server in juCi++:
```sh
git clone https://github.com/svenstaro/glsl-language-server --recursive
cd glsl-language-server
mkdir build
cd build
cmake ..
make
# usually as root:
make install
echo "/usr/local/bin/glslls --stdin" > /usr/local/bin/glsl-language-server
```
......@@ -66,6 +66,13 @@ Glib::RefPtr<Gsv::Language> Source::guess_language(const boost::filesystem::path
language = language_manager->get_language("cpphdr");
else if(file_path.extension() == ".ts" || file_path.extension() == ".tsx" || file_path.extension() == ".jsx" || file_path.extension() == ".flow")
language = language_manager->get_language("js");
else if(file_path.extension() == ".vert" || // listed on https://github.com/KhronosGroup/glslang
file_path.extension() == ".frag" ||
file_path.extension() == ".tesc" ||
file_path.extension() == ".tese" ||
file_path.extension() == ".geom" ||
file_path.extension() == ".comp")
language = language_manager->get_language("glsl");
else if(!file_path.has_extension()) {
for(auto &part : file_path) {
if(part == "include") {
......
......@@ -160,7 +160,7 @@ Source::BaseView::BaseView(const boost::filesystem::path &file_path, const Glib:
language_id == "c-sharp" || language_id == "html" || language_id == "cuda" ||
language_id == "php" || language_id == "rust" || language_id == "swift" ||
language_id == "go" || language_id == "scala" || language_id == "opencl" ||
language_id == "json" || language_id == "css")
language_id == "json" || language_id == "css" || language_id == "glsl")
is_bracket_language = true;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment