chore: cleanup warnings and commented code

This commit is contained in:
Jeremy Wall 2024-10-11 16:09:08 -04:00 committed by Jeremy Wall
parent b9682c3c2c
commit 0da68a9e67
2 changed files with 160 additions and 97 deletions

View File

@ -56,15 +56,18 @@
],
"nurl-flake": "nurl-flake",
"roslyn-lsp": "roslyn-lsp",
"rust-overlay": "rust-overlay_3",
"tree-sitter-cli-src": "tree-sitter-cli-src",
"treesitter-context": "treesitter-context",
"victoria-logs-src": "victoria-logs-src"
"victoria-logs-src": "victoria-logs-src",
"zig-src": "zig-src"
},
"locked": {
"lastModified": 1728571393,
"narHash": "sha256-ERtPLZLCyp1zZkXieq05GgvEiR4merRWW8jmHqMgg/Q=",
"lastModified": 1732111397,
"narHash": "sha256-2qTl0546a5xZySPdN23gFhz48V6tA2INDjKm4NPBMTs=",
"owner": "zaphar",
"repo": "nix-flakes",
"rev": "06fe1017712529cc66aae868ce0f7c17551724e7",
"rev": "be1645a420b26b5a69a734db8596351a51d5a021",
"type": "github"
},
"original": {
@ -151,7 +154,7 @@
"inputs": {
"flake-compat": "flake-compat_2",
"flake-utils": "flake-utils_5",
"naersk": "naersk_2"
"naersk": "naersk_3"
},
"locked": {
"lastModified": 1678814232,
@ -499,9 +502,9 @@
"inputs": {
"flake-compat": "flake-compat_3",
"flake-utils": "flake-utils_6",
"naersk": "naersk_3",
"nixpkgs": "nixpkgs_7",
"rust-overlay": "rust-overlay_3"
"naersk": "naersk_4",
"nixpkgs": "nixpkgs_8",
"rust-overlay": "rust-overlay_4"
},
"locked": {
"lastModified": 1716397295,
@ -590,7 +593,25 @@
},
"naersk_2": {
"inputs": {
"nixpkgs": "nixpkgs_5"
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1721727458,
"narHash": "sha256-r/xppY958gmZ4oTfLiHN0ZGuQ+RSTijDblVgVLFi1mw=",
"owner": "nix-community",
"repo": "naersk",
"rev": "3fb418eaf352498f6b6c30592e3beb63df42ef11",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "naersk",
"type": "github"
}
},
"naersk_3": {
"inputs": {
"nixpkgs": "nixpkgs_6"
},
"locked": {
"lastModified": 1671096816,
@ -606,9 +627,9 @@
"type": "github"
}
},
"naersk_3": {
"naersk_4": {
"inputs": {
"nixpkgs": "nixpkgs_6"
"nixpkgs": "nixpkgs_7"
},
"locked": {
"lastModified": 1698420672,
@ -624,9 +645,9 @@
"type": "github"
}
},
"naersk_4": {
"naersk_5": {
"inputs": {
"nixpkgs": "nixpkgs_12"
"nixpkgs": "nixpkgs_13"
},
"locked": {
"lastModified": 1650101877,
@ -677,7 +698,7 @@
"neovim-flake": {
"inputs": {
"flake-utils": "flake-utils_8",
"nixpkgs": "nixpkgs_8"
"nixpkgs": "nixpkgs_9"
},
"locked": {
"dir": "contrib",
@ -699,7 +720,7 @@
"nil-flake": {
"inputs": {
"flake-utils": "flake-utils_4",
"nixpkgs": "nixpkgs_3",
"nixpkgs": "nixpkgs_4",
"rust-overlay": "rust-overlay_2"
},
"locked": {
@ -719,8 +740,8 @@
"nil-flake_2": {
"inputs": {
"flake-utils": "flake-utils_9",
"nixpkgs": "nixpkgs_9",
"rust-overlay": "rust-overlay_4"
"nixpkgs": "nixpkgs_10",
"rust-overlay": "rust-overlay_5"
},
"locked": {
"lastModified": 1694177726,
@ -769,6 +790,22 @@
}
},
"nixpkgs_10": {
"locked": {
"lastModified": 1690441914,
"narHash": "sha256-Ac+kJQ5z9MDAMyzSc0i0zJDx2i3qi9NjlW5Lz285G/I=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "db8672b8d0a2593c2405aed0c1dfa64b2a2f428f",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_11": {
"locked": {
"lastModified": 1717179513,
"narHash": "sha256-vboIEwIQojofItm2xGCdZCzW96U85l9nDW3ifMuAIdM=",
@ -784,7 +821,7 @@
"type": "github"
}
},
"nixpkgs_11": {
"nixpkgs_12": {
"locked": {
"lastModified": 1689850295,
"narHash": "sha256-fUYf6WdQlhd2H+3aR8jST5dhFH1d0eE22aes8fNIfyk=",
@ -800,7 +837,7 @@
"type": "github"
}
},
"nixpkgs_12": {
"nixpkgs_13": {
"locked": {
"lastModified": 1650109093,
"narHash": "sha256-tqlnKrAdJktRLXTou9le0oTqrYBAFpGscV5RADdpArU=",
@ -814,7 +851,7 @@
"type": "indirect"
}
},
"nixpkgs_13": {
"nixpkgs_14": {
"locked": {
"lastModified": 1682109806,
"narHash": "sha256-d9g7RKNShMLboTWwukM+RObDWWpHKaqTYXB48clBWXI=",
@ -845,6 +882,20 @@
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1728538411,
"narHash": "sha256-f0SBJz1eZ2yOuKUr5CA9BHULGXVSn6miBuUWdTyhUhU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "b69de56fac8c2b6f8fd27f2eca01dcda8e0a4221",
"type": "github"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"nixpkgs_4": {
"locked": {
"lastModified": 1726481836,
"narHash": "sha256-MWTBH4dd5zIz2iatDb8IkqSjIeFum9jAqkFxgHLdzO4=",
@ -860,7 +911,7 @@
"type": "github"
}
},
"nixpkgs_4": {
"nixpkgs_5": {
"locked": {
"lastModified": 1708296515,
"narHash": "sha256-FyF489fYNAUy7b6dkYV6rGPyzp+4tThhr80KNAaF/yY=",
@ -876,7 +927,7 @@
"type": "github"
}
},
"nixpkgs_5": {
"nixpkgs_6": {
"locked": {
"lastModified": 1678724065,
"narHash": "sha256-MjeRjunqfGTBGU401nxIjs7PC9PZZ1FBCZp/bRB3C2M=",
@ -890,20 +941,6 @@
"type": "indirect"
}
},
"nixpkgs_6": {
"locked": {
"lastModified": 1708151420,
"narHash": "sha256-MGT/4aGCWQPQiu6COqJdCj9kSpLPiShgbwpbC38YXC8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "6e2f00c83911461438301db0dba5281197fe4b3a",
"type": "github"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"nixpkgs_7": {
"locked": {
"lastModified": 1708151420,
@ -919,6 +956,20 @@
}
},
"nixpkgs_8": {
"locked": {
"lastModified": 1708151420,
"narHash": "sha256-MGT/4aGCWQPQiu6COqJdCj9kSpLPiShgbwpbC38YXC8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "6e2f00c83911461438301db0dba5281197fe4b3a",
"type": "github"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"nixpkgs_9": {
"locked": {
"lastModified": 1715787315,
"narHash": "sha256-cYApT0NXJfqBkKcci7D9Kr4CBYZKOQKDYA23q8XNuWg=",
@ -934,25 +985,9 @@
"type": "github"
}
},
"nixpkgs_9": {
"locked": {
"lastModified": 1690441914,
"narHash": "sha256-Ac+kJQ5z9MDAMyzSc0i0zJDx2i3qi9NjlW5Lz285G/I=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "db8672b8d0a2593c2405aed0c1dfa64b2a2f428f",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nurl-flake": {
"inputs": {
"nixpkgs": "nixpkgs_4"
"nixpkgs": "nixpkgs_5"
},
"locked": {
"lastModified": 1726505596,
@ -970,7 +1005,7 @@
},
"nurl-flake_2": {
"inputs": {
"nixpkgs": "nixpkgs_11"
"nixpkgs": "nixpkgs_12"
},
"locked": {
"lastModified": 1701273941,
@ -999,7 +1034,7 @@
"neogit-src": "neogit-src_2",
"neovim-flake": "neovim-flake",
"nil-flake": "nil-flake_2",
"nixpkgs": "nixpkgs_10",
"nixpkgs": "nixpkgs_11",
"nixpkgs-darwin": "nixpkgs-darwin",
"nurl-flake": "nurl-flake_2",
"roslyn-lsp": "roslyn-lsp_2",
@ -1048,7 +1083,7 @@
"inputs": {
"flake-compat": "flake-compat_4",
"flake-utils": "flake-utils_10",
"naersk": "naersk_4"
"naersk": "naersk_5"
},
"locked": {
"lastModified": 1695686584,
@ -1131,6 +1166,28 @@
}
},
"rust-overlay_3": {
"inputs": {
"nixpkgs": [
"custom-flakes",
"nixpkgs"
]
},
"locked": {
"lastModified": 1728461096,
"narHash": "sha256-cd0cXB85B3kGpm+iumP9xCnqFErspXL9Z/2X59kQ6c4=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "e310b9bd71fa6c6a9fec0a8cf5af43ce798a0ad6",
"type": "github"
},
"original": {
"owner": "oxalica",
"ref": "stable",
"repo": "rust-overlay",
"type": "github"
}
},
"rust-overlay_4": {
"inputs": {
"flake-utils": "flake-utils_7",
"nixpkgs": [
@ -1153,7 +1210,7 @@
"type": "github"
}
},
"rust-overlay_4": {
"rust-overlay_5": {
"inputs": {
"flake-utils": [
"nil-flake",
@ -1184,7 +1241,7 @@
"flake-utils": "flake-utils_12",
"gitignore": "gitignore",
"libtexpdf-src": "libtexpdf-src",
"nixpkgs": "nixpkgs_13"
"nixpkgs": "nixpkgs_14"
},
"locked": {
"lastModified": 1694595810,
@ -1350,6 +1407,22 @@
"type": "github"
}
},
"tree-sitter-cli-src": {
"flake": false,
"locked": {
"lastModified": 1728916102,
"narHash": "sha256-Aslud0Di5u3gaVHguEZPGkYwDJQPj6BACjo7+2wwfhE=",
"owner": "tree-sitter",
"repo": "tree-sitter",
"rev": "fb23de926134188e2711bba2f7b589e3f25c14fd",
"type": "github"
},
"original": {
"owner": "tree-sitter",
"repo": "tree-sitter",
"type": "github"
}
},
"treesitter-context": {
"flake": false,
"locked": {
@ -1414,6 +1487,23 @@
"repo": "VictoriaMetrics",
"type": "github"
}
},
"zig-src": {
"flake": false,
"locked": {
"lastModified": 1717700711,
"narHash": "sha256-5qSiTq+UWGOwjDVZMIrAt2cDKHkyNPBSAEjpRQUByFM=",
"owner": "ziglang",
"repo": "zig",
"rev": "cf90dfd3098bef5b3c22d5ab026173b3c357f2dd",
"type": "github"
},
"original": {
"owner": "ziglang",
"ref": "0.13.0",
"repo": "zig",
"type": "github"
}
}
},
"root": "root",

View File

@ -144,21 +144,25 @@ local caps = vim.tbl_deep_extend(
local lspconfig = require("lspconfig")
-- Typst
lspconfig.tinymist.setup{
capabilities = caps,
settings = {
exportPdf = "onSave",
},
}
-- Terraform lsp setup
lspconfig.terraformls.setup {}
-- Nix language server support
lspconfig.nil_ls.setup {
--single_file_support = true,
--on_attach = function(client, bufnr)
-- -- disable the semanticTokens because it has issues.
-- -- client.server_capabilities.semanticTokensProvider = nil
--end,
capabilities = caps,
}
require('roslyn').setup({
on_attach = function (client, _)
-- client, bufnr
on_attach = function (_, _)
--vim.notify(vim.inspect(client))
end,
sdk_framework = "net8.0",
@ -166,38 +170,6 @@ require('roslyn').setup({
log_level = "Trace",
});
local vim_pid = vim.fn.getpid()
-- "FormatterOptions:EnableEditorConfigSupport=true"
--local omnisharp_cmd = { 'omnisharp', '--languageserver', '-v', '--hostPID', tostring(vim_pid), }
local function toSnakeCase(str)
return string.gsub(str, "%s*[- ]%s*", "_")
end
--lspconfig.omnisharp.setup {
-- cmd = omnisharp_cmd,
-- enable_roslyn_analyzers = true,
-- enable_editorconfig_support = true,
-- enable_import_completion = true,
-- -- Omnisharp has issues with the semanticTokens feature we need to massage it a bit.
-- on_attach = function(client, bufnr)
-- -- https://github.com/OmniSharp/omnisharp-roslyn/issues/2483#issuecomment-1492605642
-- local tokenModifiers = client.server_capabilities.semanticTokensProvider.legend.tokenModifiers
-- for i, v in ipairs(tokenModifiers) do
-- tokenModifiers[i] = toSnakeCase(v)
-- end
-- local tokenTypes = client.server_capabilities.semanticTokensProvider.legend.tokenTypes
-- for i, v in ipairs(tokenTypes) do
-- tokenTypes[i] = toSnakeCase(v)
-- end
-- end,
-- handlers = {
-- ["textDocument/definition"] = require('omnisharp_extended').handler,
-- },
-- capabilities = caps,
--}
--ocaml
lspconfig.ocamllsp.setup {
capabilities = caps
@ -546,7 +518,8 @@ local lean = require 'lean'
lean.setup {
lsp = {
on_attach = function(client, bufnr)
-- client, bufnr
on_attach = function(_, bufnr)
local opts = { buffer = bufnr }
vim.keymap.set({ "n", "v" }, "<Leader>ti", function() vim.cmd("LeanInfoviewToggle") end, opts)
vim.keymap.set({ "n", "v" }, "<Leader>sg", function() vim.cmd("LeanGoal") end, opts)