gdshader-language-server

command module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 27, 2025 License: MIT Imports: 8 Imported by: 0

README ΒΆ

Godot Shader Language Server

Go License

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.

πŸ“¦ Install

Neovim
  1. Install from source:

    go install github.com/armsnyder/gdshader-language-server@latest
    
  2. Create a ~/.config/nvim/after/ftplugin/gdshader.lua file with the following content, adjusting the path to the gdshader-language-server binary if necessary:

    vim.lsp.start({
      name = "gdshader",
      cmd = { vim.fs.expand('~/go/bin/gdshader-language-server') },
      capabilities = vim.lsp.protocol.make_client_capabilities(),
    })
    
VSCode

Coming soon? Contributions welcome!

Roadmap

Planned features:

  • Basic keyword completion
  • Basic shader-type-dependent global built-in completion (VERTEX, NORMAL, etc.)
  • More advanced completion (functions, variables, etc.)
  • Go to definition
  • Find references
  • Formatting
  • Hover (show documentation)
  • Signature help
  • VSCode wrapper extension

🀝 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

Documentation ΒΆ

The Go Gopher

There is no documentation for this package.

Directories ΒΆ

Path Synopsis
internal
app
ast
lsp

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL