Fix nix warnings

This commit is contained in:
Jeremy Wall 2023-07-19 21:50:11 -04:00
parent e36e2a78fa
commit 7603474dc4
2 changed files with 11 additions and 5 deletions

View File

@ -12,14 +12,13 @@
jj-flake.url = "github:martinvonz/jj";
};
outputs = {
self,
nixpkgs,
sile-flake,
runwhen-flake,
durnitisp-flake,
rust-overlay-flake,
jj-flake,
agenix-flake,
... # We don't use the self or nixpkgs args here so we just glob it.
}: {
systemModule = system: let
runwhen = runwhen-flake.defaultPackage."${system}";
@ -44,6 +43,7 @@
environment.variables = {
EDITOR="nvim";
PAGER="less -R";
OMNISHARP_BIN = "${pkgs.omnisharp-roslyn}/bin/run";
};
environment.etc."nvim.lua" = {
@ -127,6 +127,7 @@
rnix-lsp
nil
alloy6
omnisharp-roslyn
(tlaplus.override {
adoptopenjdk-bin = jdk;
})

View File

@ -9,8 +9,14 @@ local lsconfig = require("lspconfig")
-- Nix language server support
lsconfig.nil_ls.setup{}
-- This needs a path to the omnisharp dll provided
lsconfig.omnisharp.setup {}
local vim_pid = vim.fn.pid()
-- This needs a path to the omnisharp dll provided. We depend on the OMNISHARP_BIN environment variable being set to make this work.
lsconfig.omnisharp.setup {
cmd = {
omnisharp_bin = { vim.env.OMNISHARP_BIN, '--languageserver', '--hostPID', to_string(vim_pid) },
},
}
-- Java language server support
lsconfig.java_language_server.setup{}
@ -37,7 +43,6 @@ vim.api.nvim_create_autocmd('LspAttach', {
end,
})
-- LSP Diagnostics Options Setup
local sign = function(opts)
vim.fn.sign_define(opts.name, {