Created
February 17, 2025 19:22
-
-
Save p1xelHer0/b162d5a95c0c143849121f350e349a54 to your computer and use it in GitHub Desktop.
HLSL Tools LSP for Neovim
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vim.filetype.add({ | |
extension = { | |
hlsl = "hlsl", | |
}, | |
}) | |
if not require("lspconfig.configs").hlsl_tools then | |
require("lspconfig.configs").hlsl_tools = { | |
default_config = { | |
cmd = | |
-- Install HLSL Tools with VSCode | |
-- https://marketplace.visualstudio.com/items?itemName=TimGJones.hlsltools | |
-- Check the directory yourself and set version and OS in the string below | |
"/Users/YOUR_NAME/.vscode/extensions/timgjones.hlsltools-1.1.303/bin/osx-x64/ShaderTools.LanguageServer", | |
}, | |
root_dir = require("lspconfig").util.root_pattern(".git"), -- or whatever you prefer | |
filetypes = { "hlsl" }, | |
}, | |
} | |
end | |
-- Set it up as usual | |
("lspconfig.configs").hlsl_tools.setup({}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment