From 81d0c6cf3755bbd483b11f50af2e23bc439b76a4 Mon Sep 17 00:00:00 2001 From: Jeremy Wall Date: Fri, 11 Oct 2024 16:09:08 -0400 Subject: [PATCH] chore: cleanup warnings and commented code --- nix/base-system/init.lua | 43 ++++------------------------------------ 1 file changed, 4 insertions(+), 39 deletions(-) diff --git a/nix/base-system/init.lua b/nix/base-system/init.lua index a963dcf..1f9877f 100644 --- a/nix/base-system/init.lua +++ b/nix/base-system/init.lua @@ -149,16 +149,12 @@ 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 +162,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 +510,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" }, "ti", function() vim.cmd("LeanInfoviewToggle") end, opts) vim.keymap.set({ "n", "v" }, "sg", function() vim.cmd("LeanGoal") end, opts)