Roslyn is "working"
This commit is contained in:
parent
5a1f4042e3
commit
fcb1d2420b
38
nix/base-system/flake.lock
generated
38
nix/base-system/flake.lock
generated
@ -512,9 +512,28 @@
|
|||||||
"nil-flake": "nil-flake",
|
"nil-flake": "nil-flake",
|
||||||
"nixpkgs": "nixpkgs_5",
|
"nixpkgs": "nixpkgs_5",
|
||||||
"nurl-flake": "nurl-flake",
|
"nurl-flake": "nurl-flake",
|
||||||
|
"roslyn-lsp": "roslyn-lsp",
|
||||||
"runwhen-flake": "runwhen-flake",
|
"runwhen-flake": "runwhen-flake",
|
||||||
"rust-overlay-flake": "rust-overlay-flake",
|
"rust-overlay-flake": "rust-overlay-flake",
|
||||||
"sile-flake": "sile-flake"
|
"sile-flake": "sile-flake",
|
||||||
|
"treesitter-context": "treesitter-context"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"roslyn-lsp": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1704752101,
|
||||||
|
"narHash": "sha256-eWKAdrKfuBqSoOW70BSqcANrGQ+NwbmCL8C1jLXdNt8=",
|
||||||
|
"owner": "zaphar",
|
||||||
|
"repo": "roslyn.nvim",
|
||||||
|
"rev": "f1301be34ff786036867137228f3d9f65a3434af",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "zaphar",
|
||||||
|
"ref": "non_nightly",
|
||||||
|
"repo": "roslyn.nvim",
|
||||||
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"runwhen-flake": {
|
"runwhen-flake": {
|
||||||
@ -689,6 +708,23 @@
|
|||||||
"repo": "default",
|
"repo": "default",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"treesitter-context": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1693236978,
|
||||||
|
"narHash": "sha256-B6BXeFEWxTFf46JrlatsxEQcC6+/hPIDBb5cIcJpLZg=",
|
||||||
|
"owner": "nvim-treesitter",
|
||||||
|
"repo": "nvim-treesitter-context",
|
||||||
|
"rev": "e6b743ccd4e780bc9cd85b707de67df72eea1a23",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nvim-treesitter",
|
||||||
|
"repo": "nvim-treesitter-context",
|
||||||
|
"rev": "e6b743ccd4e780bc9cd85b707de67df72eea1a23",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": "root",
|
"root": "root",
|
||||||
|
@ -23,6 +23,11 @@
|
|||||||
url = "github:nvim-treesitter/nvim-treesitter-context/e6b743ccd4e780bc9cd85b707de67df72eea1a23";
|
url = "github:nvim-treesitter/nvim-treesitter-context/e6b743ccd4e780bc9cd85b707de67df72eea1a23";
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
|
# We need to pin to this version of treesitter because it breaks after this revision
|
||||||
|
roslyn-lsp = {
|
||||||
|
url = "github:zaphar/roslyn.nvim/non_nightly";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
outputs = {
|
outputs = {
|
||||||
sile-flake,
|
sile-flake,
|
||||||
@ -35,6 +40,7 @@
|
|||||||
nurl-flake,
|
nurl-flake,
|
||||||
harpoon-src,
|
harpoon-src,
|
||||||
treesitter-context,
|
treesitter-context,
|
||||||
|
roslyn-lsp,
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
... # We don't use the self or nixpkgs args here so we just glob it.
|
... # We don't use the self or nixpkgs args here so we just glob it.
|
||||||
}: {
|
}: {
|
||||||
@ -44,10 +50,6 @@
|
|||||||
in
|
in
|
||||||
{ config, ...}: let
|
{ config, ...}: let
|
||||||
pkgs = nixPkgs;
|
pkgs = nixPkgs;
|
||||||
nvim-treesitter-csharp = pkgs.callPackage ./nvim-treesitter-csharp.nix {
|
|
||||||
inherit (pkgs.tree-sitter) buildGrammar;
|
|
||||||
inherit (pkgs) fetchFromGitHub;
|
|
||||||
};
|
|
||||||
possession-nvim = pkgs.callPackage ./possession-nvim.nix {
|
possession-nvim = pkgs.callPackage ./possession-nvim.nix {
|
||||||
inherit (pkgs.vimUtils) buildVimPlugin;
|
inherit (pkgs.vimUtils) buildVimPlugin;
|
||||||
inherit (pkgs) fetchFromGitHub;
|
inherit (pkgs) fetchFromGitHub;
|
||||||
@ -60,23 +62,15 @@
|
|||||||
name = "nvim-treesitter-context";
|
name = "nvim-treesitter-context";
|
||||||
src = treesitter-context;
|
src = treesitter-context;
|
||||||
};
|
};
|
||||||
|
roslyn-nvim = pkgs.vimUtils.buildVimPlugin {
|
||||||
|
name = "roslyn-nvim";
|
||||||
|
src = roslyn-lsp;
|
||||||
|
};
|
||||||
# TODO(jwall): When this actually builds we should use it.
|
# TODO(jwall): When this actually builds we should use it.
|
||||||
#nvim-treesitter-powershell = pkgs.callPackage ./nvim-powershell.nix {
|
#nvim-treesitter-powershell = pkgs.callPackage ./nvim-powershell.nix {
|
||||||
# inherit (pkgs.tree-sitter) buildGrammar;
|
# inherit (pkgs.tree-sitter) buildGrammar;
|
||||||
# inherit (pkgs) fetchFromGitHub;
|
# inherit (pkgs) fetchFromGitHub;
|
||||||
#};
|
#};
|
||||||
expected-parsers = (pkgs.lib.attrVals [
|
|
||||||
"tree-sitter-lua"
|
|
||||||
"tree-sitter-toml"
|
|
||||||
"tree-sitter-yaml"
|
|
||||||
"tree-sitter-json"
|
|
||||||
"tree-sitter-html"
|
|
||||||
"tree-sitter-css"
|
|
||||||
"tree-sitter-nix"
|
|
||||||
"tree-sitter-ocaml"
|
|
||||||
"tree-sitter-tlaplus"
|
|
||||||
"tree-sitter-julia"
|
|
||||||
] pkgs.tree-sitter.builtGrammars) ++ [nvim-treesitter-csharp];
|
|
||||||
in {
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
./program-neovim.nix
|
./program-neovim.nix
|
||||||
@ -117,6 +111,7 @@ EOF";
|
|||||||
vimagit
|
vimagit
|
||||||
hoon-vim
|
hoon-vim
|
||||||
nvim-treesitter
|
nvim-treesitter
|
||||||
|
roslyn-nvim
|
||||||
nvim-treesitter-context
|
nvim-treesitter-context
|
||||||
nvim-treesitter-textobjects
|
nvim-treesitter-textobjects
|
||||||
nvim-treesitter-parsers.ini
|
nvim-treesitter-parsers.ini
|
||||||
|
@ -111,8 +111,6 @@ cmp.setup({
|
|||||||
--vim.lsp.set_log_level('trace')
|
--vim.lsp.set_log_level('trace')
|
||||||
--vim.lsp.log.set_format_func(vim.inspect)
|
--vim.lsp.log.set_format_func(vim.inspect)
|
||||||
|
|
||||||
local roslyn_lsp_dll = vim.fs.normalize("~/bin/Microsoft.CodeAnalysis.LanguageServer.dll")
|
|
||||||
|
|
||||||
local caps = vim.tbl_deep_extend(
|
local caps = vim.tbl_deep_extend(
|
||||||
'force',
|
'force',
|
||||||
vim.lsp.protocol.make_client_capabilities(),
|
vim.lsp.protocol.make_client_capabilities(),
|
||||||
@ -122,6 +120,9 @@ local caps = vim.tbl_deep_extend(
|
|||||||
{ workspace = { didChangeWatchedFiles = { dynamicRegistration = true } } },
|
{ workspace = { didChangeWatchedFiles = { dynamicRegistration = true } } },
|
||||||
{ window = { progress = false } }
|
{ window = { progress = false } }
|
||||||
);
|
);
|
||||||
|
|
||||||
|
vim.lsp.set_log_level(vim.log.levels.TRACE)
|
||||||
|
|
||||||
local lspconfig = require("lspconfig")
|
local lspconfig = require("lspconfig")
|
||||||
|
|
||||||
-- Terraform lsp setup
|
-- Terraform lsp setup
|
||||||
@ -137,37 +138,45 @@ lspconfig.nil_ls.setup {
|
|||||||
capabilities = caps,
|
capabilities = caps,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
require('roslyn').setup({
|
||||||
|
on_attach = function (client, _)
|
||||||
|
--vim.notify(vim.inspect(client))
|
||||||
|
end,
|
||||||
|
capabilities = caps,
|
||||||
|
log_level = "Trace",
|
||||||
|
});
|
||||||
|
|
||||||
local vim_pid = vim.fn.getpid()
|
local vim_pid = vim.fn.getpid()
|
||||||
|
|
||||||
-- "FormatterOptions:EnableEditorConfigSupport=true"
|
-- "FormatterOptions:EnableEditorConfigSupport=true"
|
||||||
local omnisharp_cmd = { 'omnisharp', '--languageserver', '-v', '--hostPID', tostring(vim_pid), }
|
--local omnisharp_cmd = { 'omnisharp', '--languageserver', '-v', '--hostPID', tostring(vim_pid), }
|
||||||
|
--
|
||||||
local function toSnakeCase(str)
|
--local function toSnakeCase(str)
|
||||||
return string.gsub(str, "%s*[- ]%s*", "_")
|
-- return string.gsub(str, "%s*[- ]%s*", "_")
|
||||||
end
|
--end
|
||||||
|
--
|
||||||
lspconfig.omnisharp.setup {
|
--lspconfig.omnisharp.setup {
|
||||||
cmd = omnisharp_cmd,
|
-- cmd = omnisharp_cmd,
|
||||||
enable_roslyn_analyzers = true,
|
-- enable_roslyn_analyzers = true,
|
||||||
enable_editorconfig_support = true,
|
-- enable_editorconfig_support = true,
|
||||||
enable_import_completion = true,
|
-- enable_import_completion = true,
|
||||||
-- Omnisharp has issues with the semanticTokens feature we need to massage it a bit.
|
-- -- Omnisharp has issues with the semanticTokens feature we need to massage it a bit.
|
||||||
on_attach = function(client, bufnr)
|
-- on_attach = function(client, bufnr)
|
||||||
-- https://github.com/OmniSharp/omnisharp-roslyn/issues/2483#issuecomment-1492605642
|
-- -- https://github.com/OmniSharp/omnisharp-roslyn/issues/2483#issuecomment-1492605642
|
||||||
local tokenModifiers = client.server_capabilities.semanticTokensProvider.legend.tokenModifiers
|
-- local tokenModifiers = client.server_capabilities.semanticTokensProvider.legend.tokenModifiers
|
||||||
for i, v in ipairs(tokenModifiers) do
|
-- for i, v in ipairs(tokenModifiers) do
|
||||||
tokenModifiers[i] = toSnakeCase(v)
|
-- tokenModifiers[i] = toSnakeCase(v)
|
||||||
end
|
-- end
|
||||||
local tokenTypes = client.server_capabilities.semanticTokensProvider.legend.tokenTypes
|
-- local tokenTypes = client.server_capabilities.semanticTokensProvider.legend.tokenTypes
|
||||||
for i, v in ipairs(tokenTypes) do
|
-- for i, v in ipairs(tokenTypes) do
|
||||||
tokenTypes[i] = toSnakeCase(v)
|
-- tokenTypes[i] = toSnakeCase(v)
|
||||||
end
|
-- end
|
||||||
end,
|
-- end,
|
||||||
handlers = {
|
-- handlers = {
|
||||||
["textDocument/definition"] = require('omnisharp_extended').handler,
|
-- ["textDocument/definition"] = require('omnisharp_extended').handler,
|
||||||
},
|
-- },
|
||||||
capabilities = caps,
|
-- capabilities = caps,
|
||||||
}
|
--}
|
||||||
|
|
||||||
--ocaml
|
--ocaml
|
||||||
lspconfig.ocamllsp.setup {
|
lspconfig.ocamllsp.setup {
|
||||||
|
54
nix/darwin/flake.lock
generated
54
nix/darwin/flake.lock
generated
@ -7,11 +7,11 @@
|
|||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1690228878,
|
"lastModified": 1694793763,
|
||||||
"narHash": "sha256-9Xe7JV0krp4RJC9W9W9WutZVlw6BlHTFMiUP/k48LQY=",
|
"narHash": "sha256-y6gTE1C9mIoSkymRYyzCmv62PFgy+hbZ5j8fuiQK5KI=",
|
||||||
"owner": "ryantm",
|
"owner": "ryantm",
|
||||||
"repo": "agenix",
|
"repo": "agenix",
|
||||||
"rev": "d8c973fd228949736dedf61b7f8cc1ece3236792",
|
"rev": "572baca9b0c592f71982fca0790db4ce311e3c75",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -29,6 +29,7 @@
|
|||||||
"nil-flake": "nil-flake",
|
"nil-flake": "nil-flake",
|
||||||
"nixpkgs": "nixpkgs_5",
|
"nixpkgs": "nixpkgs_5",
|
||||||
"nurl-flake": "nurl-flake",
|
"nurl-flake": "nurl-flake",
|
||||||
|
"roslyn-lsp": "roslyn-lsp",
|
||||||
"runwhen-flake": "runwhen-flake",
|
"runwhen-flake": "runwhen-flake",
|
||||||
"rust-overlay-flake": "rust-overlay-flake",
|
"rust-overlay-flake": "rust-overlay-flake",
|
||||||
"sile-flake": "sile-flake",
|
"sile-flake": "sile-flake",
|
||||||
@ -36,12 +37,12 @@
|
|||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1,
|
"lastModified": 1,
|
||||||
"narHash": "sha256-he52upxte7/ueHwKdbZxrQHwkcsZtRzjM8JTPlhA/O0=",
|
"narHash": "sha256-LPZptn4TgP1Rk6u1FQauqeRdswDP5VxmhlE8AfFVRFE=",
|
||||||
"path": "/nix/store/1syscqfij22hmdnwsvb3gjkvqddz4mq0-source/nix/base-system",
|
"path": "/nix/store/89vbp2wn5hvs421h8c220jazqfcrbwf0-source/nix/base-system",
|
||||||
"type": "path"
|
"type": "path"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"path": "/nix/store/1syscqfij22hmdnwsvb3gjkvqddz4mq0-source/nix/base-system",
|
"path": "/nix/store/89vbp2wn5hvs421h8c220jazqfcrbwf0-source/nix/base-system",
|
||||||
"type": "path"
|
"type": "path"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -324,11 +325,11 @@
|
|||||||
"rust-overlay": "rust-overlay"
|
"rust-overlay": "rust-overlay"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1693791390,
|
"lastModified": 1694797768,
|
||||||
"narHash": "sha256-FnT7/iDcGLWSmzwDfD7RQwr7z5+U2j7YOqhR3UM3zrg=",
|
"narHash": "sha256-CA9AQ+lvgbCOfH++A0rHKguTBBn0EEcVRLMAmkDecQo=",
|
||||||
"owner": "martinvonz",
|
"owner": "martinvonz",
|
||||||
"repo": "jj",
|
"repo": "jj",
|
||||||
"rev": "e3c85d6ecc20ee4240cdf3ed80107ce7dc268abe",
|
"rev": "e288a152d052a531e0ccb25ae27ce07412d65447",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -549,11 +550,11 @@
|
|||||||
"nixpkgs": "nixpkgs_6"
|
"nixpkgs": "nixpkgs_6"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1695751852,
|
"lastModified": 1701273941,
|
||||||
"narHash": "sha256-4jG+8LPHteAAEfUOtlwK0piK79fQsAMp/SA6Lpob+JQ=",
|
"narHash": "sha256-MwDKOU2JZRHObIJLFbge+XS3ov54dAlDGtzWPtq7/PE=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nurl",
|
"repo": "nurl",
|
||||||
"rev": "715246bc9748cf196dafc7795812dec825e30b4b",
|
"rev": "caf9e815a036eec02eac877798ebc9b379adc810",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -568,6 +569,23 @@
|
|||||||
"darwin": "darwin_2"
|
"darwin": "darwin_2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"roslyn-lsp": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1704752101,
|
||||||
|
"narHash": "sha256-eWKAdrKfuBqSoOW70BSqcANrGQ+NwbmCL8C1jLXdNt8=",
|
||||||
|
"owner": "zaphar",
|
||||||
|
"repo": "roslyn.nvim",
|
||||||
|
"rev": "f1301be34ff786036867137228f3d9f65a3434af",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "zaphar",
|
||||||
|
"ref": "non_nightly",
|
||||||
|
"repo": "roslyn.nvim",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"runwhen-flake": {
|
"runwhen-flake": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat_2",
|
"flake-compat": "flake-compat_2",
|
||||||
@ -624,11 +642,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1693793487,
|
"lastModified": 1694743934,
|
||||||
"narHash": "sha256-MS6CDyAC0sJMTE/pRYlfrhBnhlAPvEo43ipwf5ZNzHg=",
|
"narHash": "sha256-4pn0x+OiOFWefBpgyufFVaAeG+LwfVUI/HMCma8xdHU=",
|
||||||
"owner": "oxalica",
|
"owner": "oxalica",
|
||||||
"repo": "rust-overlay",
|
"repo": "rust-overlay",
|
||||||
"rev": "f179280eed5eb93759c94bf3231fbbda28f894b7",
|
"rev": "6a26dd6da9b4f28d9b4c397bd22b5df4bec8f78a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -673,11 +691,11 @@
|
|||||||
"nixpkgs": "nixpkgs_8"
|
"nixpkgs": "nixpkgs_8"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1692759315,
|
"lastModified": 1694595810,
|
||||||
"narHash": "sha256-nRA6Oad/CwUdMXlHpv1wW1IY5Pp100BJvIscd1AlYbI=",
|
"narHash": "sha256-tqeteJwXs77NOoSw3jwQu4ImP8wH+omEwNq6MZycrDM=",
|
||||||
"owner": "sile-typesetter",
|
"owner": "sile-typesetter",
|
||||||
"repo": "sile",
|
"repo": "sile",
|
||||||
"rev": "fa84d15c902df4859caff8af8325097022b62f3e",
|
"rev": "770d2b9f68297bb5e9ce75182bf6e57ae1cce3b9",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user