diff --git a/doc/server_configurations.md b/doc/server_configurations.md index 6708f6a450..1c9f663bd2 100644 --- a/doc/server_configurations.md +++ b/doc/server_configurations.md @@ -206,6 +206,7 @@ autogenerated from the Lua files. You can view this file in Nvim by running - [scry](#scry) - [serve_d](#serve_d) - [sixtyfps](#sixtyfps) +- [slangd](#slangd) - [slint_lsp](#slint_lsp) - [smarty_ls](#smarty_ls) - [smithy_ls](#smithy_ls) @@ -8961,6 +8962,58 @@ require'lspconfig'.sixtyfps.setup{} ``` +## slangd + +https://github.com/shader-slang/slang + +The `slangd` binary can be downloaded as part of [slang releases](https://github.com/shader-slang/slang/releases) or +by [building `slang` from source](https://github.com/shader-slang/slang/blob/master/docs/building.md). + +The server can be configured by passing a "settings" object to `slangd.setup{}`: + +```lua +require('lspconfig').slangd.setup{ + settings = { + slang = { + predefinedMacros = {"MY_VALUE_MACRO=1"}, + inlayHints = { + deducedTypes = true, + parameterNames = true, + } + } + } +} +``` +Available options are documented [here](https://github.com/shader-slang/slang-vscode-extension/tree/main?tab=readme-ov-file#configurations) +or in more detail [here](https://github.com/shader-slang/slang-vscode-extension/blob/main/package.json#L70). + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.slangd.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "slangd" } + ``` + - `filetypes` : + ```lua + { "hlsl", "shaderslang" } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + - `single_file_support` : + ```lua + true + ``` + + ## slint_lsp https://github.com/slint-ui/slint diff --git a/doc/server_configurations.txt b/doc/server_configurations.txt index 6708f6a450..1c9f663bd2 100644 --- a/doc/server_configurations.txt +++ b/doc/server_configurations.txt @@ -206,6 +206,7 @@ autogenerated from the Lua files. You can view this file in Nvim by running - [scry](#scry) - [serve_d](#serve_d) - [sixtyfps](#sixtyfps) +- [slangd](#slangd) - [slint_lsp](#slint_lsp) - [smarty_ls](#smarty_ls) - [smithy_ls](#smithy_ls) @@ -8961,6 +8962,58 @@ require'lspconfig'.sixtyfps.setup{} ``` +## slangd + +https://github.com/shader-slang/slang + +The `slangd` binary can be downloaded as part of [slang releases](https://github.com/shader-slang/slang/releases) or +by [building `slang` from source](https://github.com/shader-slang/slang/blob/master/docs/building.md). + +The server can be configured by passing a "settings" object to `slangd.setup{}`: + +```lua +require('lspconfig').slangd.setup{ + settings = { + slang = { + predefinedMacros = {"MY_VALUE_MACRO=1"}, + inlayHints = { + deducedTypes = true, + parameterNames = true, + } + } + } +} +``` +Available options are documented [here](https://github.com/shader-slang/slang-vscode-extension/tree/main?tab=readme-ov-file#configurations) +or in more detail [here](https://github.com/shader-slang/slang-vscode-extension/blob/main/package.json#L70). + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.slangd.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "slangd" } + ``` + - `filetypes` : + ```lua + { "hlsl", "shaderslang" } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + - `single_file_support` : + ```lua + true + ``` + + ## slint_lsp https://github.com/slint-ui/slint