Godot Shader Language Server
July 6, 2025 ยท View on GitHub
External editor support for .gdshader files.
Warning
๐ง Early Work in Progress
This project is in its infancy and currently only supports some basic keyword completion. Feel free to โญ the repo to track progress and signal to me that there is interest!
Godot's shader language is powerful, but editing .gdshader files outside the
Godot editor is painful. This project aims to bring proper language tooling
(autocomplete, hover, references, etc.) to editors like Neovim and VSCode. It
aims to be memory-efficient and editor-agnostic.
๐ฑ Prior Work
-
@GodOfAvacyn is the author of the treesitter plugin and language server for the Godot shader language. Their treesitter plugin is great! As of writing, their language server has many false positive diagnostics, and the project became inactive while they were working on a full rewrite.
-
@AlfishSoftware is the author of the Godot Files VSCode Extension, which includes some support for
.gdshaderfiles. However, it is VSCode-only. If you are a VSCode user, I recommend checking it out! -
There is an official Godot VSCode plugin, but it has minimal shader support and is VSCode-only.
๐ฆ Install
VSCode
Neovim
-
Choose an installation method
Homebrew
brew install armsnyder/tap/gdshader-language-serverGo
go install github.com/armsnyder/gdshader-language-server@latestGithub Releases
-
Configure Neovim
Create a
~/.config/nvim/after/ftplugin/gdshader.luafile with the following content, assuminggdshader-language-serveris in your$PATH:vim.lsp.start({ name = "gdshader", cmd = { 'gdshader-language-server' }, capabilities = vim.lsp.protocol.make_client_capabilities(), })
Roadmap
Planned features:
- Basic keyword completion
- Basic shader-type-dependent global built-in completion
(
VERTEX,NORMAL, etc.) - VSCode wrapper extension
- Grammar for the VSCode extension
- Make the code more maintainable by generating rules based on the official Godot documentation
- Built-ins for shader types other than
spatial - More advanced completion (functions, variables, etc.)
- Go to definition
- Find references
- Formatting
- Hover (show documentation)
- Signature help
๐ค Contributing
I love to see issues and pull requests! Just note that this is a side project for me, and I cannot promise to respond quickly. I will generally accept pull requests which are relevant to the project goals, are tested, and follow existing code conventions.
๐ Code structure
.
โโโ main.go # Entry point
โโโ internal
โโโ app # Main application logic
โโโ ast # .gdshader file parser library (application agnostic)
โโโ lsp # LSP server library (application agnostic)
โโโ testutil # Test utilities for all packages
License
MIT