This commit is contained in:
2025-11-23 23:22:46 +09:00
14 changed files with 9 additions and 4 deletions

View File

View File

View File

0
lsp/linux-x64/hlsl/ShaderTools.CodeAnalysis.Hlsl.pdb Normal file → Executable file
View File

View File

View File

View File

View File

0
lsp/linux-x64/hlsl/ShaderTools.CodeAnalysis.pdb Normal file → Executable file
View File

0
lsp/linux-x64/hlsl/ShaderTools.LanguageServer Normal file → Executable file
View File

0
lsp/linux-x64/hlsl/ShaderTools.LanguageServer.pdb Normal file → Executable file
View File

0
lsp/linux-x64/hlsl/ShaderTools.Utilities.pdb Normal file → Executable file
View File

0
lsp/linux-x64/hlsl/System.Reactive.xml Normal file → Executable file
View File

View File

@@ -1,3 +1,6 @@
local is_windows = vim.fn.has("win32") == 1
local is_linux = vim.fn.has("unix") == 1 and not is_windows
vim.filetype.add({ vim.filetype.add({
extension = { extension = {
hlsl = "hlsl", hlsl = "hlsl",
@@ -9,6 +12,11 @@ vim.api.nvim_create_autocmd({ "BufRead", "BufNewFile" }, {
command = "setlocal filetype=hlsl", command = "setlocal filetype=hlsl",
}) })
-- HLSL lsp has some problems on linux, so disable it for now
if (is_linux) then
return
end
local lsp = require("lspconfig") local lsp = require("lspconfig")
local configs = require("lspconfig.configs") local configs = require("lspconfig.configs")
@@ -21,9 +29,6 @@ if not configs.hlsl_tools then
} }
end end
local is_windows = vim.fn.has("win32") == 1
local is_linux = vim.fn.has("unix") == 1 and not is_windows
local lsp_path = vim.fn.stdpath("config") .. "/lsp/" local lsp_path = vim.fn.stdpath("config") .. "/lsp/"
if (is_windows) then if (is_windows) then
lsp_path = lsp_path .. "win-x64/hlsl/ShaderTools.LanguageServer.exe" lsp_path = lsp_path .. "win-x64/hlsl/ShaderTools.LanguageServer.exe"
@@ -32,7 +37,7 @@ elseif (is_linux) then
end end
lsp.hlsl_tools.setup({ lsp.hlsl_tools.setup({
cmd = { lsp_path, "--stdio" }, cmd = { lsp_path },
-- on_attach = function(client, bufnr) -- on_attach = function(client, bufnr)
-- -- Disable diagnostics for this buffer -- -- Disable diagnostics for this buffer
-- vim.diagnostic.disable(bufnr) -- vim.diagnostic.disable(bufnr)