Use roslyn-nvim, fix some prefixes

This commit is contained in:
Smaug123
2024-03-25 23:44:29 +00:00
parent ae0713074f
commit 47fc4dfd39
8 changed files with 192 additions and 15 deletions

164
flake.lock generated
View File

@@ -78,6 +78,64 @@
"type": "github"
}
},
"flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
"neovim-nightly",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709336216,
"narHash": "sha256-Dt/wOWeW6Sqm11Yh+2+t0dfEWxoMxGBvv3JpIocFl9E=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "f7b3c975cf067e56e7cda6cb098ebe3fb4d74ca2",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_2": {
"inputs": {
"nixpkgs-lib": [
"neovim-nightly",
"hercules-ci-effects",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709336216,
"narHash": "sha256-Dt/wOWeW6Sqm11Yh+2+t0dfEWxoMxGBvv3JpIocFl9E=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "f7b3c975cf067e56e7cda6cb098ebe3fb4d74ca2",
"type": "github"
},
"original": {
"id": "flake-parts",
"type": "indirect"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
@@ -114,6 +172,46 @@
"type": "github"
}
},
"flake-utils_3": {
"inputs": {
"systems": "systems_3"
},
"locked": {
"lastModified": 1701680307,
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"hercules-ci-effects": {
"inputs": {
"flake-parts": "flake-parts_2",
"nixpkgs": [
"neovim-nightly",
"nixpkgs"
]
},
"locked": {
"lastModified": 1710478346,
"narHash": "sha256-Xjf8BdnQG0tLhPMlqQdwCIjOp7Teox0DP3N/jjyiGM4=",
"owner": "hercules-ci",
"repo": "hercules-ci-effects",
"rev": "64e7763d72c1e4c1e5e6472640615b6ae2d40fbf",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "hercules-ci-effects",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
@@ -146,6 +244,54 @@
"url": "https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-large-v3.bin?download=true"
}
},
"neovim-flake": {
"inputs": {
"flake-utils": "flake-utils_2",
"nixpkgs": [
"neovim-nightly",
"nixpkgs"
]
},
"locked": {
"dir": "contrib",
"lastModified": 1711323947,
"narHash": "sha256-Vc478rxwJkMuOcgBXm+brraWk9lbFqrGEdXVuST2l/A=",
"owner": "neovim",
"repo": "neovim",
"rev": "02d00cf3eed6681c6dde40585551c8243d7c003f",
"type": "github"
},
"original": {
"dir": "contrib",
"owner": "neovim",
"repo": "neovim",
"type": "github"
}
},
"neovim-nightly": {
"inputs": {
"flake-compat": "flake-compat_2",
"flake-parts": "flake-parts",
"hercules-ci-effects": "hercules-ci-effects",
"neovim-flake": "neovim-flake",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1711325009,
"narHash": "sha256-c5OJdyuXYzTP+k+PN73X+0pvgXR1yYMYok+72x4SLVg=",
"owner": "nix-community",
"repo": "neovim-nightly-overlay",
"rev": "119bbc295f56b531cb87502f5d2fff13dcc35a35",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "neovim-nightly-overlay",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1709961763,
@@ -215,6 +361,7 @@
"darwin": "darwin",
"emacs": "emacs",
"home-manager": "home-manager",
"neovim-nightly": "neovim-nightly",
"nixpkgs": "nixpkgs_2",
"whisper": "whisper"
}
@@ -265,9 +412,24 @@
"type": "github"
}
},
"systems_3": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"whisper": {
"inputs": {
"flake-utils": "flake-utils_2",
"flake-utils": "flake-utils_3",
"model": "model",
"nixpkgs": "nixpkgs_3"
},

View File

@@ -24,10 +24,14 @@
whisper = {
url = "github:Smaug123/whisper.cpp/nix";
};
neovim-nightly = {
url = "github:nix-community/neovim-nightly-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {
self,
neovim-nightly,
darwin,
emacs,
nixpkgs,
@@ -35,14 +39,14 @@
apple-silicon,
whisper,
...
} @ inputs: let
}: let
config = {
# contentAddressedByDefault = true;
allowUnfree = true;
};
systems = ["aarch64-darwin" "aarch64-linux" "x86_64-linux"];
in let
overlays = [emacs.overlay] ++ import ./overlays.nix;
overlays = [emacs.overlay neovim-nightly.overlay] ++ import ./overlays.nix;
recursiveMerge = attrList: let
f = attrPath:
builtins.zipAttrsWith (n: values:

View File

@@ -190,6 +190,11 @@
nixpkgs.vimPlugins.telescope-nvim
nixpkgs.vimPlugins.tagbar
nixpkgs.vimPlugins.fzf-vim
{
plugin = nixpkgs.vimPlugins.roslyn-nvim;
config = builtins.readFile ./nvim/roslyn-nvim.lua;
type = "lua";
}
{
plugin = let
name = "coq.artifacts";
@@ -204,8 +209,6 @@
hash = "sha256-BHm7U3pINtYamY7m26I4lQee7ccJ6AcHmYx7j1MRFDA=";
};
};
config = builtins.readFile ./nvim/venv-selector.lua;
type = "lua";
}
{
plugin = let
@@ -260,6 +263,8 @@
withPython3 = true;
extraLuaConfig = builtins.replaceStrings ["%PYTHONENV%"] ["${pythonEnv}"] (builtins.readFile ./nvim/init.lua);
package = nixpkgs.neovim-nightly;
};
programs.direnv = {

View File

@@ -230,13 +230,9 @@ if status then
DisplayAllMappingsWithTelescope,
"View all mappings",
},
["mp"] = {
MarkdownPreview,
"Preview Markdown in Lynx",
},
["md"] = {
RemoveCarriageReturn,
"Delete carriage returns from file",
m = {
p = { MarkdownPreview, "Preview Markdown in Lynx" },
d = { RemoveCarriageReturn, "Delete carriage returns from file" },
},
["j"] = {
FormatJson,

View File

@@ -1,8 +1,8 @@
local coq = require("coq")
-- Using rustaceanvim means we shouldn't set up the LSP for Rust manually.
require("lspconfig")["csharp_ls"].setup({})
-- Similarly csharp_ls is unnecessary given roslyn.nvim
-- require("lspconfig")["csharp_ls"].setup({})
require("lspconfig")["lua_ls"].setup({
on_init = function(client)
@@ -74,6 +74,7 @@ do
if whichkey_status then
whichkey.register({
l = {
name = "loclist-related commands",
p = { vim.diagnostic.goto_prev, "Go to previous entry in loclist" },
n = { vim.diagnostic.goto_next, "Go to next entry in loclist" },
l = { ToggleLocList, "Toggle loclist" },
@@ -103,6 +104,7 @@ vim.api.nvim_create_autocmd("LspAttach", {
if whichkey_status then
whichkey.register({
g = {
name = "Go-to related commands",
D = { vim.lsp.buf.declaration, "Go to declaration" },
d = { vim.lsp.buf.definition, "Go to definition" },
i = { vim.lsp.buf.implementation, "Go to implementation" },

View File

@@ -33,6 +33,7 @@ do
if status then
whichkey.register({
d = {
name = "Debugger-related commands",
o = { dap.step_over, "Step over" },
i = { dap.step_into, "Step into" },
c = { dap.continue, "Continue" },
@@ -40,6 +41,7 @@ do
b = { dap.toggle_breakpoint, "Toggle breakpoint" },
r = { dap.repl.open, "Open debug repl" },
v = {
name = "Commands to view debugger state",
v = {
function()
dap_ui.hover()

View File

@@ -0,0 +1,4 @@
require("roslyn").setup({
on_attach = function(_, _) end,
capabilities = vim.lsp.protocol.make_client_capabilities(),
})

View File

@@ -177,7 +177,9 @@ do
if status then
whichkey.register({
p = {
name = "Python-related commands",
v = {
name = "Virtual environment-related commands",
c = { CreateVenv, "Create virtual environment" },
l = { SelectVenv, "Load virtual environment" },
o = {