Add C# language server

This commit is contained in:
Smaug123
2024-03-25 21:29:19 +00:00
parent db633836f1
commit ae0713074f
3 changed files with 15 additions and 1 deletions

View File

@@ -280,6 +280,7 @@
};
home.packages = [
nixpkgs.csharp-ls
nixpkgs.netcoredbg
nixpkgs.nil
nixpkgs.fsautocomplete

View File

@@ -2,6 +2,8 @@ local coq = require("coq")
-- Using rustaceanvim means we shouldn't set up the LSP for Rust manually.
require("lspconfig")["csharp_ls"].setup({})
require("lspconfig")["lua_ls"].setup({
on_init = function(client)
local path = client.workspace_folders[1].name

View File

@@ -3,7 +3,7 @@ local dap_ui = require("dap.ui.widgets")
dap.adapters.coreclr = {
type = "executable",
command = "netcoredbg",
args = { "--interpreter=vscode", "--", "dotnet" },
args = { "--interpreter=vscode" },
}
dap.configurations.fsharp = {
@@ -17,6 +17,17 @@ dap.configurations.fsharp = {
},
}
dap.configurations.cs = {
{
type = "coreclr",
name = "launch - netcoredbg",
request = "launch",
program = function()
return vim.fn.input("Path to dll: ", vim.fn.getcwd() .. "/bin/Debug/", "file")
end,
},
}
do
local status, whichkey = pcall(require, "which-key")
if status then