Update hlsl lsp
This commit is contained in:
@@ -2,7 +2,14 @@
|
|||||||
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
|
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
|
||||||
-- Add any additional options here
|
-- Add any additional options here
|
||||||
|
|
||||||
vim.opt.shell = "pwsh"
|
local is_windows = vim.fn.has("win32") == 1
|
||||||
|
local is_linux = vim.fn.has("unix") == 1 and not is_windows
|
||||||
|
|
||||||
|
if is_windows then
|
||||||
|
vim.opt.shell = "pwsh"
|
||||||
|
elseif is_linux then
|
||||||
|
vim.opt.shell = "/bin/bash"
|
||||||
|
end
|
||||||
|
|
||||||
vim.opt.relativenumber = false
|
vim.opt.relativenumber = false
|
||||||
vim.opt.number = true
|
vim.opt.number = true
|
||||||
|
|||||||
@@ -21,31 +21,7 @@ if not configs.roslyn then
|
|||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
-- lsp.roslyn.setup({
|
|
||||||
-- offset_encoding = "utf-16",
|
|
||||||
-- cmd = {
|
|
||||||
-- "dotnet",
|
|
||||||
-- "C:/Users/Misaki/.vscode/extensions/ms-dotnettools.csharp-2.93.22-win32-x64/.roslyn/Microsoft.CodeAnalysis.LanguageServer.dll",
|
|
||||||
-- "--devKitDependencyPath=C:/Users/Misaki/.vscode/extensions/ms-dotnettools.csharp-2.93.22-win32-x64/.roslynDevKit/Microsoft.VisualStudio.LanguageServices.DevKit.dll",
|
|
||||||
-- "--logLevel=Information",
|
|
||||||
-- "--extensionLogDirectory=C:/Temp/RoslynLogs/", -- make sure this folder exists
|
|
||||||
-- "--stdio",
|
|
||||||
-- },
|
|
||||||
-- })
|
|
||||||
|
|
||||||
-- local pid = vim.fn.getpid()
|
|
||||||
-- lsp.roslyn.setup({
|
|
||||||
-- cmd = {
|
|
||||||
-- "C:/Users/Misaki/Downloads/omnisharp-win-x64/OmniSharp.exe",
|
|
||||||
-- "--languageserver",
|
|
||||||
-- "--hostPID",
|
|
||||||
-- tostring(pid),
|
|
||||||
-- "--stdio",
|
|
||||||
-- },
|
|
||||||
-- })
|
|
||||||
|
|
||||||
local csext = require("csharpls_extended")
|
local csext = require("csharpls_extended")
|
||||||
|
|
||||||
local config = {
|
local config = {
|
||||||
handlers = {
|
handlers = {
|
||||||
["textDocument/definition"] = csext.handler,
|
["textDocument/definition"] = csext.handler,
|
||||||
|
|||||||
@@ -21,10 +21,18 @@ 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/"
|
||||||
|
if (is_windows) then
|
||||||
|
lsp_path = lsp_path .. "win-x64/hlsl/ShaderTools.LanguageServer.exe"
|
||||||
|
elseif (is_linux) then
|
||||||
|
lsp_path = lsp_path .. "linux-x64/hlsl/ShaderTools.LanguageServer"
|
||||||
|
end
|
||||||
|
|
||||||
lsp.hlsl_tools.setup({
|
lsp.hlsl_tools.setup({
|
||||||
cmd = {
|
cmd = { lsp_path, "--stdio" },
|
||||||
"C:/Users/Misaki/.vscode/extensions/timgjones.hlsltools-1.1.303/bin/win-x64/ShaderTools.LanguageServer.exe",
|
|
||||||
},
|
|
||||||
-- 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)
|
||||||
|
|||||||
Reference in New Issue
Block a user