Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Open sidebar
cppit
jucipp
Commits
a89a965a
Commit
a89a965a
authored
Sep 17, 2020
by
Jørgen Lien Sellæg
Browse files
add support for glsl shaders closes
#439
parent
04b5aace
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
1 deletion
+22
-1
docs/language_servers.md
docs/language_servers.md
+14
-0
src/source.cpp
src/source.cpp
+7
-0
src/source_base.cpp
src/source_base.cpp
+1
-1
No files found.
docs/language_servers.md
View file @
a89a965a
...
...
@@ -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
```
src/source.cpp
View file @
a89a965a
...
...
@@ -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"
)
{
...
...
src/source_base.cpp
View file @
a89a965a
...
...
@@ -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
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment